Interfaces

CreatePolicyOptions

Defined in: src/client/policies/policies.types.ts:53 Options for creating a Policy.

Properties

idempotencyKey?
optional idempotencyKey: string;
Defined in: src/client/policies/policies.types.ts:58 The idempotency key to ensure the request is processed exactly once. Used to safely retry requests without accidentally performing the same operation twice.
policy
policy: {
  description?: string;
  rules: (
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        changeCents: number;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "netUSDChange";
      }
        | {
        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: "evmData";
     })[];
     operation: "signEvmTransaction";
   }
     | {
     action: "reject" | "accept";
     operation: "signEvmHash";
   }
     | {
     action: "reject" | "accept";
     criteria: {
        match: string;
        type: "evmMessage";
     }[];
     operation: "signEvmMessage";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        conditions: (
           | {
           addresses: ...[];
           operator: ... | ...;
           path: string;
         }
           | {
           operator: ... | ... | ... | ... | ...;
           path: string;
           value: string;
         }
           | {
           match: string;
           path: string;
        })[];
        type: "evmTypedDataField";
        types: {
           primaryType: string;
           types: Record<string, {
              name: ...;
              type: ...;
           }[]>;
        };
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmTypedDataVerifyingContract";
     })[];
     operation: "signEvmTypedData";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        networks: (
           | "base-sepolia"
           | "base"
           | "arbitrum"
           | "optimism"
           | "polygon"
           | "avalanche"
           | "ethereum"
          | "ethereum-sepolia")[];
        operator: "in" | "not in";
        type: "evmNetwork";
      }
        | {
        changeCents: number;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "netUSDChange";
      }
        | {
        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: "evmData";
     })[];
     operation: "sendEvmTransaction";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        networks: (
           | "base-sepolia"
           | "base"
           | "arbitrum"
           | "optimism"
           | "zora"
           | "polygon"
           | "bnb"
           | "avalanche"
           | "ethereum"
          | "ethereum-sepolia")[];
        operator: "in" | "not in";
        type: "evmNetwork";
      }
        | {
        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: "evmData";
     })[];
     operation: "prepareUserOperation";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        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: "evmData";
     })[];
     operation: "sendUserOperation";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "solAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        solValue: string;
        type: "solValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "splAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        splValue: string;
        type: "splValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "mintAddress";
      }
        | {
        conditions: {
           instruction: string;
           params?: ...[];
        }[];
        idls: (
           | "SystemProgram"
           | "TokenProgram"
           | "AssociatedTokenProgram"
           | objectOutputType<{
           address: ...;
           instructions: ...;
        }, ZodTypeAny, "passthrough">)[];
        type: "solData";
     })[];
     operation: "signSolTransaction";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "solAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        solValue: string;
        type: "solValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "splAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        splValue: string;
        type: "splValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "mintAddress";
      }
        | {
        conditions: {
           instruction: string;
           params?: ...[];
        }[];
        idls: (
           | "SystemProgram"
           | "TokenProgram"
           | "AssociatedTokenProgram"
           | objectOutputType<{
           address: ...;
           instructions: ...;
        }, ZodTypeAny, "passthrough">)[];
        type: "solData";
     })[];
     operation: "sendSolTransaction";
  })[];
  scope: "project" | "account";
};
Defined in: src/client/policies/policies.types.ts:63 The policy definition to create. Contains the scope, description, and rules for the policy.
description?
optional description: string;
An optional human-readable description for the policy. Limited to 50 characters of alphanumeric characters, spaces, commas, and periods.
rules
rules: (
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     changeCents: number;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "netUSDChange";
   }
     | {
     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: "evmData";
  })[];
  operation: "signEvmTransaction";
}
  | {
  action: "reject" | "accept";
  operation: "signEvmHash";
}
  | {
  action: "reject" | "accept";
  criteria: {
     match: string;
     type: "evmMessage";
  }[];
  operation: "signEvmMessage";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     conditions: (
        | {
        addresses: ...[];
        operator: ... | ...;
        path: string;
      }
        | {
        operator: ... | ... | ... | ... | ...;
        path: string;
        value: string;
      }
        | {
        match: string;
        path: string;
     })[];
     type: "evmTypedDataField";
     types: {
        primaryType: string;
        types: Record<string, {
           name: ...;
           type: ...;
        }[]>;
     };
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmTypedDataVerifyingContract";
  })[];
  operation: "signEvmTypedData";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     networks: (
        | "base-sepolia"
        | "base"
        | "arbitrum"
        | "optimism"
        | "polygon"
        | "avalanche"
        | "ethereum"
       | "ethereum-sepolia")[];
     operator: "in" | "not in";
     type: "evmNetwork";
   }
     | {
     changeCents: number;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "netUSDChange";
   }
     | {
     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: "evmData";
  })[];
  operation: "sendEvmTransaction";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     networks: (
        | "base-sepolia"
        | "base"
        | "arbitrum"
        | "optimism"
        | "zora"
        | "polygon"
        | "bnb"
        | "avalanche"
        | "ethereum"
       | "ethereum-sepolia")[];
     operator: "in" | "not in";
     type: "evmNetwork";
   }
     | {
     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: "evmData";
  })[];
  operation: "prepareUserOperation";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     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: "evmData";
  })[];
  operation: "sendUserOperation";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "solAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     solValue: string;
     type: "solValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "splAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     splValue: string;
     type: "splValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "mintAddress";
   }
     | {
     conditions: {
        instruction: string;
        params?: ...[];
     }[];
     idls: (
        | "SystemProgram"
        | "TokenProgram"
        | "AssociatedTokenProgram"
        | objectOutputType<{
        address: ...;
        instructions: ...;
     }, ZodTypeAny, "passthrough">)[];
     type: "solData";
  })[];
  operation: "signSolTransaction";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "solAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     solValue: string;
     type: "solValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "splAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     splValue: string;
     type: "splValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "mintAddress";
   }
     | {
     conditions: {
        instruction: string;
        params?: ...[];
     }[];
     idls: (
        | "SystemProgram"
        | "TokenProgram"
        | "AssociatedTokenProgram"
        | objectOutputType<{
        address: ...;
        instructions: ...;
     }, ZodTypeAny, "passthrough">)[];
     type: "solData";
  })[];
  operation: "sendSolTransaction";
})[];
Array of rules that comprise the policy. Limited to a maximum of 10 rules per policy.
scope
scope: "project" | "account" = PolicyScopeEnum;
The scope of the policy. “project” applies to the entire project, “account” applies to specific accounts.

