Authentication

getVerificationMessage(nonce: string) : Promise<SignInMessage>

This methods returns a message that will be checked by our api.

If you do not pass a nonce that your backend has requested from our API it will automatically fetch one.

Visually it opens the user's wallet and asks them to sign a message. If the user have still not connected their wallet it prompts them to do so.

The format and content of the message is set according to EIP-4391 : Sign In With Ethereum. You can find the reference implementation here.

SignInMessage

This is a plain JS object containing the necessary information to verify ownership of a wallet.

interface  SignInMessage {
	address: string;
	domain: string;
	version: string;
	chainId: number;
	uri: string;
	nonce: string;
	issuedAt: string;
	signature: string;
}