Sign Message from Wallet App
Signs a message using a wallet app (like Phantom, Solflare, etc.) instead of a local keypair.
Returns: Promise<string>
(base58 encoded signature)
const signature = await connection.signMessageFromWalletApp({
message: "Hello, Solana!",
walletApp: walletApp, // TransactionSendingSigner from your wallet app
});
Options
message
:string
- The message to signwalletApp
:TransactionSendingSigner
- The wallet app signer to use for signing
Examples
Sign a message using a wallet app:
const signature = await connection.signMessageFromWalletApp({
message: "Hello, Solana!",
walletApp: walletApp,
});
See also: Send Transaction from Instructions with Wallet App
Last updated on