Skip to Content
WaaP for AppsSign Messages and Data

Sign Messages and Data

WaaP makes it easy to sign messages and data. The SDK abstracts away cryptographic complexity while remaining fully compatible with standard interfaces on each chain.

Sign a Personal Message

personal_sign

Sign an arbitrary message with the user’s WaaP wallet. This is useful for authentication, off-chain actions, or verifying user intent.

All signing methods are available via the WaapProvider object returned by initWaaP() from the @human.tech/waap-sdk package.

import { initWaaP } from "@human.tech/waap-sdk"; initWaaP();
// message example const message = 'Hello World!'; const signature = await window.waap.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.

Demo


Advanced: Typed Data Signing

EVM only. Neither Sui nor Solana has an equivalent to EIP-712 typed data signing.

eth_signTypedData_v4

Sign EIP-712 typed data (structured data) for advanced use cases like DeFi, DAOs, and more.

// typedData example const typedData = { types: { EIP712Domain: [ { name: 'name', type: 'string' }, { name: 'version', type: 'string' }, { name: 'chainId', type: 'uint256' }, { name: 'verifyingContract', type: 'address' } ], Message: [ { name: 'content', type: 'string' }, { name: 'timestamp', type: 'uint256' } ] }, primaryType: 'Message', domain: { name: 'WaaP Demo', version: '1', chainId: 1, verifyingContract: '0x0000000000000000000000000000000000000000' }, message: { content: 'Hello World!', timestamp: Math.floor(Date.now() / 1000) } }; const signature = await window.waap.request({ method: "eth_signTypedData_v4", params: [address, JSON.stringify(typedData)], });
  • address: The user’s address.
  • typedData: The EIP-712 typed data object.

Demo


Security and User Experience

  • User Consent: All signing and transaction actions require explicit user approval via the WaaP modal.
  • No Private Key Exposure: Signing keys are held inside a Trusted Execution Environment and never reach the browser. Your dapp never sees key material, and neither does the user’s device.
  • Policy-Gated: Every request is authorized by the Policy Engine before signing, against the user’s spend limits, risk thresholds, and 2FA settings.
  • Multi-Chain: The SDK handles chain switching and ensures transactions are sent to the correct network.
Last updated on