Nonce

This function retrieves the nonce for a given wallet address using the Limit Order SDK. The nonce is a unique number used for transaction ordering and prevention of replay attacks. It queries the nonce using the LimitOrder.getNonce() method.

Example:

import { LimitOrder, nonceResponse } from "../../src/";

async function getNonce(): Promise<nonceResponse> {
  const limitOrder = new LimitOrder();
  
  const walletAddress = "wallet_address";
  const nonce: nonceResponse = await limitOrder.getNonce(walletAddress);
  
  return nonce;
}

getNonce();

Response:

NameTypeDescription

status

string

Status of the response.

code

number

Status code of the response.

data

number

Nonce of the user.

Last updated