Use the
PrivyClient’s create method from the policies() interface to create a new policy.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
PrivyClient’s create method from the policies() interface to create a new policy.const policy = await privy.policies().create({
name: 'Allow list certain smart contracts',
version: '1.0',
chain_type: 'ethereum',
rules: [
{
name: 'Allowlist OUSD',
method: 'eth_sendTransaction',
action: 'ALLOW',
conditions: [
{
field_source: 'ethereum_transaction',
field: 'to',
operator: 'eq',
value: '0x20c0000000000000000000006a37da5c996874be'
}
]
}
],
owner_id: 'fmfdj6yqly31huorjqzq38zc'
});
Was this page helpful?
