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: OptionalTransactionOrderto specify the sort order of transactions:ASCorDESC.
FetchedTransaction objects, each containing:
blockNum: Block number in which the transaction was includeduniqueId: Unique identifier of the transactionhash: Hash of the transactionfrom: Address that initiated the transactionto: Address that the transaction was sent tovalue: Optional value transferred in the transaction as Floaterc721TokenId: Optional token ID for ERC721 NFT transactionserc1155Metadata: Optional array of ERC1155 token metadata, each containing:tokenId: Token identifiervalue: Token value
tokenId: Optional general token identifierasset: Optional type of asset involved (e.g., “ETH”)category: Category of the transaction (e.g., “external”)rawContract: Optional contract details containing:value: Contract valueaddress: Contract addressdecimal: 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
- Transaction values and timestamps should be carefully parsed
- Consider implementing caching for recent transactions
- The
uniqueIdfield can be used for deduplication - ERC721 and ERC1155 transfers include additional token metadata
- Block timestamps are in ISO format and need proper parsing