Interface UpdatePolicyOptions interface UpdatePolicyOptions { id : string ; policy : { description ?: string ; rules : (
| { action : "reject" | "accept" ; operation : "signEvmTransaction" ; criteria : (
| { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "netUSDChange" ; changeCents : number ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { 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" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ethereum" | "ethereum-sepolia" )
[] ; operator : "in" | "not in" ; } | { type : "netUSDChange" ; changeCents : number ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { 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 : "prepareUserOperation" ; criteria : (
| { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : (
| "base-sepolia" | "base" | "arbitrum" | "optimism" | "zora" | "polygon" | "bnb" | "avalanche" | "ethereum" | "ethereum-sepolia" )
[] ; 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 ?: (...)
[] } [] ; } )
[] ; } | { action : "reject" | "accept" ; operation : "signSolTransaction" ; criteria : (
| { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solValue" ; solValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "splAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "splValue" ; splValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "mintAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solData" ; idls : (
| "SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | objectOutputType < { address : ...
; instructions : ...
} , ZodTypeAny , "passthrough" , > )
[] ; conditions : { instruction : string ; params ?: (...)
[] } [] ; } | { type : "programId" ; programIds : string [] ; operator : "in" | "not in" ; } )
[] ; } | { action : "reject" | "accept" ; operation : "sendSolTransaction" ; criteria : (
| { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solValue" ; solValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "splAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "splValue" ; splValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "mintAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solData" ; idls : (
| "SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | objectOutputType < { address : ...
; instructions : ...
} , ZodTypeAny , "passthrough" , > )
[] ; conditions : { instruction : string ; params ?: (...)
[] } [] ; } | { type : "programId" ; programIds : string [] ; operator : "in" | "not in" ; } | { type : "solNetwork" ; networks : (
"solana-devnet" | "solana" )
[] ; operator : "in" | "not in" ; } )
[] ; } | { action : "reject" | "accept" ; operation : "signSolMessage" ; criteria : { type : "solMessage" ; match : string } [] ; } )
[] ; } ; idempotencyKey ?: string ; } Properties policy policy : { description ?: string ; rules : ( | { action : "reject" | "accept" ; operation : "signEvmTransaction" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "netUSDChange" ; changeCents : number ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { 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" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ethereum" | "ethereum-sepolia" )[] ; operator : "in" | "not in" ; } | { type : "netUSDChange" ; changeCents : number ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { 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 : "prepareUserOperation" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : ( | "base-sepolia" | "base" | "arbitrum" | "optimism" | "zora" | "polygon" | "bnb" | "avalanche" | "ethereum" | "ethereum-sepolia" )[] ; 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 ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "signSolTransaction" ; criteria : ( | { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solValue" ; solValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "splAddress" ; addresses : string [] ; operator : "in" | "not in" } | { type : "splValue" ; splValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "mintAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solData" ; idls : ( | "SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | objectOutputType < { address : ...; instructions : ... } , ZodTypeAny , "passthrough" , > )[] ; conditions : { instruction : string ; params ?: (...)[] } [] ; } | { type : "programId" ; programIds : string [] ; operator : "in" | "not in" } )[] ; } | { action : "reject" | "accept" ; operation : "sendSolTransaction" ; criteria : ( | { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solValue" ; solValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "splAddress" ; addresses : string [] ; operator : "in" | "not in" } | { type : "splValue" ; splValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "mintAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solData" ; idls : ( | "SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | objectOutputType < { address : ...; instructions : ... } , ZodTypeAny , "passthrough" , > )[] ; conditions : { instruction : string ; params ?: (...)[] } [] ; } | { type : "programId" ; programIds : string [] ; operator : "in" | "not in" } | { type : "solNetwork" ; networks : ("solana-devnet" | "solana" )[] ; operator : "in" | "not in" ; } )[] ; } | { action : "reject" | "accept" ; operation : "signSolMessage" ; criteria : { type : "solMessage" ; match : string } [] ; } )[] ; }
Type declaration 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 : "netUSDChange" ; changeCents : number ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { 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" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ethereum" | "ethereum-sepolia" )[] ; operator : "in" | "not in" ; } | { type : "netUSDChange" ; changeCents : number ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { 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 : "prepareUserOperation" ; criteria : ( | { type : "ethValue" ; ethValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "evmAddress" ; addresses : ` 0x ${ string } ` [] ; operator : "in" | "not in" ; } | { type : "evmNetwork" ; networks : ( | "base-sepolia" | "base" | "arbitrum" | "optimism" | "zora" | "polygon" | "bnb" | "avalanche" | "ethereum" | "ethereum-sepolia" )[] ; 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 ?: (...)[] } [] ; } )[] ; } | { action : "reject" | "accept" ; operation : "signSolTransaction" ; criteria : ( | { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solValue" ; solValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "splAddress" ; addresses : string [] ; operator : "in" | "not in" } | { type : "splValue" ; splValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "mintAddress" ; addresses : string [] ; operator : "in" | "not in" } | { type : "solData" ; idls : ( | "SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | objectOutputType < { address : ...; instructions : ... } , ZodTypeAny , "passthrough" , > )[] ; conditions : { instruction : string ; params ?: (...)[] } [] ; } | { type : "programId" ; programIds : string [] ; operator : "in" | "not in" } )[] ; } | { action : "reject" | "accept" ; operation : "sendSolTransaction" ; criteria : ( | { type : "solAddress" ; addresses : string [] ; operator : "in" | "not in" ; } | { type : "solValue" ; solValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "splAddress" ; addresses : string [] ; operator : "in" | "not in" } | { type : "splValue" ; splValue : string ; operator : ">" | ">=" | "<" | "<=" | "==" ; } | { type : "mintAddress" ; addresses : string [] ; operator : "in" | "not in" } | { type : "solData" ; idls : ( | "SystemProgram" | "TokenProgram" | "AssociatedTokenProgram" | objectOutputType < { address : ...; instructions : ... } , ZodTypeAny , "passthrough" , > )[] ; conditions : { instruction : string ; params ?: (...)[] } [] ; } | { type : "programId" ; programIds : string [] ; operator : "in" | "not in" } | { type : "solNetwork" ; networks : ("solana-devnet" | "solana" )[] ; operator : "in" | "not in" ; } )[] ; } | { action : "reject" | "accept" ; operation : "signSolMessage" ; criteria : { type : "solMessage" ; match : string } [] ; } )[] Optional
idempotency Key idempotencyKey ?: string
Options for updating a Policy.