Sign Messages and Send Transactions
Human Wallet makes it easy to sign messages and send transactions across all supported EVM-compatible blockchains. The SDK abstracts away cryptographic complexity and gas management, while remaining fully compatible with standard Ethereum interfaces.
Overview​
- Message Signing: Sign arbitrary messages for authentication, off-chain actions, or user intent verification.
- Transaction Sending: Send EVM transactions (including contract calls and token transfers) with a unified interface.
- Multi-Chain Support: Works seamlessly across all supported EVM chains, with automatic chain switching and gas management via the Gas Tank.
Usage​
All signing and transaction methods are available via the SilkProvider
object returned by initSilk()
from the @silk-wallet/silk-wallet-sdk
package.
import { initSilk } from "@silk-wallet/silk-wallet-sdk";
const silk = initSilk();
Message Signing​
signMessage
​
Sign an arbitrary message with the user’s Human Wallet key. This is useful for authentication, off-chain actions, or verifying user intent.
const signature = await silk.request({
method: "personal_sign",
params: [message, address],
});
- message: The string message to sign.
- address: The user’s EVM address.
Note: The signature is EIP-191 compliant and can be verified using standard Ethereum libraries.
Advanced: Typed Data Signing​
signTypedData
​
Sign EIP-712 typed data (structured data) for advanced use cases like DeFi, DAOs, and more.
const signature = await silk.request({
method: "eth_signTypedData_v4",
params: [address, typedData],
});
- address: The user’s address.
- typedData: The EIP-712 typed data object.
Security and User Experience​
- User Consent: All signing and transaction actions require explicit user approval via the Human Wallet modal.
- No Private Key Exposure: Private keys never leave the secure enclave; all signing is performed in a secure, isolated environment.
- Multi-Chain: The SDK handles chain switching and ensures transactions are sent to the correct network.
Developer Portal​
For more details, integration guides, and advanced usage, visit the Human Wallet Developer Portal.
Sending Transactions​
sendTransaction
​
Send a transaction (ETH transfer, contract call, etc.) from the user’s Human Wallet.
const txHash = await silk.request({
method: "eth_sendTransaction",
params: [
{
from: address,
to: recipient,
value: "0x...", // hex-encoded value in wei
data: "0x...", // optional, for contract calls
gas: "0x...", // optional, estimated automatically if omitted
chainId: 1, // optional, defaults to current chain
},
],
});
- from: The user’s address (must match the logged-in Human Wallet).
- to: The recipient address.
- value: Amount of ETH (in wei, hex-encoded).
- data: (Optional) Contract call data.
- gas: (Optional) Gas limit.
- chainId: (Optional) EVM chain ID.
Features:
- Human Wallet will prompt the user to review and approve the transaction.
- Works across all supported chains.
- Gas fees can automatically managed via the Gas Tank (no need to hold native tokens).