UserWallet.recoverAddress() method
Recover the signing address from a signed message
Example
const message = "Sign this message...";
const signature = await sdk.wallet.sign(message);
// Now we can recover the signing address
const address = sdk.wallet.recoverAddress(message, signature);
Signature:
recoverAddress(message: string, signature: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
message | string | the original message that was signed |
signature | string | the signature to recover the address from |
Returns:
string
the address that signed the message