View all transfers

To view all transfers for a wallet, you can use the getTransfers method. This method supports pagination through limit and offset parameters. It lists the latest transactions first.

Basic Usage

const transfers = await wallet.getTransfers();
console.log(transfers);

Pagination

The method accepts two optional parameters for pagination:

  • limit: Maximum number of transfers to return, if none provided it defaults to 20
  • offset: Number of transfers to skip before starting to return results
// Get first 10 transfers
const firstPage = await wallet.getTransfers(10, 0);

// Get next 10 transfers
const secondPage = await wallet.getTransfers(10, 10);

This pagination system allows you to:

  • Load transfers in smaller batches
  • Navigate through large transfer histories efficiently
  • Reduce memory usage and response times

Transfers Response

The Transfers request returns an array of transfer objects. Below is the structure of a transfer object

{
    id: string;
    senderIdentityPublicKey: Uint8Array;
    receiverIdentityPublicKey: Uint8Array;
    status: TransferStatus;
    totalValue: number;
    expiryTime: Date | undefined;
    leaves: TransferLeaf[];
    createdTime: Date | undefined;
    updatedTime: Date | undefined;
    type: TransferType;
}

Next Steps

Now that you’ve created your first wallet, you can:

Need Help?