交易和签名
使用 EVM provider 处理交易、personal message 和 typed data。
发送交易

const [from] = await window.ethereum.request({
method: 'eth_requestAccounts',
});
const hash = await window.ethereum.request({
method: 'eth_sendTransaction',
params: [
{
from,
to: '0x0000000000000000000000000000000000000000',
value: '0x0',
data: '0x',
},
],
});
Personal 签名
const signature = await window.ethereum.request({
method: 'personal_sign',
params: ['0x48656c6c6f2050616c69', from],
});
Typed data 签名

const signature = await window.ethereum.request({
method: 'eth_signTypedData_v4',
params: [from, JSON.stringify(typedData)],
});
Pali 会在显示签名弹窗前验证 typed data 结构。dapp 应使用规范的 EIP-712 JSON,并避免依赖钱包特定的解析怪癖。
智能账户和签名
Pali 智能账户通过活跃的验证器模块批准交易和签名流程。用户仍然需要在 Pali 中批准。如果验证器基于 passkey,浏览器或操作系统也会显示 WebAuthn 提示。