Fetch transaction via API
The following functionality exists for wallets reconstituted server-side. More on Privy architecture here
To get a transaction’s details using the NodeJS SDK, use the getTransaction
method from the Privy client:
Usage
Parameters
ID of the transaction to fetch details for.
Returns
To get a transaction’s details using the NodeJS SDK, use the getTransaction
method from the Privy client:
Usage
Parameters
ID of the transaction to fetch details for.
Returns
Privy supports fetching transaction status by the transaction ID.
To do so, make a GET
request to
replacing <transaction_id>
with the ID of your desired transaction.
Response
ID for the transaction.
ID for the wallet that sent the transaction.
Current status of the transaction. - 'broadcasted'
refers to when a transaction has been
submitted to the network but has not yet been included in a block - 'confirmed'
refers to when a
transaction has been included in a block that has been confirmed on the network. -
'execution_reverted'
refers to when a transaction has reverted in execution.
Hash for the transaction.
CAIP-2 chain ID for the network the transaction was broadcasted on.
Example
For example, you might fetch a transactions status using transaction ID using the cURL
request below.
The response might look like