getBuyTrafficRequestStatus POSTs an empty body to /wallet/buy-traffic-requests/{trackingId}/status. Pair it with createBuyTrafficRequest, which generates tracking_id internally—persist that id client-side for polling loops.
Setup
import { Canton } from '@fairmint/canton-node-sdk';
const canton = new Canton({
network: 'devnet',
provider: '5n',
partyId: 'OWN_PARTY_ID',
});
Import and receiver
import { Canton } from '@fairmint/canton-node-sdk';
Receiver: canton.validator.getBuyTrafficRequestStatus.
Minimal example
const status = await canton.validator.getBuyTrafficRequestStatus({
trackingId: 'buy-traffic-...',
});
Parameters
trackingId(required, string) — Tracking identifier previously issued duringcreateBuyTrafficRequest.
Returns
status(enum) —created,completed, orfailed.transaction_id(optional, string) — Ledger correlation once settled.failure_reason(optional) —expiredorrejectedwhen failures occur.rejection_reason(optional, string) — Human-readable detail when rejected.
Errors and pitfalls
- Polling unknown ids yields HTTP failures—confirm persistence matches SDK-generated tracking tokens exactly.
Auth and party
Bearer token authorized for wallet endpoints tied to the purchaser identity.
See also
Source
src/clients/validator-api/operations/v0/wallet/buy-traffic-requests/get-status.ts on GitHub.