DeletePolicyOptions

Defined in: src/client/policies/policies.types.ts:80 Options for deleting a Policy.

Properties

id
id: string;
Defined in: src/client/policies/policies.types.ts:85 The unique identifier of the policy to delete. This is a UUID that’s generated when the policy is created.
idempotencyKey?
optional idempotencyKey: string;
Defined in: src/client/policies/policies.types.ts:90 The idempotency key to ensure the request is processed exactly once. Used to safely retry requests without accidentally performing the same operation twice.

GetPolicyByIdOptions

Defined in: src/client/policies/policies.types.ts:69 Options for retrieving a Policy by ID.

Properties

id
id: string;
Defined in: src/client/policies/policies.types.ts:74 The unique identifier of the policy to retrieve. This is a UUID that’s generated when the policy is created.

ListPoliciesOptions

Defined in: src/client/policies/policies.types.ts:26

Properties

pageSize?
optional pageSize: number;
Defined in: src/client/policies/policies.types.ts:28 The page size to paginate through the accounts.
pageToken?
optional pageToken: string;
Defined in: src/client/policies/policies.types.ts:30 The page token to paginate through the accounts.
scope?
optional scope: "project" | "account";
Defined in: src/client/policies/policies.types.ts:34 The scope of the policies to return. If project, the response will include exactly one policy, which is the project-level policy. If account, the response will include all account-level policies for the developer’s CDP Project.

ListPoliciesResult

Defined in: src/client/policies/policies.types.ts:40 The result of listing policies.

Properties

nextPageToken?
optional nextPageToken: string;
Defined in: src/client/policies/policies.types.ts:47 The next page token to paginate through the policies. If undefined, there are no more policies to paginate through.
policies
policies: Policy[];
Defined in: src/client/policies/policies.types.ts:42 The list of policies matching the query parameters.

UpdatePolicyOptions

Defined in: src/client/policies/policies.types.ts:96 Options for updating a Policy.

Properties

