Player-scoped storage interface for key-value pairs from the Server Side Storage service. This is NOT filesystem storage - data is stored in the remote storage service.

Hierarchy

  • IPlayerStorage

Methods

  • Deletes a value from a player's storage in the Server Side Storage service.

    Returns

    A promise that resolves to true if deleted, false if not found

    Parameters

    • address: string

      The player's wallet address

    • key: string

      The key to delete

    Returns Promise<boolean>

  • Retrieves a value from a player's storage by key from the Server Side Storage service.

    Returns

    A promise that resolves to the parsed JSON value, or null if not found

    Type Parameters

    • T = unknown

    Parameters

    • address: string

      The player's wallet address

    • key: string

      The key to retrieve

    Returns Promise<null | T>

  • Returns key-value entries from a player's storage, optionally filtered by prefix. Supports pagination via limit and offset.

    Returns

    A promise that resolves to { data, pagination: { offset, total } } for pagination UI

    Parameters

    • address: string

      The player's wallet address

    • Optional options: GetValuesOptions

      Optional { prefix, limit, offset } for filtering and pagination.

    Returns Promise<GetValuesResult>

  • Stores a value in a player's storage in the Server Side Storage service.

    Returns

    A promise that resolves to true if successful, false otherwise

    Type Parameters

    • T = unknown

    Parameters

    • address: string

      The player's wallet address

    • key: string

      The key to store the value under

    • value: T

      The value to store (will be JSON serialized)

    Returns Promise<boolean>