signMessage
signMessage(message: string, opts: { address: string }) -> <Promise<{ signedMessage: string | null; signerAddress: string; } & { error?: string; }>>
The signed message from the response is a base64 encoded string of the signature. Verification Example:
const kp = <signing key pair>
const res = await stellarApi.signMessage("hi", { networkPassphrase: SorobanClient.Networks.TESTNET })
const passes = kp.verify(Buffer.from("hi", "base64"), Buffer.from(res.signedMessage, "base64")) // true
signMessage
method:
Enter message to sign:
Enter network passphrase (optional):
Request signature from specific public key (optional):
Result:Signer address: