@privy-io/api-types 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/client.d.mts +37 -28
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +37 -28
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/accounts.d.mts +79 -106
  12. package/resources/accounts.d.mts.map +1 -1
  13. package/resources/accounts.d.ts +79 -106
  14. package/resources/accounts.d.ts.map +1 -1
  15. package/resources/accounts.js.map +1 -1
  16. package/resources/accounts.mjs.map +1 -1
  17. package/resources/aggregations.d.mts +18 -392
  18. package/resources/aggregations.d.mts.map +1 -1
  19. package/resources/aggregations.d.ts +18 -392
  20. package/resources/aggregations.d.ts.map +1 -1
  21. package/resources/aggregations.js.map +1 -1
  22. package/resources/aggregations.mjs.map +1 -1
  23. package/resources/apps.d.mts +139 -70
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +139 -70
  26. package/resources/apps.d.ts.map +1 -1
  27. package/resources/apps.js.map +1 -1
  28. package/resources/apps.mjs.map +1 -1
  29. package/resources/client-auth.d.mts +796 -427
  30. package/resources/client-auth.d.mts.map +1 -1
  31. package/resources/client-auth.d.ts +796 -427
  32. package/resources/client-auth.d.ts.map +1 -1
  33. package/resources/client-auth.js.map +1 -1
  34. package/resources/client-auth.mjs.map +1 -1
  35. package/resources/cross-app.d.mts +14 -13
  36. package/resources/cross-app.d.mts.map +1 -1
  37. package/resources/cross-app.d.ts +14 -13
  38. package/resources/cross-app.d.ts.map +1 -1
  39. package/resources/embedded-wallets.d.mts +165 -81
  40. package/resources/embedded-wallets.d.mts.map +1 -1
  41. package/resources/embedded-wallets.d.ts +165 -81
  42. package/resources/embedded-wallets.d.ts.map +1 -1
  43. package/resources/embedded-wallets.js.map +1 -1
  44. package/resources/embedded-wallets.mjs.map +1 -1
  45. package/resources/funding.d.mts +150 -64
  46. package/resources/funding.d.mts.map +1 -1
  47. package/resources/funding.d.ts +150 -64
  48. package/resources/funding.d.ts.map +1 -1
  49. package/resources/funding.js.map +1 -1
  50. package/resources/funding.mjs.map +1 -1
  51. package/resources/index.d.mts +17 -14
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +17 -14
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +7 -1
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +3 -0
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/intents.d.mts +224 -1757
  60. package/resources/intents.d.mts.map +1 -1
  61. package/resources/intents.d.ts +224 -1757
  62. package/resources/intents.d.ts.map +1 -1
  63. package/resources/intents.js.map +1 -1
  64. package/resources/intents.mjs.map +1 -1
  65. package/resources/key-quorums.d.mts +74 -26
  66. package/resources/key-quorums.d.mts.map +1 -1
  67. package/resources/key-quorums.d.ts +74 -26
  68. package/resources/key-quorums.d.ts.map +1 -1
  69. package/resources/key-quorums.js +8 -8
  70. package/resources/key-quorums.js.map +1 -1
  71. package/resources/key-quorums.mjs +8 -8
  72. package/resources/key-quorums.mjs.map +1 -1
  73. package/resources/policies.d.mts +335 -926
  74. package/resources/policies.d.mts.map +1 -1
  75. package/resources/policies.d.ts +335 -926
  76. package/resources/policies.d.ts.map +1 -1
  77. package/resources/policies.js +48 -41
  78. package/resources/policies.js.map +1 -1
  79. package/resources/policies.mjs +48 -41
  80. package/resources/policies.mjs.map +1 -1
  81. package/resources/shared.d.mts +59 -0
  82. package/resources/shared.d.mts.map +1 -0
  83. package/resources/shared.d.ts +59 -0
  84. package/resources/shared.d.ts.map +1 -0
  85. package/resources/shared.js +9 -0
  86. package/resources/shared.js.map +1 -0
  87. package/resources/shared.mjs +5 -0
  88. package/resources/shared.mjs.map +1 -0
  89. package/resources/swaps.d.mts +108 -0
  90. package/resources/swaps.d.mts.map +1 -0
  91. package/resources/swaps.d.ts +108 -0
  92. package/resources/swaps.d.ts.map +1 -0
  93. package/resources/swaps.js +9 -0
  94. package/resources/swaps.js.map +1 -0
  95. package/resources/swaps.mjs +5 -0
  96. package/resources/swaps.mjs.map +1 -0
  97. package/resources/transactions.d.mts +155 -93
  98. package/resources/transactions.d.mts.map +1 -1
  99. package/resources/transactions.d.ts +155 -93
  100. package/resources/transactions.d.ts.map +1 -1
  101. package/resources/users.d.mts +61 -94
  102. package/resources/users.d.mts.map +1 -1
  103. package/resources/users.d.ts +61 -94
  104. package/resources/users.d.ts.map +1 -1
  105. package/resources/users.js.map +1 -1
  106. package/resources/users.mjs.map +1 -1
  107. package/resources/wallet-actions.d.mts +187 -0
  108. package/resources/wallet-actions.d.mts.map +1 -0
  109. package/resources/wallet-actions.d.ts +187 -0
  110. package/resources/wallet-actions.d.ts.map +1 -0
  111. package/resources/wallet-actions.js +9 -0
  112. package/resources/wallet-actions.js.map +1 -0
  113. package/resources/wallet-actions.mjs +5 -0
  114. package/resources/wallet-actions.mjs.map +1 -0
  115. package/resources/wallets/index.d.mts +1 -1
  116. package/resources/wallets/index.d.mts.map +1 -1
  117. package/resources/wallets/index.d.ts +1 -1
  118. package/resources/wallets/index.d.ts.map +1 -1
  119. package/resources/wallets/index.js.map +1 -1
  120. package/resources/wallets/index.mjs.map +1 -1
  121. package/resources/wallets/transactions.d.mts +1 -0
  122. package/resources/wallets/transactions.d.mts.map +1 -1
  123. package/resources/wallets/transactions.d.ts +1 -0
  124. package/resources/wallets/transactions.d.ts.map +1 -1
  125. package/resources/wallets/wallets.d.mts +2377 -971
  126. package/resources/wallets/wallets.d.mts.map +1 -1
  127. package/resources/wallets/wallets.d.ts +2377 -971
  128. package/resources/wallets/wallets.d.ts.map +1 -1
  129. package/resources/wallets/wallets.js +18 -6
  130. package/resources/wallets/wallets.js.map +1 -1
  131. package/resources/wallets/wallets.mjs +18 -6
  132. package/resources/wallets/wallets.mjs.map +1 -1
  133. package/resources/webhooks.d.mts +438 -33
  134. package/resources/webhooks.d.mts.map +1 -1
  135. package/resources/webhooks.d.ts +438 -33
  136. package/resources/webhooks.d.ts.map +1 -1
  137. package/resources/webhooks.js.map +1 -1
  138. package/resources/webhooks.mjs.map +1 -1
  139. package/resources/yield.d.mts +25 -1
  140. package/resources/yield.d.mts.map +1 -1
  141. package/resources/yield.d.ts +25 -1
  142. package/resources/yield.d.ts.map +1 -1
  143. package/src/client.ts +721 -72
  144. package/src/resources/accounts.ts +93 -120
  145. package/src/resources/aggregations.ts +18 -702
  146. package/src/resources/apps.ts +187 -110
  147. package/src/resources/client-auth.ts +1358 -893
  148. package/src/resources/cross-app.ts +19 -15
  149. package/src/resources/embedded-wallets.ts +219 -123
  150. package/src/resources/funding.ts +263 -173
  151. package/src/resources/index.ts +368 -47
  152. package/src/resources/intents.ts +370 -3100
  153. package/src/resources/key-quorums.ts +100 -32
  154. package/src/resources/policies.ts +583 -1558
  155. package/src/resources/shared.ts +79 -0
  156. package/src/resources/swaps.ts +136 -0
  157. package/src/resources/transactions.ts +185 -91
  158. package/src/resources/users.ts +79 -132
  159. package/src/resources/wallet-actions.ts +251 -0
  160. package/src/resources/wallets/index.ts +144 -16
  161. package/src/resources/wallets/transactions.ts +2 -0
  162. package/src/resources/wallets/wallets.ts +2893 -1023
  163. package/src/resources/webhooks.ts +547 -47
  164. package/src/resources/yield.ts +29 -0
  165. package/src/version.ts +1 -1
  166. package/version.d.mts +1 -1
  167. package/version.d.ts +1 -1
  168. package/version.js +1 -1
  169. package/version.mjs +1 -1
