> For the complete documentation index, see [llms.txt](https://l1x-sdk.gitbook.io/l1x-wallet-sdk/4BgPf6WH50hnVEUCHE22/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://l1x-sdk.gitbook.io/l1x-wallet-sdk/4BgPf6WH50hnVEUCHE22/core-methods/how-to-get-current-nonce.md).

# How to get current nonce?

* **getCurrentNonce**

This function is used to retrieve the current nonce (transaction count) of an account.

{% code overflow="wrap" lineNumbers="true" fullWidth="false" %}

```typescript
import { L1XProvider, GetCurrentNonceArg } from "@l1x/l1x-wallet-sdk";

let l1xProvider = new L1XProvider({
  clusterType: "mainnet",
  endpoint: "https://v2-mainnet-rpc.l1x.foundation",
});

const nonceDetails: GetCurrentNonceArg = {
  address: "6e371a05d5766c692172744f4907940ef324fcb9",
};

l1xProvider.core
  .getCurrentNonce(nonceDetails)
  .then((response) => console.log(response)) // log response
  .catch((err) => console.error(err)); // log error

```

{% endcode %}

**Parameters**:

The address of the account for which the nonce needs to be retrieved

```json
{
    "address": "6e371a05d5766c692172744f4907940ef324fcb9"
}
```

**Returns:**

A promise that resolves with the current nonce value.

```json
4
```
