get nonce

API details

Retrieves the current nonce from your wallet using the HIN. The nonce indicates the number of transactions sent and is essential for transaction ordering and preventing replay attacks.

Get wallet nonce

get
Query parameters
HINstringOptional
Responses
200
OK
get
GET /v1/wallet/nonce HTTP/1.1
Host: testnetopenapi.hibit.app
Accept: */*
{
  "code": 1,
  "message": "text",
  "data": {
    "nonce": "text"
  }
}

Code example

import { hibitClient } from '@delandlabs/hibit-sdk';

const options = {
  network: HibitNetwork.Testnet,
  hin: 10000n
};
hibitClient.setOptions(options);

const nonce = await hibitClient.getNonce(options.hin);

SDK

Source code https://github.com/Deland-Labs/hibit-sdk

References

What is HIN?

How to Obtain your HIN and Proxy Key?

Last updated