@@ -1,5 +1,6 @@
1
1
  import { APIResource } from "../core/resource.js";
2
2
  import * as PoliciesAPI from "./policies.js";
3
+ import * as SharedAPI from "./shared.js";
3
4
  import * as WalletsAPI from "./wallets/wallets.js";
4
5
  import { APIPromise } from "../core/api-promise.js";
5
6
  import { RequestOptions } from "../internal/request-options.js";
@@ -40,48 +41,49 @@ export declare class Policies extends APIResource {
40
41
  *
41
42
  * @example
42
43
  * ```ts
43
- * const response = await client.policies._createRule(
44
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
45
- * {
46
- * action: 'ALLOW',
47
- * conditions: [
48
- * {
49
- * field: 'to',
50
- * field_source: 'ethereum_transaction',
51
- * operator: 'eq',
52
- * value: 'string',
53
- * },
54
- * ],
55
- * method: 'eth_sendTransaction',
56
- * name: 'x',
57
- * },
58
- * );
44
+ * const policyRuleResponse =
45
+ * await client.policies._createRule(
46
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
47
+ * {
48
+ * action: 'ALLOW',
49
+ * conditions: [
50
+ * {
51
+ * field: 'to',
52
+ * field_source: 'ethereum_transaction',
53
+ * operator: 'eq',
54
+ * value: 'string',
55
+ * },
56
+ * ],
57
+ * method: 'eth_sendTransaction',
58
+ * name: 'x',
59
+ * },
60
+ * );
59
61
  * ```
60
62
  */
61
- _createRule(policyID: string, params: PolicyCreateRuleParams, options?: RequestOptions): APIPromise<PolicyCreateRuleResponse>;
63
+ _createRule(policyID: string, params: PolicyCreateRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
62
64
  /**
63
65
  * Delete a policy by policy ID.
64
66
  *
65
67
  * @example
66
68
  * ```ts
67
- * const response = await client.policies._delete(
69
+ * const successResponse = await client.policies._delete(
68
70
  * 'xxxxxxxxxxxxxxxxxxxxxxxx',
69
71
  * );
70
72
  * ```
71
73
  */
72
- _delete(policyID: string, params?: PolicyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<PolicyDeleteResponse>;
74
+ _delete(policyID: string, params?: PolicyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
73
75
  /**
74
76
  * Delete a rule by policy ID and rule ID.
75
77
  *
76
78
  * @example
77
79
  * ```ts
78
- * const response = await client.policies._deleteRule(
80
+ * const successResponse = await client.policies._deleteRule(
79
81
  * 'xxxxxxxxxxxxxxxxxxxxxxxx',
80
82
  * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
81
83
  * );
82
84
  * ```
83
85
  */
84
- _deleteRule(ruleID: string, params: PolicyDeleteRuleParams, options?: RequestOptions): APIPromise<PolicyDeleteRuleResponse>;
86
+ _deleteRule(ruleID: string, params: PolicyDeleteRuleParams, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
85
87
  /**
86
88
  * Update a policy by policy ID.
87
89
  *
@@ -98,26 +100,27 @@ export declare class Policies extends APIResource {
98
100
  *
99
101
  * @example
100
102
  * ```ts
101
- * const response = await client.policies._updateRule(
102
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
103
- * {
104
- * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
105
- * action: 'ALLOW',
106
- * conditions: [
107
- * {
108
- * field: 'to',
109
- * field_source: 'ethereum_transaction',
110
- * operator: 'eq',
111
- * value: 'string',
112
- * },
113
- * ],
114
- * method: 'eth_sendTransaction',
115
- * name: 'x',
116
- * },
117
- * );
103
+ * const policyRuleResponse =
104
+ * await client.policies._updateRule(
105
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
106
+ * {
107
+ * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
108
+ * action: 'ALLOW',
109
+ * conditions: [
110
+ * {
111
+ * field: 'to',
112
+ * field_source: 'ethereum_transaction',
113
+ * operator: 'eq',
114
+ * value: 'string',
115
+ * },
116
+ * ],
117
+ * method: 'eth_sendTransaction',
118
+ * name: 'x',
119
+ * },
120
+ * );
118
121
  * ```
119
122
  */
120
- _updateRule(ruleID: string, params: PolicyUpdateRuleParams, options?: RequestOptions): APIPromise<PolicyUpdateRuleResponse>;
123
+ _updateRule(ruleID: string, params: PolicyUpdateRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
121
124
  /**
122
125
  * Get a policy by policy ID.
123
126
  *
@@ -134,13 +137,163 @@ export declare class Policies extends APIResource {
134
137
  *
135
138
  * @example
136
139
  * ```ts
137
- * const response = await client.policies.getRule(
140
+ * const policyRuleResponse = await client.policies.getRule(
138
141
  * 'xxxxxxxxxxxxxxxxxxxxxxxx',
139
142
  * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
140
143
  * );
141
144
  * ```
142
145
  */
143
- getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyGetRuleResponse>;
146
+ getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
147
+ }
148
+ /**
149
+ * Unique ID of the condition set to take actions on.
150
+ */
151
+ export interface ConditionSetRequestParams {
152
+ condition_set_id: string;
153
+ }
154
+ /**
155
+ * Unique IDs of the condition set and the condition set item within the condition
156
+ * set to take actions on.
157
+ */
158
+ export interface ConditionSetItemRequestParams {
159
+ condition_set_id: string;
160
+ condition_set_item_id: string;
161
+ }
162
+ /**
163
+ * Request body for creating a condition set.
164
+ */
165
+ export interface ConditionSetRequestBody {
166
+ /**
167
+ * Name to assign to condition set.
168
+ */
169
+ name: string;
170
+ /**
171
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
172
+ * null to remove the current owner.
173
+ */
174
+ owner?: SharedAPI.OwnerInput | null;
175
+ /**
176
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
177
+ * not specify an owner.
178
+ */
179
+ owner_id?: SharedAPI.OwnerIDInput | null;
180
+ }
181
+ /**
182
+ * A condition set for grouping related condition values.
183
+ */
184
+ export interface ConditionSet {
185
+ /**
186
+ * Unique ID of the created condition set. This will be the primary identifier when
187
+ * using the condition set in the future.
188
+ */
189
+ id: string;
190
+ /**
191
+ * Unix timestamp of when the condition set was created in milliseconds.
192
+ */
193
+ created_at: number;
194
+ /**
195
+ * Name of the condition set.
196
+ */
197
+ name: string;
198
+ /**
199
+ * A unique identifier for a key quorum.
200
+ */
201
+ owner_id: SharedAPI.KeyQuorumID;
202
+ }
203
+ /**
204
+ * Request body for updating a condition set.
205
+ */
206
+ export interface UpdateConditionSetRequestBody {
207
+ /**
208
+ * Name to assign to condition set.
209
+ */
210
+ name?: string;
211
+ /**
212
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
213
+ * null to remove the current owner.
214
+ */
215
+ owner?: SharedAPI.OwnerInput | null;
216
+ /**
217
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
218
+ * not specify an owner.
219
+ */
220
+ owner_id?: SharedAPI.OwnerIDInput | null;
221
+ }
222
+ /**
223
+ * A single value to add to a condition set.
224
+ */
225
+ export interface ConditionSetItemValueInput {
226
+ value: string;
227
+ }
228
+ /**
229
+ * Array of values to add to the condition set. Maximum 100 items per request.
230
+ */
231
+ export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
232
+ /**
233
+ * A single item in a condition set.
234
+ */
235
+ export interface ConditionSetItem {
236
+ /**
237
+ * Unique ID of the created condition set item.
238
+ */
239
+ id: string;
240
+ /**
241
+ * Unique ID of the condition set this item belongs to.
242
+ */
243
+ condition_set_id: string;
244
+ /**
245
+ * Unix timestamp of when the condition set item was created in milliseconds.
246
+ */
247
+ created_at: number;
248
+ /**
249
+ * The value stored in this condition set item.
250
+ */
251
+ value: string;
252
+ }
253
+ /**
254
+ * Array of condition set items.
255
+ */
256
+ export type ConditionSetItems = Array<ConditionSetItem>;
257
+ /**
258
+ * Paginated list of condition set items.
259
+ */
260
+ export interface ConditionSetItemsResponse {
261
+ /**
262
+ * List of condition set items.
263
+ */
264
+ items: Array<ConditionSetItem>;
265
+ /**
266
+ * Cursor for pagination. Null if there are no more items.
267
+ */
268
+ next_cursor: string | null;
269
+ }
270
+ /**
271
+ * The action to take when a policy rule matches.
272
+ */
273
+ export type PolicyAction = 'ALLOW' | 'DENY';
274
+ /**
275
+ * A parameter in a Solidity ABI function or event definition.
276
+ */
277
+ export interface AbiParameter {
278
+ type: string;
279
+ components?: Array<unknown>;
280
+ indexed?: boolean;
281
+ internalType?: string;
282
+ name?: string;
283
+ }
284
+ /**
285
+ * A Solidity ABI definition for decoding smart contract calldata.
286
+ */
287
+ export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
288
+ export declare namespace AbiSchema {
289
+ interface AbiSchemaItem {
290
+ type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
291
+ anonymous?: boolean;
292
+ inputs?: Array<PoliciesAPI.AbiParameter>;
293
+ name?: string;
294
+ outputs?: Array<PoliciesAPI.AbiParameter>;
295
+ stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
296
+ }
144
297
  }
145
298
  /**
146
299
  * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
@@ -165,6 +318,19 @@ export interface TronTransactionCondition {
165
318
  operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
166
319
  value: string | Array<string>;
167
320
  }
321
+ /**
322
+ * Decoded calldata from a TRON TriggerSmartContract interaction.
323
+ */
324
+ export interface TronCalldataCondition {
325
+ /**
326
+ * A Solidity ABI definition for decoding smart contract calldata.
327
+ */
328
+ abi: AbiSchema;
329
+ field: string;
330
+ field_source: 'tron_trigger_smart_contract_data';
331
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
332
+ value: string | Array<string>;
333
+ }
168
334
  /**
169
335
  * SUI transaction command attributes, enables allowlisting specific command types.
170
336
  * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
@@ -198,178 +364,20 @@ export interface SuiTransferObjectsCommandCondition {
198
364
  value: string | Array<string>;
199
365
  }
200
366
  /**
201
- * A policy for controlling wallet operations.
367
+ * Condition referencing an aggregation value. The field must start with
368
+ * "aggregation." followed by the aggregation ID.
202
369
  */
203
- export interface Policy {
204
- /**
205
- * Unique ID of the created policy. This will be the primary identifier when using
206
- * the policy in the future.
207
- */
208
- id: string;
209
- /**
210
- * The chain type the policy applies to.
211
- */
212
- chain_type: 'ethereum' | 'solana' | 'tron' | 'sui';
213
- /**
214
- * Unix timestamp of when the policy was created in milliseconds.
215
- */
216
- created_at: number;
217
- /**
218
- * Name to assign to policy.
219
- */
220
- name: string;
221
- /**
222
- * The key quorum ID of the owner of the policy.
223
- */
224
- owner_id: string | null;
225
- rules: Array<Policy.Rule>;
226
- /**
227
- * Version of the policy. Currently, 1.0 is the only version.
228
- */
229
- version: '1.0';
230
- }
231
- export declare namespace Policy {
232
- /**
233
- * A rule that defines the conditions and action to take if the conditions are
234
- * true.
235
- */
236
- interface Rule {
237
- id: string;
238
- /**
239
- * Action to take if the conditions are true.
240
- */
241
- action: 'ALLOW' | 'DENY';
242
- conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition | PoliciesAPI.TronTransactionCondition | PoliciesAPI.SuiTransactionCommandCondition | PoliciesAPI.SuiTransferObjectsCommandCondition>;
243
- /**
244
- * Method the rule applies to.
245
- */
246
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
247
- name: string;
248
- }
249
- namespace Rule {
250
- /**
251
- * The verbatim Ethereum transaction object in an eth_signTransaction or
252
- * eth_sendTransaction request.
253
- */
254
- interface EthereumTransactionCondition {
255
- field: 'to' | 'value' | 'chain_id';
256
- field_source: 'ethereum_transaction';
257
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
258
- value: string | Array<string>;
259
- }
260
- /**
261
- * The decoded calldata in a smart contract interaction as the smart contract
262
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
263
- * an abi parameter with the JSON ABI of the smart contract.
264
- */
265
- interface EthereumCalldataCondition {
266
- abi: unknown;
267
- field: string;
268
- field_source: 'ethereum_calldata';
269
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
270
- value: string | Array<string>;
271
- }
272
- /**
273
- * Attributes from the signing domain that will verify the signature.
274
- */
275
- interface EthereumTypedDataDomainCondition {
276
- field: 'chainId' | 'verifyingContract';
277
- field_source: 'ethereum_typed_data_domain';
278
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
279
- value: string | Array<string>;
280
- }
281
- /**
282
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
283
- * EIP-712.
284
- */
285
- interface EthereumTypedDataMessageCondition {
286
- field: string;
287
- field_source: 'ethereum_typed_data_message';
288
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
289
- typed_data: EthereumTypedDataMessageCondition.TypedData;
290
- value: string | Array<string>;
291
- }
292
- namespace EthereumTypedDataMessageCondition {
293
- interface TypedData {
294
- primary_type: string;
295
- types: {
296
- [key: string]: Array<TypedData.Type>;
297
- };
298
- }
299
- namespace TypedData {
300
- interface Type {
301
- name: string;
302
- type: string;
303
- }
304
- }
305
- }
306
- /**
307
- * Allowed contract addresses for eth_sign7702Authorization requests.
308
- */
309
- interface Ethereum7702AuthorizationCondition {
310
- field: 'contract';
311
- field_source: 'ethereum_7702_authorization';
312
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
313
- value: string | Array<string>;
314
- }
315
- /**
316
- * Solana Program attributes, enables allowlisting Solana Programs.
317
- */
318
- interface SolanaProgramInstructionCondition {
319
- field: 'programId';
320
- field_source: 'solana_program_instruction';
321
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
322
- value: string | Array<string>;
323
- }
324
- /**
325
- * Solana System Program attributes, including more granular Transfer instruction
326
- * fields.
327
- */
328
- interface SolanaSystemProgramInstructionCondition {
329
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
330
- field_source: 'solana_system_program_instruction';
331
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
332
- value: string | Array<string>;
333
- }
334
- /**
335
- * Solana Token Program attributes, including more granular TransferChecked
336
- * instruction fields.
337
- */
338
- interface SolanaTokenProgramInstructionCondition {
339
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
340
- field_source: 'solana_token_program_instruction';
341
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
342
- value: string | Array<string>;
343
- }
344
- /**
345
- * System attributes, including current unix timestamp (in seconds).
346
- */
347
- interface SystemCondition {
348
- field: 'current_unix_timestamp';
349
- field_source: 'system';
350
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
351
- value: string | Array<string>;
352
- }
353
- }
370
+ export interface AggregationCondition {
371
+ field: string;
372
+ field_source: 'reference';
373
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
374
+ value: string | Array<string>;
354
375
  }
355
376
  /**
356
- * A rule that defines the conditions and action to take if the conditions are
357
- * true.
377
+ * A condition that must be true for the rule action to be applied.
358
378
  */
359
- export interface PolicyCreateRuleResponse {
360
- id: string;
361
- /**
362
- * Action to take if the conditions are true.
363
- */
364
- action: 'ALLOW' | 'DENY';
365
- conditions: Array<PolicyCreateRuleResponse.EthereumTransactionCondition | PolicyCreateRuleResponse.EthereumCalldataCondition | PolicyCreateRuleResponse.EthereumTypedDataDomainCondition | PolicyCreateRuleResponse.EthereumTypedDataMessageCondition | PolicyCreateRuleResponse.Ethereum7702AuthorizationCondition | PolicyCreateRuleResponse.SolanaProgramInstructionCondition | PolicyCreateRuleResponse.SolanaSystemProgramInstructionCondition | PolicyCreateRuleResponse.SolanaTokenProgramInstructionCondition | PolicyCreateRuleResponse.SystemCondition | TronTransactionCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition>;
366
- /**
367
- * Method the rule applies to.
368
- */
369
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
370
- name: string;
371
- }
372
- export declare namespace PolicyCreateRuleResponse {
379
+ export type PolicyCondition = PolicyCondition.EthereumTransactionCondition | PolicyCondition.EthereumCalldataCondition | PolicyCondition.EthereumTypedDataDomainCondition | PolicyCondition.EthereumTypedDataMessageCondition | PolicyCondition.Ethereum7702AuthorizationCondition | PolicyCondition.SolanaProgramInstructionCondition | PolicyCondition.SolanaSystemProgramInstructionCondition | PolicyCondition.SolanaTokenProgramInstructionCondition | PolicyCondition.SystemCondition | TronTransactionCondition | TronCalldataCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition | AggregationCondition;
380
+ export declare namespace PolicyCondition {
373
381
  /**
374
382
  * The verbatim Ethereum transaction object in an eth_signTransaction or
375
383
  * eth_sendTransaction request.
@@ -386,7 +394,10 @@ export declare namespace PolicyCreateRuleResponse {
386
394
  * an abi parameter with the JSON ABI of the smart contract.
387
395
  */
388
396
  interface EthereumCalldataCondition {
389
- abi: unknown;
397
+ /**
398
+ * A Solidity ABI definition for decoding smart contract calldata.
399
+ */
400
+ abi: PoliciesAPI.AbiSchema;
390
401
  field: string;
391
402
  field_source: 'ethereum_calldata';
392
403
  operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
@@ -396,7 +407,7 @@ export declare namespace PolicyCreateRuleResponse {
396
407
  * Attributes from the signing domain that will verify the signature.
397
408
  */
398
409
  interface EthereumTypedDataDomainCondition {
399
- field: 'chainId' | 'verifyingContract';
410
+ field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
400
411
  field_source: 'ethereum_typed_data_domain';
401
412
  operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
402
413
  value: string | Array<string>;
@@ -415,15 +426,10 @@ export declare namespace PolicyCreateRuleResponse {
415
426
  namespace EthereumTypedDataMessageCondition {
416
427
  interface TypedData {
417
428
  primary_type: string;
418
- types: {
419
- [key: string]: Array<TypedData.Type>;
420
- };
421
- }
422
- namespace TypedData {
423
- interface Type {
424
- name: string;
425
- type: string;
426
- }
429
+ /**
430
+ * The type definitions for EIP-712 typed data signing.
431
+ */
432
+ types: WalletsAPI.TypedDataTypesInputParams;
427
433
  }
428
434
  }
429
435
  /**
@@ -459,7 +465,7 @@ export declare namespace PolicyCreateRuleResponse {
459
465
  * instruction fields.
460
466
  */
461
467
  interface SolanaTokenProgramInstructionCondition {
462
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
468
+ field: 'instructionName' | 'Transfer.source' | 'Transfer.destination' | 'Transfer.authority' | 'Transfer.amount' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint' | 'Burn.account' | 'Burn.mint' | 'Burn.authority' | 'Burn.amount' | 'MintTo.mint' | 'MintTo.account' | 'MintTo.authority' | 'MintTo.amount' | 'CloseAccount.account' | 'CloseAccount.destination' | 'CloseAccount.authority' | 'InitializeAccount3.account' | 'InitializeAccount3.mint' | 'InitializeAccount3.owner';
463
469
  field_source: 'solana_token_program_instruction';
464
470
  operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
465
471
  value: string | Array<string>;
@@ -474,267 +480,116 @@ export declare namespace PolicyCreateRuleResponse {
474
480
  value: string | Array<string>;
475
481
  }
476
482
  }
477
- export interface PolicyDeleteResponse {
483
+ /**
484
+ * Method the rule applies to.
485
+ */
486
+ export type PolicyMethod = 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'wallet_sendCalls' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'exportSeedPhrase' | 'signTransactionBytes' | '*';
487
+ /**
488
+ * The rules that apply to each method the policy covers.
489
+ */
490
+ export interface PolicyRuleRequestBody {
478
491
  /**
479
- * Whether the policy was deleted successfully.
492
+ * The action to take when a policy rule matches.
480
493
  */
481
- success: boolean;
482
- }
483
- export interface PolicyDeleteRuleResponse {
494
+ action: PolicyAction;
495
+ conditions: Array<PolicyCondition>;
484
496
  /**
485
- * Whether the rule was deleted successfully.
497
+ * Method the rule applies to.
486
498
  */
487
- success: boolean;
499
+ method: PolicyMethod;
500
+ name: string;
488
501
  }
489
502
  /**
490
503
  * A rule that defines the conditions and action to take if the conditions are
491
504
  * true.
492
505
  */
493
- export interface PolicyUpdateRuleResponse {
506
+ export interface PolicyRuleResponse {
494
507
  id: string;
495
508
  /**
496
- * Action to take if the conditions are true.
509
+ * The action to take when a policy rule matches.
497
510
  */
498
- action: 'ALLOW' | 'DENY';
499
- conditions: Array<PolicyUpdateRuleResponse.EthereumTransactionCondition | PolicyUpdateRuleResponse.EthereumCalldataCondition | PolicyUpdateRuleResponse.EthereumTypedDataDomainCondition | PolicyUpdateRuleResponse.EthereumTypedDataMessageCondition | PolicyUpdateRuleResponse.Ethereum7702AuthorizationCondition | PolicyUpdateRuleResponse.SolanaProgramInstructionCondition | PolicyUpdateRuleResponse.SolanaSystemProgramInstructionCondition | PolicyUpdateRuleResponse.SolanaTokenProgramInstructionCondition | PolicyUpdateRuleResponse.SystemCondition | TronTransactionCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition>;
511
+ action: PolicyAction;
512
+ conditions: Array<PolicyCondition>;
500
513
  /**
501
514
  * Method the rule applies to.
502
515
  */
503
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
516
+ method: PolicyMethod;
504
517
  name: string;
505
518
  }
506
- export declare namespace PolicyUpdateRuleResponse {
519
+ /**
520
+ * A policy for controlling wallet operations.
521
+ */
522
+ export interface Policy {
507
523
  /**
508
- * The verbatim Ethereum transaction object in an eth_signTransaction or
509
- * eth_sendTransaction request.
524
+ * Unique ID of the created policy. This will be the primary identifier when using
525
+ * the policy in the future.
510
526
  */
511
- interface EthereumTransactionCondition {
512
- field: 'to' | 'value' | 'chain_id';
513
- field_source: 'ethereum_transaction';
514
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
515
- value: string | Array<string>;
516
- }
527
+ id: string;
517
528
  /**
518
- * The decoded calldata in a smart contract interaction as the smart contract
519
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
520
- * an abi parameter with the JSON ABI of the smart contract.
529
+ * The wallet chain types.
521
530
  */
522
- interface EthereumCalldataCondition {
523
- abi: unknown;
524
- field: string;
525
- field_source: 'ethereum_calldata';
526
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
527
- value: string | Array<string>;
528
- }
531
+ chain_type: WalletsAPI.WalletChainType;
529
532
  /**
530
- * Attributes from the signing domain that will verify the signature.
533
+ * Unix timestamp of when the policy was created in milliseconds.
531
534
  */
532
- interface EthereumTypedDataDomainCondition {
533
- field: 'chainId' | 'verifyingContract';
534
- field_source: 'ethereum_typed_data_domain';
535
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
536
- value: string | Array<string>;
537
- }
535
+ created_at: number;
538
536
  /**
539
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
540
- * EIP-712.
537
+ * Name to assign to policy.
541
538
  */
542
- interface EthereumTypedDataMessageCondition {
543
- field: string;
544
- field_source: 'ethereum_typed_data_message';
545
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
546
- typed_data: EthereumTypedDataMessageCondition.TypedData;
547
- value: string | Array<string>;
548
- }
549
- namespace EthereumTypedDataMessageCondition {
550
- interface TypedData {
551
- primary_type: string;
552
- types: {
553
- [key: string]: Array<TypedData.Type>;
554
- };
555
- }
556
- namespace TypedData {
557
- interface Type {
558
- name: string;
559
- type: string;
560
- }
561
- }
562
- }
539
+ name: string;
563
540
  /**
564
- * Allowed contract addresses for eth_sign7702Authorization requests.
541
+ * The key quorum ID of the owner of the policy.
565
542
  */
566
- interface Ethereum7702AuthorizationCondition {
567
- field: 'contract';
568
- field_source: 'ethereum_7702_authorization';
569
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
570
- value: string | Array<string>;
571
- }
572
- /**
573
- * Solana Program attributes, enables allowlisting Solana Programs.
574
- */
575
- interface SolanaProgramInstructionCondition {
576
- field: 'programId';
577
- field_source: 'solana_program_instruction';
578
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
579
- value: string | Array<string>;
580
- }
581
- /**
582
- * Solana System Program attributes, including more granular Transfer instruction
583
- * fields.
584
- */
585
- interface SolanaSystemProgramInstructionCondition {
586
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
587
- field_source: 'solana_system_program_instruction';
588
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
589
- value: string | Array<string>;
590
- }
591
- /**
592
- * Solana Token Program attributes, including more granular TransferChecked
593
- * instruction fields.
594
- */
595
- interface SolanaTokenProgramInstructionCondition {
596
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
597
- field_source: 'solana_token_program_instruction';
598
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
599
- value: string | Array<string>;
600
- }
543
+ owner_id: string | null;
544
+ rules: Array<PolicyRuleResponse>;
601
545
  /**
602
- * System attributes, including current unix timestamp (in seconds).
546
+ * Version of the policy. Currently, 1.0 is the only version.
603
547
  */
604
- interface SystemCondition {
605
- field: 'current_unix_timestamp';
606
- field_source: 'system';
607
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
608
- value: string | Array<string>;
609
- }
548
+ version: '1.0';
610
549
  }
611
550
  /**
612
- * A rule that defines the conditions and action to take if the conditions are
613
- * true.
551
+ * Headers required to authorize modifications to policies.
614
552
  */
615
- export interface PolicyGetRuleResponse {
616
- id: string;
617
- /**
618
- * Action to take if the conditions are true.
619
- */
620
- action: 'ALLOW' | 'DENY';
621
- conditions: Array<PolicyGetRuleResponse.EthereumTransactionCondition | PolicyGetRuleResponse.EthereumCalldataCondition | PolicyGetRuleResponse.EthereumTypedDataDomainCondition | PolicyGetRuleResponse.EthereumTypedDataMessageCondition | PolicyGetRuleResponse.Ethereum7702AuthorizationCondition | PolicyGetRuleResponse.SolanaProgramInstructionCondition | PolicyGetRuleResponse.SolanaSystemProgramInstructionCondition | PolicyGetRuleResponse.SolanaTokenProgramInstructionCondition | PolicyGetRuleResponse.SystemCondition | TronTransactionCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition>;
622
- /**
623
- * Method the rule applies to.
624
- */
625
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
626
- name: string;
627
- }
628
- export declare namespace PolicyGetRuleResponse {
629
- /**
630
- * The verbatim Ethereum transaction object in an eth_signTransaction or
631
- * eth_sendTransaction request.
632
- */
633
- interface EthereumTransactionCondition {
634
- field: 'to' | 'value' | 'chain_id';
635
- field_source: 'ethereum_transaction';
636
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
637
- value: string | Array<string>;
638
- }
639
- /**
640
- * The decoded calldata in a smart contract interaction as the smart contract
641
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
642
- * an abi parameter with the JSON ABI of the smart contract.
643
- */
644
- interface EthereumCalldataCondition {
645
- abi: unknown;
646
- field: string;
647
- field_source: 'ethereum_calldata';
648
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
649
- value: string | Array<string>;
650
- }
553
+ export interface PolicyAuthorizationHeaders {
651
554
  /**
652
- * Attributes from the signing domain that will verify the signature.
555
+ * ID of your Privy app.
653
556
  */
654
- interface EthereumTypedDataDomainCondition {
655
- field: 'chainId' | 'verifyingContract';
656
- field_source: 'ethereum_typed_data_domain';
657
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
658
- value: string | Array<string>;
659
- }
557
+ 'privy-app-id': string;
660
558
  /**
661
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
662
- * EIP-712.
663
- */
664
- interface EthereumTypedDataMessageCondition {
665
- field: string;
666
- field_source: 'ethereum_typed_data_message';
667
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
668
- typed_data: EthereumTypedDataMessageCondition.TypedData;
669
- value: string | Array<string>;
670
- }
671
- namespace EthereumTypedDataMessageCondition {
672
- interface TypedData {
673
- primary_type: string;
674
- types: {
675
- [key: string]: Array<TypedData.Type>;
676
- };
677
- }
678
- namespace TypedData {
679
- interface Type {
680
- name: string;
681
- type: string;
682
- }
683
- }
684
- }
685
- /**
686
- * Allowed contract addresses for eth_sign7702Authorization requests.
559
+ * Request authorization signature. If multiple signatures are required, they
560
+ * should be comma separated.
687
561
  */
688
- interface Ethereum7702AuthorizationCondition {
689
- field: 'contract';
690
- field_source: 'ethereum_7702_authorization';
691
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
692
- value: string | Array<string>;
693
- }
562
+ 'privy-authorization-signature'?: string;
694
563
  /**
695
- * Solana Program attributes, enables allowlisting Solana Programs.
564
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
565
+ * deadline by which the request must be processed.
696
566
  */
697
- interface SolanaProgramInstructionCondition {
698
- field: 'programId';
699
- field_source: 'solana_program_instruction';
700
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
701
- value: string | Array<string>;
702
- }
567
+ 'privy-request-expiry'?: string;
568
+ }
569
+ /**
570
+ * Headers required to authorize modifications to condition sets.
571
+ */
572
+ export interface ConditionSetAuthorizationHeaders {
703
573
  /**
704
- * Solana System Program attributes, including more granular Transfer instruction
705
- * fields.
574
+ * ID of your Privy app.
706
575
  */
707
- interface SolanaSystemProgramInstructionCondition {
708
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
709
- field_source: 'solana_system_program_instruction';
710
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
711
- value: string | Array<string>;
712
- }
576
+ 'privy-app-id': string;
713
577
  /**
714
- * Solana Token Program attributes, including more granular TransferChecked
715
- * instruction fields.
578
+ * Request authorization signature. If multiple signatures are required, they
579
+ * should be comma separated.
716
580
  */
717
- interface SolanaTokenProgramInstructionCondition {
718
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
719
- field_source: 'solana_token_program_instruction';
720
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
721
- value: string | Array<string>;
722
- }
581
+ 'privy-authorization-signature'?: string;
723
582
  /**
724
- * System attributes, including current unix timestamp (in seconds).
583
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
584
+ * deadline by which the request must be processed.
725
585
  */
726
- interface SystemCondition {
727
- field: 'current_unix_timestamp';
728
- field_source: 'system';
729
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
730
- value: string | Array<string>;
731
- }
586
+ 'privy-request-expiry'?: string;
732
587
  }
733
588
  export interface PolicyCreateParams {
734
589
  /**
735
- * Body param: The chain type the policy applies to.
590
+ * Body param: The wallet chain types.
736
591
  */
737
- chain_type: 'ethereum' | 'solana' | 'tron' | 'sui';
592
+ chain_type: WalletsAPI.WalletChainType;
738
593
  /**
739
594
  * Body param: Name to assign to policy.
740
595
  */
@@ -748,15 +603,15 @@ export interface PolicyCreateParams {
748
603
  */
749
604
  version: '1.0';
750
605
  /**
751
- * Body param: The owner of the resource. If you provide this, do not specify an
752
- * owner_id as it will be generated automatically. When updating a wallet, you can
753
- * set the owner to null to remove the owner.
606
+ * Body param: The owner of the resource, specified as a Privy user ID, a P-256
607
+ * public key, or null to remove the current owner.
754
608
  */
755
- owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
609
+ owner?: SharedAPI.OwnerInput | null;
756
610
  /**
757
- * Body param
611
+ * Body param: The key quorum ID to set as the owner of the resource. If you
612
+ * provide this, do not specify an owner.
758
613
  */
759
- owner_id?: string | null;
614
+ owner_id?: SharedAPI.OwnerIDInput | null;
760
615
  /**
761
616
  * Header param: Idempotency keys ensure API requests are executed only once within
762
617
  * a 24-hour window.
@@ -764,156 +619,33 @@ export interface PolicyCreateParams {
764
619
  'privy-idempotency-key'?: string;
765
620
  }
766
621
  export declare namespace PolicyCreateParams {
767
- /**
768
- * The rules that apply to each method the policy covers.
769
- */
770
622
  interface Rule {
771
623
  /**
772
- * Action to take if the conditions are true.
624
+ * The action to take when a policy rule matches.
773
625
  */
774
- action: 'ALLOW' | 'DENY';
775
- conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition | PoliciesAPI.TronTransactionCondition | PoliciesAPI.SuiTransactionCommandCondition | PoliciesAPI.SuiTransferObjectsCommandCondition>;
626
+ action: PoliciesAPI.PolicyAction;
627
+ conditions: Array<PoliciesAPI.PolicyCondition>;
776
628
  /**
777
629
  * Method the rule applies to.
778
630
  */
779
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
631
+ method: PoliciesAPI.PolicyMethod;
780
632
  name: string;
781
- }
782
- namespace Rule {
783
- /**
784
- * The verbatim Ethereum transaction object in an eth_signTransaction or
785
- * eth_sendTransaction request.
786
- */
787
- interface EthereumTransactionCondition {
788
- field: 'to' | 'value' | 'chain_id';
789
- field_source: 'ethereum_transaction';
790
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
791
- value: string | Array<string>;
792
- }
793
- /**
794
- * The decoded calldata in a smart contract interaction as the smart contract
795
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
796
- * an abi parameter with the JSON ABI of the smart contract.
797
- */
798
- interface EthereumCalldataCondition {
799
- abi: unknown;
800
- field: string;
801
- field_source: 'ethereum_calldata';
802
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
803
- value: string | Array<string>;
804
- }
805
- /**
806
- * Attributes from the signing domain that will verify the signature.
807
- */
808
- interface EthereumTypedDataDomainCondition {
809
- field: 'chainId' | 'verifyingContract';
810
- field_source: 'ethereum_typed_data_domain';
811
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
812
- value: string | Array<string>;
813
- }
814
- /**
815
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
816
- * EIP-712.
817
- */
818
- interface EthereumTypedDataMessageCondition {
819
- field: string;
820
- field_source: 'ethereum_typed_data_message';
821
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
822
- typed_data: EthereumTypedDataMessageCondition.TypedData;
823
- value: string | Array<string>;
824
- }
825
- namespace EthereumTypedDataMessageCondition {
826
- interface TypedData {
827
- primary_type: string;
828
- types: {
829
- [key: string]: Array<TypedData.Type>;
830
- };
831
- }
832
- namespace TypedData {
833
- interface Type {
834
- name: string;
835
- type: string;
836
- }
837
- }
838
- }
839
- /**
840
- * Allowed contract addresses for eth_sign7702Authorization requests.
841
- */
842
- interface Ethereum7702AuthorizationCondition {
843
- field: 'contract';
844
- field_source: 'ethereum_7702_authorization';
845
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
846
- value: string | Array<string>;
847
- }
848
- /**
849
- * Solana Program attributes, enables allowlisting Solana Programs.
850
- */
851
- interface SolanaProgramInstructionCondition {
852
- field: 'programId';
853
- field_source: 'solana_program_instruction';
854
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
855
- value: string | Array<string>;
856
- }
857
- /**
858
- * Solana System Program attributes, including more granular Transfer instruction
859
- * fields.
860
- */
861
- interface SolanaSystemProgramInstructionCondition {
862
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
863
- field_source: 'solana_system_program_instruction';
864
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
865
- value: string | Array<string>;
866
- }
867
- /**
868
- * Solana Token Program attributes, including more granular TransferChecked
869
- * instruction fields.
870
- */
871
- interface SolanaTokenProgramInstructionCondition {
872
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
873
- field_source: 'solana_token_program_instruction';
874
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
875
- value: string | Array<string>;
876
- }
877
- /**
878
- * System attributes, including current unix timestamp (in seconds).
879
- */
880
- interface SystemCondition {
881
- field: 'current_unix_timestamp';
882
- field_source: 'system';
883
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
884
- value: string | Array<string>;
885
- }
886
- }
887
- /**
888
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
889
- * If you provide this, do not specify an owner_id as it will be generated
890
- * automatically.
891
- */
892
- interface PublicKeyOwner {
893
- public_key: string;
894
- }
895
- /**
896
- * The user ID of the owner of the resource. The user must already exist, and this
897
- * value must start with "did:privy:". If you provide this, do not specify an
898
- * owner_id as it will be generated automatically.
899
- */
900
- interface UserOwner {
901
- user_id: string;
633
+ id?: string;
902
634
  }
903
635
  }
904
636
  export interface PolicyCreateRuleParams {
905
637
  /**
906
- * Body param: Action to take if the conditions are true.
638
+ * Body param: The action to take when a policy rule matches.
907
639
  */
908
- action: 'ALLOW' | 'DENY';
640
+ action: PolicyAction;
909
641
  /**
910
642
  * Body param
911
643
  */
912
- conditions: Array<PolicyCreateRuleParams.EthereumTransactionCondition | PolicyCreateRuleParams.EthereumCalldataCondition | PolicyCreateRuleParams.EthereumTypedDataDomainCondition | PolicyCreateRuleParams.EthereumTypedDataMessageCondition | PolicyCreateRuleParams.Ethereum7702AuthorizationCondition | PolicyCreateRuleParams.SolanaProgramInstructionCondition | PolicyCreateRuleParams.SolanaSystemProgramInstructionCondition | PolicyCreateRuleParams.SolanaTokenProgramInstructionCondition | PolicyCreateRuleParams.SystemCondition | TronTransactionCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition>;
644
+ conditions: Array<PolicyCondition>;
913
645
  /**
914
646
  * Body param: Method the rule applies to.
915
647
  */
916
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
648
+ method: PolicyMethod;
917
649
  /**
918
650
  * Body param
919
651
  */
@@ -923,111 +655,11 @@ export interface PolicyCreateRuleParams {
923
655
  * required, they should be comma separated.
924
656
  */
925
657
  'privy-authorization-signature'?: string;
926
- }
927
- export declare namespace PolicyCreateRuleParams {
928
- /**
929
- * The verbatim Ethereum transaction object in an eth_signTransaction or
930
- * eth_sendTransaction request.
931
- */
932
- interface EthereumTransactionCondition {
933
- field: 'to' | 'value' | 'chain_id';
934
- field_source: 'ethereum_transaction';
935
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
936
- value: string | Array<string>;
937
- }
938
- /**
939
- * The decoded calldata in a smart contract interaction as the smart contract
940
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
941
- * an abi parameter with the JSON ABI of the smart contract.
942
- */
943
- interface EthereumCalldataCondition {
944
- abi: unknown;
945
- field: string;
946
- field_source: 'ethereum_calldata';
947
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
948
- value: string | Array<string>;
949
- }
950
- /**
951
- * Attributes from the signing domain that will verify the signature.
952
- */
953
- interface EthereumTypedDataDomainCondition {
954
- field: 'chainId' | 'verifyingContract';
955
- field_source: 'ethereum_typed_data_domain';
956
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
957
- value: string | Array<string>;
958
- }
959
- /**
960
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
961
- * EIP-712.
962
- */
963
- interface EthereumTypedDataMessageCondition {
964
- field: string;
965
- field_source: 'ethereum_typed_data_message';
966
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
967
- typed_data: EthereumTypedDataMessageCondition.TypedData;
968
- value: string | Array<string>;
969
- }
970
- namespace EthereumTypedDataMessageCondition {
971
- interface TypedData {
972
- primary_type: string;
973
- types: {
974
- [key: string]: Array<TypedData.Type>;
975
- };
976
- }
977
- namespace TypedData {
978
- interface Type {
979
- name: string;
980
- type: string;
981
- }
982
- }
983
- }
984
- /**
985
- * Allowed contract addresses for eth_sign7702Authorization requests.
986
- */
987
- interface Ethereum7702AuthorizationCondition {
988
- field: 'contract';
989
- field_source: 'ethereum_7702_authorization';
990
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
991
- value: string | Array<string>;
992
- }
993
- /**
994
- * Solana Program attributes, enables allowlisting Solana Programs.
995
- */
996
- interface SolanaProgramInstructionCondition {
997
- field: 'programId';
998
- field_source: 'solana_program_instruction';
999
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1000
- value: string | Array<string>;
1001
- }
1002
- /**
1003
- * Solana System Program attributes, including more granular Transfer instruction
1004
- * fields.
1005
- */
1006
- interface SolanaSystemProgramInstructionCondition {
1007
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1008
- field_source: 'solana_system_program_instruction';
1009
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1010
- value: string | Array<string>;
1011
- }
1012
- /**
1013
- * Solana Token Program attributes, including more granular TransferChecked
1014
- * instruction fields.
1015
- */
1016
- interface SolanaTokenProgramInstructionCondition {
1017
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
1018
- field_source: 'solana_token_program_instruction';
1019
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1020
- value: string | Array<string>;
1021
- }
1022
658
  /**
1023
- * System attributes, including current unix timestamp (in seconds).
659
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
660
+ * representing the deadline by which the request must be processed.
1024
661
  */
1025
- interface SystemCondition {
1026
- field: 'current_unix_timestamp';
1027
- field_source: 'system';
1028
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1029
- value: string | Array<string>;
1030
- }
662
+ 'privy-request-expiry'?: string;
1031
663
  }
1032
664
  export interface PolicyDeleteParams {
1033
665
  /**
@@ -1035,6 +667,11 @@ export interface PolicyDeleteParams {
1035
667
  * should be comma separated.
1036
668
  */
1037
669
  'privy-authorization-signature'?: string;
670
+ /**
671
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
672
+ * deadline by which the request must be processed.
673
+ */
674
+ 'privy-request-expiry'?: string;
1038
675
  }
1039
676
  export interface PolicyDeleteRuleParams {
1040
677
  /**
@@ -1046,6 +683,11 @@ export interface PolicyDeleteRuleParams {
1046
683
  * required, they should be comma separated.
1047
684
  */
1048
685
  'privy-authorization-signature'?: string;
686
+ /**
687
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
688
+ * representing the deadline by which the request must be processed.
689
+ */
690
+ 'privy-request-expiry'?: string;
1049
691
  }
1050
692
  export interface PolicyUpdateParams {
1051
693
  /**
@@ -1053,162 +695,29 @@ export interface PolicyUpdateParams {
1053
695
  */
1054
696
  name?: string;
1055
697
  /**
1056
- * Body param: The owner of the resource. If you provide this, do not specify an
1057
- * owner_id as it will be generated automatically. When updating a wallet, you can
1058
- * set the owner to null to remove the owner.
698
+ * Body param: The owner of the resource, specified as a Privy user ID, a P-256
699
+ * public key, or null to remove the current owner.
1059
700
  */
1060
- owner?: PolicyUpdateParams.PublicKeyOwner | PolicyUpdateParams.UserOwner | null;
701
+ owner?: SharedAPI.OwnerInput | null;
1061
702
  /**
1062
- * Body param
703
+ * Body param: The key quorum ID to set as the owner of the resource. If you
704
+ * provide this, do not specify an owner.
1063
705
  */
1064
- owner_id?: string | null;
706
+ owner_id?: SharedAPI.OwnerIDInput | null;
1065
707
  /**
1066
708
  * Body param
1067
709
  */
1068
- rules?: Array<PolicyUpdateParams.Rule>;
710
+ rules?: Array<PolicyRuleRequestBody>;
1069
711
  /**
1070
712
  * Header param: Request authorization signature. If multiple signatures are
1071
713
  * required, they should be comma separated.
1072
714
  */
1073
715
  'privy-authorization-signature'?: string;
1074
- }
1075
- export declare namespace PolicyUpdateParams {
1076
716
  /**
1077
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
1078
- * If you provide this, do not specify an owner_id as it will be generated
1079
- * automatically.
717
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
718
+ * representing the deadline by which the request must be processed.
1080
719
  */
1081
- interface PublicKeyOwner {
1082
- public_key: string;
1083
- }
1084
- /**
1085
- * The user ID of the owner of the resource. The user must already exist, and this
1086
- * value must start with "did:privy:". If you provide this, do not specify an
1087
- * owner_id as it will be generated automatically.
1088
- */
1089
- interface UserOwner {
1090
- user_id: string;
1091
- }
1092
- /**
1093
- * The rules that apply to each method the policy covers.
1094
- */
1095
- interface Rule {
1096
- /**
1097
- * Action to take if the conditions are true.
1098
- */
1099
- action: 'ALLOW' | 'DENY';
1100
- conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition | PoliciesAPI.TronTransactionCondition | PoliciesAPI.SuiTransactionCommandCondition | PoliciesAPI.SuiTransferObjectsCommandCondition>;
1101
- /**
1102
- * Method the rule applies to.
1103
- */
1104
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
1105
- name: string;
1106
- }
1107
- namespace Rule {
1108
- /**
1109
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1110
- * eth_sendTransaction request.
1111
- */
1112
- interface EthereumTransactionCondition {
1113
- field: 'to' | 'value' | 'chain_id';
1114
- field_source: 'ethereum_transaction';
1115
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1116
- value: string | Array<string>;
1117
- }
1118
- /**
1119
- * The decoded calldata in a smart contract interaction as the smart contract
1120
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1121
- * an abi parameter with the JSON ABI of the smart contract.
1122
- */
1123
- interface EthereumCalldataCondition {
1124
- abi: unknown;
1125
- field: string;
1126
- field_source: 'ethereum_calldata';
1127
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1128
- value: string | Array<string>;
1129
- }
1130
- /**
1131
- * Attributes from the signing domain that will verify the signature.
1132
- */
1133
- interface EthereumTypedDataDomainCondition {
1134
- field: 'chainId' | 'verifyingContract';
1135
- field_source: 'ethereum_typed_data_domain';
1136
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1137
- value: string | Array<string>;
1138
- }
1139
- /**
1140
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1141
- * EIP-712.
1142
- */
1143
- interface EthereumTypedDataMessageCondition {
1144
- field: string;
1145
- field_source: 'ethereum_typed_data_message';
1146
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1147
- typed_data: EthereumTypedDataMessageCondition.TypedData;
1148
- value: string | Array<string>;
1149
- }
1150
- namespace EthereumTypedDataMessageCondition {
1151
- interface TypedData {
1152
- primary_type: string;
1153
- types: {
1154
- [key: string]: Array<TypedData.Type>;
1155
- };
1156
- }
1157
- namespace TypedData {
1158
- interface Type {
1159
- name: string;
1160
- type: string;
1161
- }
1162
- }
1163
- }
1164
- /**
1165
- * Allowed contract addresses for eth_sign7702Authorization requests.
1166
- */
1167
- interface Ethereum7702AuthorizationCondition {
1168
- field: 'contract';
1169
- field_source: 'ethereum_7702_authorization';
1170
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1171
- value: string | Array<string>;
1172
- }
1173
- /**
1174
- * Solana Program attributes, enables allowlisting Solana Programs.
1175
- */
1176
- interface SolanaProgramInstructionCondition {
1177
- field: 'programId';
1178
- field_source: 'solana_program_instruction';
1179
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1180
- value: string | Array<string>;
1181
- }
1182
- /**
1183
- * Solana System Program attributes, including more granular Transfer instruction
1184
- * fields.
1185
- */
1186
- interface SolanaSystemProgramInstructionCondition {
1187
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1188
- field_source: 'solana_system_program_instruction';
1189
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1190
- value: string | Array<string>;
1191
- }
1192
- /**
1193
- * Solana Token Program attributes, including more granular TransferChecked
1194
- * instruction fields.
1195
- */
1196
- interface SolanaTokenProgramInstructionCondition {
1197
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
1198
- field_source: 'solana_token_program_instruction';
1199
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1200
- value: string | Array<string>;
1201
- }
1202
- /**
1203
- * System attributes, including current unix timestamp (in seconds).
1204
- */
1205
- interface SystemCondition {
1206
- field: 'current_unix_timestamp';
1207
- field_source: 'system';
1208
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1209
- value: string | Array<string>;
1210
- }
1211
- }
720
+ 'privy-request-expiry'?: string;
1212
721
  }
1213
722
  export interface PolicyUpdateRuleParams {
1214
723
  /**
@@ -1216,17 +725,17 @@ export interface PolicyUpdateRuleParams {
1216
725
  */
1217
726
  policy_id: string;
1218
727
  /**
1219
- * Body param: Action to take if the conditions are true.
728
+ * Body param: The action to take when a policy rule matches.
1220
729
  */
1221
- action: 'ALLOW' | 'DENY';
730
+ action: PolicyAction;
1222
731
  /**
1223
732
  * Body param
1224
733
  */
1225
- conditions: Array<PolicyUpdateRuleParams.EthereumTransactionCondition | PolicyUpdateRuleParams.EthereumCalldataCondition | PolicyUpdateRuleParams.EthereumTypedDataDomainCondition | PolicyUpdateRuleParams.EthereumTypedDataMessageCondition | PolicyUpdateRuleParams.Ethereum7702AuthorizationCondition | PolicyUpdateRuleParams.SolanaProgramInstructionCondition | PolicyUpdateRuleParams.SolanaSystemProgramInstructionCondition | PolicyUpdateRuleParams.SolanaTokenProgramInstructionCondition | PolicyUpdateRuleParams.SystemCondition | TronTransactionCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition>;
734
+ conditions: Array<PolicyCondition>;
1226
735
  /**
1227
736
  * Body param: Method the rule applies to.
1228
737
  */
1229
- method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
738
+ method: PolicyMethod;
1230
739
  /**
1231
740
  * Body param
1232
741
  */
@@ -1236,116 +745,16 @@ export interface PolicyUpdateRuleParams {
1236
745
  * required, they should be comma separated.
1237
746
  */
1238
747
  'privy-authorization-signature'?: string;
1239
- }
1240
- export declare namespace PolicyUpdateRuleParams {
1241
- /**
1242
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1243
- * eth_sendTransaction request.
1244
- */
1245
- interface EthereumTransactionCondition {
1246
- field: 'to' | 'value' | 'chain_id';
1247
- field_source: 'ethereum_transaction';
1248
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1249
- value: string | Array<string>;
1250
- }
1251
- /**
1252
- * The decoded calldata in a smart contract interaction as the smart contract
1253
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1254
- * an abi parameter with the JSON ABI of the smart contract.
1255
- */
1256
- interface EthereumCalldataCondition {
1257
- abi: unknown;
1258
- field: string;
1259
- field_source: 'ethereum_calldata';
1260
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1261
- value: string | Array<string>;
1262
- }
1263
- /**
1264
- * Attributes from the signing domain that will verify the signature.
1265
- */
1266
- interface EthereumTypedDataDomainCondition {
1267
- field: 'chainId' | 'verifyingContract';
1268
- field_source: 'ethereum_typed_data_domain';
1269
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1270
- value: string | Array<string>;
1271
- }
1272
- /**
1273
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1274
- * EIP-712.
1275
- */
1276
- interface EthereumTypedDataMessageCondition {
1277
- field: string;
1278
- field_source: 'ethereum_typed_data_message';
1279
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1280
- typed_data: EthereumTypedDataMessageCondition.TypedData;
1281
- value: string | Array<string>;
1282
- }
1283
- namespace EthereumTypedDataMessageCondition {
1284
- interface TypedData {
1285
- primary_type: string;
1286
- types: {
1287
- [key: string]: Array<TypedData.Type>;
1288
- };
1289
- }
1290
- namespace TypedData {
1291
- interface Type {
1292
- name: string;
1293
- type: string;
1294
- }
1295
- }
1296
- }
1297
- /**
1298
- * Allowed contract addresses for eth_sign7702Authorization requests.
1299
- */
1300
- interface Ethereum7702AuthorizationCondition {
1301
- field: 'contract';
1302
- field_source: 'ethereum_7702_authorization';
1303
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1304
- value: string | Array<string>;
1305
- }
1306
748
  /**
1307
- * Solana Program attributes, enables allowlisting Solana Programs.
749
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
750
+ * representing the deadline by which the request must be processed.
1308
751
  */
1309
- interface SolanaProgramInstructionCondition {
1310
- field: 'programId';
1311
- field_source: 'solana_program_instruction';
1312
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1313
- value: string | Array<string>;
1314
- }
1315
- /**
1316
- * Solana System Program attributes, including more granular Transfer instruction
1317
- * fields.
1318
- */
1319
- interface SolanaSystemProgramInstructionCondition {
1320
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1321
- field_source: 'solana_system_program_instruction';
1322
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1323
- value: string | Array<string>;
1324
- }
1325
- /**
1326
- * Solana Token Program attributes, including more granular TransferChecked
1327
- * instruction fields.
1328
- */
1329
- interface SolanaTokenProgramInstructionCondition {
1330
- field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
1331
- field_source: 'solana_token_program_instruction';
1332
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1333
- value: string | Array<string>;
1334
- }
1335
- /**
1336
- * System attributes, including current unix timestamp (in seconds).
1337
- */
1338
- interface SystemCondition {
1339
- field: 'current_unix_timestamp';
1340
- field_source: 'system';
1341
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1342
- value: string | Array<string>;
1343
- }
752
+ 'privy-request-expiry'?: string;
1344
753
  }
1345
754
  export interface PolicyGetRuleParams {
1346
755
  policy_id: string;
1347
756
  }
1348
757
  export declare namespace Policies {
1349
- export { type SuiTransactionCommandOperator as SuiTransactionCommandOperator, type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField, type TronTransactionCondition as TronTransactionCondition, type SuiTransactionCommandCondition as SuiTransactionCommandCondition, type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition, type Policy as Policy, type PolicyCreateRuleResponse as PolicyCreateRuleResponse, type PolicyDeleteResponse as PolicyDeleteResponse, type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse, type PolicyUpdateRuleResponse as PolicyUpdateRuleResponse, type PolicyGetRuleResponse as PolicyGetRuleResponse, type PolicyCreateParams as PolicyCreateParams, type PolicyCreateRuleParams as PolicyCreateRuleParams, type PolicyDeleteParams as PolicyDeleteParams, type PolicyDeleteRuleParams as PolicyDeleteRuleParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyUpdateRuleParams as PolicyUpdateRuleParams, type PolicyGetRuleParams as PolicyGetRuleParams, };
758
+ export { type ConditionSetRequestParams as ConditionSetRequestParams, type ConditionSetItemRequestParams as ConditionSetItemRequestParams, type ConditionSetRequestBody as ConditionSetRequestBody, type ConditionSet as ConditionSet, type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody, type ConditionSetItemValueInput as ConditionSetItemValueInput, type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody, type ConditionSetItem as ConditionSetItem, type ConditionSetItems as ConditionSetItems, type ConditionSetItemsResponse as ConditionSetItemsResponse, type PolicyAction as PolicyAction, type AbiParameter as AbiParameter, type AbiSchema as AbiSchema, type SuiTransactionCommandOperator as SuiTransactionCommandOperator, type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField, type TronTransactionCondition as TronTransactionCondition, type TronCalldataCondition as TronCalldataCondition, type SuiTransactionCommandCondition as SuiTransactionCommandCondition, type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition, type AggregationCondition as AggregationCondition, type PolicyCondition as PolicyCondition, type PolicyMethod as PolicyMethod, type PolicyRuleRequestBody as PolicyRuleRequestBody, type PolicyRuleResponse as PolicyRuleResponse, type Policy as Policy, type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders, type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders, type PolicyCreateParams as PolicyCreateParams, type PolicyCreateRuleParams as PolicyCreateRuleParams, type PolicyDeleteParams as PolicyDeleteParams, type PolicyDeleteRuleParams as PolicyDeleteRuleParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyUpdateRuleParams as PolicyUpdateRuleParams, type PolicyGetRuleParams as PolicyGetRuleParams, };
1350
759
  }
1351
760
  //# sourceMappingURL=policies.d.ts.map