logo

Get all deposits for an Address

This function retrieves all deposits associated with a specific signer on a given chain.

Usage

plain text
const deposits = await peanut.getAllDepositsForSigner({ signer: yourSigner, chainId: '1', // Ethereum Mainnet contractVersion: 'v4.3' // Optional, defaults to latest });

Parameters

  • signer: The ethers.js JsonRpcSigner object for the account you want to query.
  • chainId: The chain ID of the blockchain you're querying (as a string).
  • contractVersion: (Optional) The version of the Peanut contract to use. If not provided, the latest version will be used.

Description

Use this function to fetch all deposits made by a specific address on a particular blockchain. It's useful for retrieving a user's deposit history or checking the status of their deposits.The function returns an array of deposit objects, each containing details about a specific deposit made by the signer's address.