id
id: string;
Defined in: src/client/policies/policies.types.ts:101 The unique identifier of the policy to update. This is a UUID that’s generated when the policy is created.
idempotencyKey?
optional idempotencyKey: string;
Defined in: src/client/policies/policies.types.ts:111 The idempotency key to ensure the request is processed exactly once. Used to safely retry requests without accidentally performing the same operation twice.
policy
policy: {
  description?: string;
  rules: (
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        changeCents: number;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "netUSDChange";
      }
        | {
        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: "evmData";
     })[];
     operation: "signEvmTransaction";
   }
     | {
     action: "reject" | "accept";
     operation: "signEvmHash";
   }
     | {
     action: "reject" | "accept";
     criteria: {
        match: string;
        type: "evmMessage";
     }[];
     operation: "signEvmMessage";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        conditions: (
           | {
           addresses: ...[];
           operator: ... | ...;
           path: string;
         }
           | {
           operator: ... | ... | ... | ... | ...;
           path: string;
           value: string;
         }
           | {
           match: string;
           path: string;
        })[];
        type: "evmTypedDataField";
        types: {
           primaryType: string;
           types: Record<string, {
              name: ...;
              type: ...;
           }[]>;
        };
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmTypedDataVerifyingContract";
     })[];
     operation: "signEvmTypedData";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        networks: (
           | "base-sepolia"
           | "base"
           | "arbitrum"
           | "optimism"
           | "polygon"
           | "avalanche"
           | "ethereum"
          | "ethereum-sepolia")[];
        operator: "in" | "not in";
        type: "evmNetwork";
      }
        | {
        changeCents: number;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "netUSDChange";
      }
        | {
        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: "evmData";
     })[];
     operation: "sendEvmTransaction";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        networks: (
           | "base-sepolia"
           | "base"
           | "arbitrum"
           | "optimism"
           | "zora"
           | "polygon"
           | "bnb"
           | "avalanche"
           | "ethereum"
          | "ethereum-sepolia")[];
        operator: "in" | "not in";
        type: "evmNetwork";
      }
        | {
        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: "evmData";
     })[];
     operation: "prepareUserOperation";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        ethValue: string;
        operator: ">" | ">=" | "<" | "<=" | "==";
        type: "ethValue";
      }
        | {
        addresses: `0x${string}`[];
        operator: "in" | "not in";
        type: "evmAddress";
      }
        | {
        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: "evmData";
     })[];
     operation: "sendUserOperation";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "solAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        solValue: string;
        type: "solValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "splAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        splValue: string;
        type: "splValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "mintAddress";
      }
        | {
        conditions: {
           instruction: string;
           params?: ...[];
        }[];
        idls: (
           | "SystemProgram"
           | "TokenProgram"
           | "AssociatedTokenProgram"
           | objectOutputType<{
           address: ...;
           instructions: ...;
        }, ZodTypeAny, "passthrough">)[];
        type: "solData";
     })[];
     operation: "signSolTransaction";
   }
     | {
     action: "reject" | "accept";
     criteria: (
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "solAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        solValue: string;
        type: "solValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "splAddress";
      }
        | {
        operator: ">" | ">=" | "<" | "<=" | "==";
        splValue: string;
        type: "splValue";
      }
        | {
        addresses: string[];
        operator: "in" | "not in";
        type: "mintAddress";
      }
        | {
        conditions: {
           instruction: string;
           params?: ...[];
        }[];
        idls: (
           | "SystemProgram"
           | "TokenProgram"
           | "AssociatedTokenProgram"
           | objectOutputType<{
           address: ...;
           instructions: ...;
        }, ZodTypeAny, "passthrough">)[];
        type: "solData";
     })[];
     operation: "sendSolTransaction";
  })[];
};
Defined in: src/client/policies/policies.types.ts:106 The updated policy definition. Contains the description and rules for the policy.
description?
optional description: string;
An optional human-readable description for the policy. Limited to 50 characters of alphanumeric characters, spaces, commas, and periods.
rules
rules: (
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     changeCents: number;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "netUSDChange";
   }
     | {
     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: "evmData";
  })[];
  operation: "signEvmTransaction";
}
  | {
  action: "reject" | "accept";
  operation: "signEvmHash";
}
  | {
  action: "reject" | "accept";
  criteria: {
     match: string;
     type: "evmMessage";
  }[];
  operation: "signEvmMessage";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     conditions: (
        | {
        addresses: ...[];
        operator: ... | ...;
        path: string;
      }
        | {
        operator: ... | ... | ... | ... | ...;
        path: string;
        value: string;
      }
        | {
        match: string;
        path: string;
     })[];
     type: "evmTypedDataField";
     types: {
        primaryType: string;
        types: Record<string, {
           name: ...;
           type: ...;
        }[]>;
     };
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmTypedDataVerifyingContract";
  })[];
  operation: "signEvmTypedData";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     networks: (
        | "base-sepolia"
        | "base"
        | "arbitrum"
        | "optimism"
        | "polygon"
        | "avalanche"
        | "ethereum"
       | "ethereum-sepolia")[];
     operator: "in" | "not in";
     type: "evmNetwork";
   }
     | {
     changeCents: number;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "netUSDChange";
   }
     | {
     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: "evmData";
  })[];
  operation: "sendEvmTransaction";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     networks: (
        | "base-sepolia"
        | "base"
        | "arbitrum"
        | "optimism"
        | "zora"
        | "polygon"
        | "bnb"
        | "avalanche"
        | "ethereum"
       | "ethereum-sepolia")[];
     operator: "in" | "not in";
     type: "evmNetwork";
   }
     | {
     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: "evmData";
  })[];
  operation: "prepareUserOperation";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     ethValue: string;
     operator: ">" | ">=" | "<" | "<=" | "==";
     type: "ethValue";
   }
     | {
     addresses: `0x${string}`[];
     operator: "in" | "not in";
     type: "evmAddress";
   }
     | {
     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: "evmData";
  })[];
  operation: "sendUserOperation";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "solAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     solValue: string;
     type: "solValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "splAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     splValue: string;
     type: "splValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "mintAddress";
   }
     | {
     conditions: {
        instruction: string;
        params?: ...[];
     }[];
     idls: (
        | "SystemProgram"
        | "TokenProgram"
        | "AssociatedTokenProgram"
        | objectOutputType<{
        address: ...;
        instructions: ...;
     }, ZodTypeAny, "passthrough">)[];
     type: "solData";
  })[];
  operation: "signSolTransaction";
}
  | {
  action: "reject" | "accept";
  criteria: (
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "solAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     solValue: string;
     type: "solValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "splAddress";
   }
     | {
     operator: ">" | ">=" | "<" | "<=" | "==";
     splValue: string;
     type: "splValue";
   }
     | {
     addresses: string[];
     operator: "in" | "not in";
     type: "mintAddress";
   }
     | {
     conditions: {
        instruction: string;
        params?: ...[];
     }[];
     idls: (
        | "SystemProgram"
        | "TokenProgram"
        | "AssociatedTokenProgram"
        | objectOutputType<{
        address: ...;
        instructions: ...;
     }, ZodTypeAny, "passthrough">)[];
     type: "solData";
  })[];
  operation: "sendSolTransaction";
})[];
Array of rules that comprise the policy. Limited to a maximum of 10 rules per policy.

