• Fetch all SPL Token accounts owned by the given address.

    Parameters

    • t: HttpTransport

      HTTP transport instance

    • owner: never

      Base-58 encoded owner public key

    • filter: {
          mint: never;
      } | {
          programId: never;
      }

      Filter by either { mint } or { programId }

    • opts: CallOptions & {
          commitment?: Commitment;
          dataSlice?: DataSlice;
          minContextSlot?: number;
      } = {}

      Commitment, data-slice, and call options

    Returns Promise<RpcContext<TokenAccount[]>>

    Array of token accounts wrapped in RPC context

    const { value } = await getTokenAccountsByOwner(transport, owner, { mint });
    

    1.0.0