Skip to content

generateSiweNonce

Generates random EIP-4361 nonce.

Import

import { generateSiweNonce } from 'viem/siwe'

Usage

import { generateSiweNonce } from 'viem/siwe'
 
const nonce = generateSiweNonce()

Returns

string

A randomly generated EIP-4361 nonce.