signMessage
Signs a message with a wallet account using ECDSA with SHA-256.
Parameters
1. message (required)
string | Base64Encoded
The message to sign.
2. account (optional)
UInt160
The account script hash to sign with. If omitted, the wallet may select or prompt for an account.
3. options (optional)
SignOptions
type SignOptions = {
isBase64Encoded?: boolean;
isTypedData?: boolean;
isLedgerCompatible?: boolean;
};Returns
Promise<SignedMessage>
Errors
Code
Name
Description
10002
INVALID
The message or options are invalid.
10003
NOTFOUND
The specified signing account cannot be found.
10005
TIMEOUT
The signing request timed out.
10006
CANCELED
The user rejected the signature request.
Example
Request
Response
最后更新于