Type Aliases

PoliciesClientInterface

type PoliciesClientInterface = Omit<typeof OpenApiPoliciesMethods, 
  | "createPolicy"
  | "listPolicies"
  | "getPolicyById"
  | "deletePolicy"
  | "updatePolicy"> & {
  createPolicy: (options: CreatePolicyOptions) => Promise<Policy>;
  deletePolicy: (options: DeletePolicyOptions) => Promise<void>;
  getPolicyById: (options: GetPolicyByIdOptions) => Promise<Policy>;
  listPolicies: (options: ListPoliciesOptions) => Promise<ListPoliciesResult>;
  updatePolicy: (options: UpdatePolicyOptions) => Promise<Policy>;
};
Defined in: src/client/policies/policies.types.ts:11 The PoliciesClient type, where all OpenApiPoliciesMethods methods are wrapped.

Type declaration

createPolicy()
createPolicy: (options: CreatePolicyOptions) => Promise<Policy>;
Parameters
options
CreatePolicyOptions
Returns
Promise<Policy>
deletePolicy()
deletePolicy: (options: DeletePolicyOptions) => Promise<void>;
Parameters
options
DeletePolicyOptions
Returns
Promise<void>
getPolicyById()
getPolicyById: (options: GetPolicyByIdOptions) => Promise<Policy>;
Parameters
options
GetPolicyByIdOptions
Returns
Promise<Policy>
listPolicies()
listPolicies: (options: ListPoliciesOptions) => Promise<ListPoliciesResult>;
Parameters
options
ListPoliciesOptions
Returns
Promise<ListPoliciesResult>
updatePolicy()
updatePolicy: (options: UpdatePolicyOptions) => Promise<Policy>;
Parameters
options
UpdatePolicyOptions
Returns
Promise<Policy>