Interface CreatePolicyOptions interface CreatePolicyOptions { idempotencyKey ?: string ; policy : { scope : "project" | "account" ; description ?: string ; rules : (
| { action : "reject" | "accept" ; operation : "signEvmTransaction" ; criteria : (
| { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly (
| {} | {} | (
{ payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; })
)
)
[] ; conditions : { function : string ; params ?: (...)
[] } [] ; } )
[] ; } | { action : "reject" | "accept" ; operation : "signEvmHash" } | { action : "reject" | "accept" ; operation : "signEvmMessage" ; criteria : { type : "evmMessage" ; match : string } [] ; } | { action : "reject" | "accept" ; operation : "signEvmTypedData" ; criteria : (
| { type : "evmTypedDataField" ; types : { types : Record < string , { name : ...
; type : ...
} [] > ; primaryType : string ; } ; conditions : (
| { addresses : (...)
[] ; operator : (...)
| (...)
; path : string } | { value : string ; operator : (...)
| (...)
| (...)
| (...)
| (...)
; path : string ; } | { match : string ; path : string } )
[] ; } | { type : "evmTypedDataVerifyingContract" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } )
[] ; } | { action : "reject" | "accept" ; operation : "sendEvmTransaction" ; criteria : (
| { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : (
"base-sepolia" | "base" )
[] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly (
| {} | {} | (
{ payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; })
)
)
[] ; conditions : { function : string ; params ?: (...)
[] } [] ; } )
[] ; } | { action : "reject" | "accept" ; operation : "signSolTransaction" ; criteria : { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } [] ; } | { action : "reject" | "accept" ; operation : "prepareUserOperation" ; criteria : (
| { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : (
"base-sepolia" | "base" )
[] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly (
| {} | {} | (
{ payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; })
)
)
[] ; conditions : { function : string ; params ?: (...)
[] } [] ; } )
[] ; } | { action : "reject" | "accept" ; operation : "sendUserOperation" ; criteria : (
| { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly (
| {} | {} | (
{ payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; })
)
)
[] ; conditions : { function : string ; params ?: (...)
[] } [] ; } )
[] ; } )
[] ; } ; } Properties Optional
idempotency Key idempotencyKey ?: string
policy policy : { scope : "project" | "account" ; description ?: string ; rules : ( | { action : "reject" | "accept" ; operation : "signEvmTransaction" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "signEvmHash" } | { action : "reject" | "accept" ; operation : "signEvmMessage" ; criteria : { type : "evmMessage" ; match : string } [] ; } | { action : "reject" | "accept" ; operation : "signEvmTypedData" ; criteria : ( | { type : "evmTypedDataField" ; types : { types : Record < string , { name : ...; type : ... } [] > ; primaryType : string ; } ; conditions : ( | { addresses : (...)[] ; operator : (...) | (...); path : string } | { value : string ; operator : (...) | (...) | (...) | (...) | (...); path : string ; } | { match : string ; path : string } )[] ; } | { type : "evmTypedDataVerifyingContract" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } )[] ; } | { action : "reject" | "accept" ; operation : "sendEvmTransaction" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : ("base-sepolia" | "base" )[] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "signSolTransaction" ; criteria : { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } [] ; } | { action : "reject" | "accept" ; operation : "prepareUserOperation" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : ("base-sepolia" | "base" )[] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "sendUserOperation" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } )[] ; }
Type declaration scope : "project" | "account" Optional
description ?: string rules : ( | { action : "reject" | "accept" ; operation : "signEvmTransaction" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "signEvmHash" } | { action : "reject" | "accept" ; operation : "signEvmMessage" ; criteria : { type : "evmMessage" ; match : string } [] ; } | { action : "reject" | "accept" ; operation : "signEvmTypedData" ; criteria : ( | { type : "evmTypedDataField" ; types : { types : Record < string , { name : ...; type : ... } [] > ; primaryType : string ; } ; conditions : ( | { addresses : (...)[] ; operator : (...) | (...); path : string } | { value : string ; operator : (...) | (...) | (...) | (...) | (...); path : string ; } | { match : string ; path : string } )[] ; } | { type : "evmTypedDataVerifyingContract" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } )[] ; } | { action : "reject" | "accept" ; operation : "sendEvmTransaction" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : ("base-sepolia" | "base" )[] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "signSolTransaction" ; criteria : { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } [] ; } | { action : "reject" | "accept" ; operation : "prepareUserOperation" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : ("base-sepolia" | "base" )[] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "sendUserOperation" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmData" ; abi : | "erc20" | "erc721" | "erc1155" | readonly ( | {} | {} | ( { payable?: boolean | undefined; constant?: boolean | undefined; gas?: number | undefined; } & ({ inputs: readonly AbiParameter[]; outputs: readonly AbiParameter[]; type: "function"; name: string; stateMutability: "pure" | ... 2 more ... | "payable"; } | { ...; } | { ...; } | { ...; }) ) )[] ; conditions : { function : string ; params ?: (...)[] } [] ; } )[] ; } )[]
Options for creating a Policy.