Skip to main content

sign

Sign any message with the connected wallet.

Usage

Create a message to be signed and pass it to this method.

This will prompt the user to sign the message from their wallet (or sign it automatically if initialized with a private key).

Once signed, the signature is returned.

// This is the message to be signed
const message = "Sign this message...";

// Now we can sign the message with the connected wallet
const signature = await sdk.wallet.sign(message);

Configuration

message

The message to be signed.

const message = "Sign this message...";

Return Value

Returns a string with the signature.

string;