• Returns the state (key value pairs) of account's contract based on the key prefix. Pass an empty string for prefix if you would like to return the entire state.

    Parameters

    • connection: Connection

      connection to query state from

    • accountId: string

      account whose state is viewed

    • prefix: string | Uint8Array

      allows to filter which keys should be returned. Empty prefix means all keys. String prefix is utf-8 encoded.

    • blockQuery: BlockReference = ...

      specifies which block to query state at. By default returns last "optimistic" block (i.e. not necessarily finalized).

    Returns Promise<{
        key: Buffer;
        value: Buffer;
    }[]>