Browse Source

Update develop/connect/use-with-clarity.md

Co-authored-by: Hank Stoever <hstove@gmail.com>
master-legacy
Alexander Graebe 5 years ago
parent
commit
622377fae7
  1. 9
      develop/connect/use-with-clarity.md

9
develop/connect/use-with-clarity.md

@ -253,11 +253,12 @@ You may want to check the status of a transaction after signing and broadcasting
Following the steps above, you'll receive a transaction ID (`txId`) as part of the `finished` callback method once your user signed the transaction. Equipped with the ID, you can use the [Stacks Blockstack API](https://docs.blockstack.org/common/core_ref.html#stacks-blockchain-api) to request the status of the transaction. Following the steps above, you'll receive a transaction ID (`txId`) as part of the `finished` callback method once your user signed the transaction. Equipped with the ID, you can use the [Stacks Blockstack API](https://docs.blockstack.org/common/core_ref.html#stacks-blockchain-api) to request the status of the transaction.
```bash ```js
curl 'https://sidecar.staging.blockstack.xyz/sidecar/v1/tx/<txId>' const response = await fetch(`https://sidecar.staging.blockstack.xyz/sidecar/v1/tx/${txId}`)
``` const txData = await response.json();
console.log(txData.status);
The API will respond with a JSON object that includes a `tx_status` field. Once the response returns `success`, the transactions was successfully processed. The API will respond with a JSON object that includes a `tx_status` field. Once the response returns `success`, the transactions was successfully processed.
{% include note.html content="Review the API reference of the <a {% include note.html content="Review the API reference of the <a
href='https://blockstack.github.io/stacks-blockchain-sidecar/#operation/get_transaction_by_id'>Get Transaction endpoint</a> for more details." %} href='https://blockstack.github.io/stacks-blockchain-sidecar/#operation/get_transaction_by_id'>Get Transaction endpoint</a> for more details." %}

Loading…
Cancel
Save