Last updated 2 days ago
Retrieves the current nonce from your wallet using the . The nonce indicates the number of transactions sent and is essential for transaction ordering and preventing replay attacks.
import { hibitClient } from '@delandlabs/hibit-sdk'; const options = { network: HibitNetwork.Testnet, hin: 10000n }; hibitClient.setOptions(options); const nonce = await hibitClient.getNonce(options.hin);
Source code
HIN, hibit chain identity number
GET /v1/wallet/nonce HTTP/1.1 Host: testnetopenapi.hibit.app Accept: */*
OK
{ "code": 1, "message": "text", "data": { "nonce": "text" } }