To get a transaction’s details using the NodeJS SDK, use the getTransaction method from the Privy client:
getTransaction
getTransaction: (input: {id: string}) => Promise<WalletApiTransactionResponseType>;
const transaction = await privy.walletApi.getTransaction({ id: 'insert-transaction-id' }); console.log(transaction);
ID of the transaction to fetch details for.
Hide WalletApiTransactionResponseType
ID for the transaction.
ID for the wallet that sent the transaction.
CAIP-2 chain ID for the network the transaction was broadcasted on.
Hash for the transaction.
Current status of the transaction.
'broadcasted'
'confirmed'
'execution_reverted'
Was this page helpful?