Skip to main content
Function Signature
Parameters
  • chainId: The chain identifier in CAIP-2 format (e.g., “eip155:1” for Ethereum mainnet, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp” for Solana mainnet)
  • limit: Optional maximum number of transactions to return. If nil, returns all transactions.
  • offset: Optional number of transactions to skip for pagination. If nil, starts from the beginning.
  • order: Optional TransactionOrder to specify the sort order of transactions: ASC or DESC.
Returns An array of FetchedTransaction objects, each containing:
  • blockNum: Block number in which the transaction was included
  • uniqueId: Unique identifier of the transaction
  • hash: Hash of the transaction
  • from: Address that initiated the transaction
  • to: Address that the transaction was sent to
  • value: Optional value transferred in the transaction as Float
  • erc721TokenId: Optional token ID for ERC721 NFT transactions
  • erc1155Metadata: Optional array of ERC1155 token metadata, each containing:
    • tokenId: Token identifier
    • value: Token value
  • tokenId: Optional general token identifier
  • asset: Optional type of asset involved (e.g., “ETH”)
  • category: Category of the transaction (e.g., “external”)
  • rawContract: Optional contract details containing:
    • value: Contract value
    • address: Contract address
    • decimal: Decimal representation of the contract value
  • metadata: Transaction metadata containing:
    • blockTimestamp: ISO format timestamp of the block
  • chainId: ID of the chain associated with the transaction
Example Usage
Implementation Notes
  • Transaction values and timestamps should be carefully parsed
  • Consider implementing caching for recent transactions
  • The uniqueId field can be used for deduplication
  • ERC721 and ERC1155 transfers include additional token metadata
  • Block timestamps are in ISO format and need proper parsing