@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
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as PoliciesAPI from './policies';
5
+ import * as SharedAPI from './shared';
5
6
  import * as WalletsAPI from './wallets/wallets';
6
7
  import { APIPromise } from '../core/api-promise';
7
8
  import { buildHeaders } from '../internal/headers';
@@ -56,30 +57,35 @@ export class Policies extends APIResource {
56
57
  *
57
58
  * @example
58
59
  * ```ts
59
- * const response = await client.policies._createRule(
60
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
61
- * {
62
- * action: 'ALLOW',
63
- * conditions: [
64
- * {
65
- * field: 'to',
66
- * field_source: 'ethereum_transaction',
67
- * operator: 'eq',
68
- * value: 'string',
69
- * },
70
- * ],
71
- * method: 'eth_sendTransaction',
72
- * name: 'x',
73
- * },
74
- * );
60
+ * const policyRuleResponse =
61
+ * await client.policies._createRule(
62
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
63
+ * {
64
+ * action: 'ALLOW',
65
+ * conditions: [
66
+ * {
67
+ * field: 'to',
68
+ * field_source: 'ethereum_transaction',
69
+ * operator: 'eq',
70
+ * value: 'string',
71
+ * },
72
+ * ],
73
+ * method: 'eth_sendTransaction',
74
+ * name: 'x',
75
+ * },
76
+ * );
75
77
  * ```
76
78
  */
77
79
  _createRule(
78
80
  policyID: string,
79
81
  params: PolicyCreateRuleParams,
80
82
  options?: RequestOptions,
81
- ): APIPromise<PolicyCreateRuleResponse> {
82
- const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
83
+ ): APIPromise<PolicyRuleResponse> {
84
+ const {
85
+ 'privy-authorization-signature': privyAuthorizationSignature,
86
+ 'privy-request-expiry': privyRequestExpiry,
87
+ ...body
88
+ } = params;
83
89
  return this._client.post(path`/v1/policies/${policyID}/rules`, {
84
90
  body,
85
91
  ...options,
@@ -88,6 +94,7 @@ export class Policies extends APIResource {
88
94
  ...(privyAuthorizationSignature != null ?
89
95
  { 'privy-authorization-signature': privyAuthorizationSignature }
90
96
  : undefined),
97
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
91
98
  },
92
99
  options?.headers,
93
100
  ]),
@@ -99,7 +106,7 @@ export class Policies extends APIResource {
99
106
  *
100
107
  * @example
101
108
  * ```ts
102
- * const response = await client.policies._delete(
109
+ * const successResponse = await client.policies._delete(
103
110
  * 'xxxxxxxxxxxxxxxxxxxxxxxx',
104
111
  * );
105
112
  * ```
@@ -108,8 +115,11 @@ export class Policies extends APIResource {
108
115
  policyID: string,
109
116
  params: PolicyDeleteParams | null | undefined = {},
110
117
  options?: RequestOptions,
111
- ): APIPromise<PolicyDeleteResponse> {
112
- const { 'privy-authorization-signature': privyAuthorizationSignature } = params ?? {};
118
+ ): APIPromise<SharedAPI.SuccessResponse> {
119
+ const {
120
+ 'privy-authorization-signature': privyAuthorizationSignature,
121
+ 'privy-request-expiry': privyRequestExpiry,
122
+ } = params ?? {};
113
123
  return this._client.delete(path`/v1/policies/${policyID}`, {
114
124
  ...options,
115
125
  headers: buildHeaders([
@@ -117,6 +127,7 @@ export class Policies extends APIResource {
117
127
  ...(privyAuthorizationSignature != null ?
118
128
  { 'privy-authorization-signature': privyAuthorizationSignature }
119
129
  : undefined),
130
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
120
131
  },
121
132
  options?.headers,
122
133
  ]),
@@ -128,7 +139,7 @@ export class Policies extends APIResource {
128
139
  *
129
140
  * @example
130
141
  * ```ts
131
- * const response = await client.policies._deleteRule(
142
+ * const successResponse = await client.policies._deleteRule(
132
143
  * 'xxxxxxxxxxxxxxxxxxxxxxxx',
133
144
  * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
134
145
  * );
@@ -138,8 +149,12 @@ export class Policies extends APIResource {
138
149
  ruleID: string,
139
150
  params: PolicyDeleteRuleParams,
140
151
  options?: RequestOptions,
141
- ): APIPromise<PolicyDeleteRuleResponse> {
142
- const { policy_id, 'privy-authorization-signature': privyAuthorizationSignature } = params;
152
+ ): APIPromise<SharedAPI.SuccessResponse> {
153
+ const {
154
+ policy_id,
155
+ 'privy-authorization-signature': privyAuthorizationSignature,
156
+ 'privy-request-expiry': privyRequestExpiry,
157
+ } = params;
143
158
  return this._client.delete(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
144
159
  ...options,
145
160
  headers: buildHeaders([
@@ -147,6 +162,7 @@ export class Policies extends APIResource {
147
162
  ...(privyAuthorizationSignature != null ?
148
163
  { 'privy-authorization-signature': privyAuthorizationSignature }
149
164
  : undefined),
165
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
150
166
  },
151
167
  options?.headers,
152
168
  ]),
@@ -164,7 +180,11 @@ export class Policies extends APIResource {
164
180
  * ```
165
181
  */
166
182
  _update(policyID: string, params: PolicyUpdateParams, options?: RequestOptions): APIPromise<Policy> {
167
- const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
183
+ const {
184
+ 'privy-authorization-signature': privyAuthorizationSignature,
185
+ 'privy-request-expiry': privyRequestExpiry,
186
+ ...body
187
+ } = params;
168
188
  return this._client.patch(path`/v1/policies/${policyID}`, {
169
189
  body,
170
190
  ...options,
@@ -173,6 +193,7 @@ export class Policies extends APIResource {
173
193
  ...(privyAuthorizationSignature != null ?
174
194
  { 'privy-authorization-signature': privyAuthorizationSignature }
175
195
  : undefined),
196
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
176
197
  },
177
198
  options?.headers,
178
199
  ]),
@@ -184,31 +205,37 @@ export class Policies extends APIResource {
184
205
  *
185
206
  * @example
186
207
  * ```ts
187
- * const response = await client.policies._updateRule(
188
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
189
- * {
190
- * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
191
- * action: 'ALLOW',
192
- * conditions: [
193
- * {
194
- * field: 'to',
195
- * field_source: 'ethereum_transaction',
196
- * operator: 'eq',
197
- * value: 'string',
198
- * },
199
- * ],
200
- * method: 'eth_sendTransaction',
201
- * name: 'x',
202
- * },
203
- * );
208
+ * const policyRuleResponse =
209
+ * await client.policies._updateRule(
210
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
211
+ * {
212
+ * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
213
+ * action: 'ALLOW',
214
+ * conditions: [
215
+ * {
216
+ * field: 'to',
217
+ * field_source: 'ethereum_transaction',
218
+ * operator: 'eq',
219
+ * value: 'string',
220
+ * },
221
+ * ],
222
+ * method: 'eth_sendTransaction',
223
+ * name: 'x',
224
+ * },
225
+ * );
204
226
  * ```
205
227
  */
206
228
  _updateRule(
207
229
  ruleID: string,
208
230
  params: PolicyUpdateRuleParams,
209
231
  options?: RequestOptions,
210
- ): APIPromise<PolicyUpdateRuleResponse> {
211
- const { policy_id, 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
232
+ ): APIPromise<PolicyRuleResponse> {
233
+ const {
234
+ policy_id,
235
+ 'privy-authorization-signature': privyAuthorizationSignature,
236
+ 'privy-request-expiry': privyRequestExpiry,
237
+ ...body
238
+ } = params;
212
239
  return this._client.patch(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
213
240
  body,
214
241
  ...options,
@@ -217,6 +244,7 @@ export class Policies extends APIResource {
217
244
  ...(privyAuthorizationSignature != null ?
218
245
  { 'privy-authorization-signature': privyAuthorizationSignature }
219
246
  : undefined),
247
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
220
248
  },
221
249
  options?.headers,
222
250
  ]),
@@ -242,7 +270,7 @@ export class Policies extends APIResource {
242
270
  *
243
271
  * @example
244
272
  * ```ts
245
- * const response = await client.policies.getRule(
273
+ * const policyRuleResponse = await client.policies.getRule(
246
274
  * 'xxxxxxxxxxxxxxxxxxxxxxxx',
247
275
  * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
248
276
  * );
@@ -252,12 +280,197 @@ export class Policies extends APIResource {
252
280
  ruleID: string,
253
281
  params: PolicyGetRuleParams,
254
282
  options?: RequestOptions,
255
- ): APIPromise<PolicyGetRuleResponse> {
283
+ ): APIPromise<PolicyRuleResponse> {
256
284
  const { policy_id } = params;
257
285
  return this._client.get(path`/v1/policies/${policy_id}/rules/${ruleID}`, options);
258
286
  }
259
287
  }
260
288
 
289
+ /**
290
+ * Unique ID of the condition set to take actions on.
291
+ */
292
+ export interface ConditionSetRequestParams {
293
+ condition_set_id: string;
294
+ }
295
+
296
+ /**
297
+ * Unique IDs of the condition set and the condition set item within the condition
298
+ * set to take actions on.
299
+ */
300
+ export interface ConditionSetItemRequestParams {
301
+ condition_set_id: string;
302
+
303
+ condition_set_item_id: string;
304
+ }
305
+
306
+ /**
307
+ * Request body for creating a condition set.
308
+ */
309
+ export interface ConditionSetRequestBody {
310
+ /**
311
+ * Name to assign to condition set.
312
+ */
313
+ name: string;
314
+
315
+ /**
316
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
317
+ * null to remove the current owner.
318
+ */
319
+ owner?: SharedAPI.OwnerInput | null;
320
+
321
+ /**
322
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
323
+ * not specify an owner.
324
+ */
325
+ owner_id?: SharedAPI.OwnerIDInput | null;
326
+ }
327
+
328
+ /**
329
+ * A condition set for grouping related condition values.
330
+ */
331
+ export interface ConditionSet {
332
+ /**
333
+ * Unique ID of the created condition set. This will be the primary identifier when
334
+ * using the condition set in the future.
335
+ */
336
+ id: string;
337
+
338
+ /**
339
+ * Unix timestamp of when the condition set was created in milliseconds.
340
+ */
341
+ created_at: number;
342
+
343
+ /**
344
+ * Name of the condition set.
345
+ */
346
+ name: string;
347
+
348
+ /**
349
+ * A unique identifier for a key quorum.
350
+ */
351
+ owner_id: SharedAPI.KeyQuorumID;
352
+ }
353
+
354
+ /**
355
+ * Request body for updating a condition set.
356
+ */
357
+ export interface UpdateConditionSetRequestBody {
358
+ /**
359
+ * Name to assign to condition set.
360
+ */
361
+ name?: string;
362
+
363
+ /**
364
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
365
+ * null to remove the current owner.
366
+ */
367
+ owner?: SharedAPI.OwnerInput | null;
368
+
369
+ /**
370
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
371
+ * not specify an owner.
372
+ */
373
+ owner_id?: SharedAPI.OwnerIDInput | null;
374
+ }
375
+
376
+ /**
377
+ * A single value to add to a condition set.
378
+ */
379
+ export interface ConditionSetItemValueInput {
380
+ value: string;
381
+ }
382
+
383
+ /**
384
+ * Array of values to add to the condition set. Maximum 100 items per request.
385
+ */
386
+ export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
387
+
388
+ /**
389
+ * A single item in a condition set.
390
+ */
391
+ export interface ConditionSetItem {
392
+ /**
393
+ * Unique ID of the created condition set item.
394
+ */
395
+ id: string;
396
+
397
+ /**
398
+ * Unique ID of the condition set this item belongs to.
399
+ */
400
+ condition_set_id: string;
401
+
402
+ /**
403
+ * Unix timestamp of when the condition set item was created in milliseconds.
404
+ */
405
+ created_at: number;
406
+
407
+ /**
408
+ * The value stored in this condition set item.
409
+ */
410
+ value: string;
411
+ }
412
+
413
+ /**
414
+ * Array of condition set items.
415
+ */
416
+ export type ConditionSetItems = Array<ConditionSetItem>;
417
+
418
+ /**
419
+ * Paginated list of condition set items.
420
+ */
421
+ export interface ConditionSetItemsResponse {
422
+ /**
423
+ * List of condition set items.
424
+ */
425
+ items: Array<ConditionSetItem>;
426
+
427
+ /**
428
+ * Cursor for pagination. Null if there are no more items.
429
+ */
430
+ next_cursor: string | null;
431
+ }
432
+
433
+ /**
434
+ * The action to take when a policy rule matches.
435
+ */
436
+ export type PolicyAction = 'ALLOW' | 'DENY';
437
+
438
+ /**
439
+ * A parameter in a Solidity ABI function or event definition.
440
+ */
441
+ export interface AbiParameter {
442
+ type: string;
443
+
444
+ components?: Array<unknown>;
445
+
446
+ indexed?: boolean;
447
+
448
+ internalType?: string;
449
+
450
+ name?: string;
451
+ }
452
+
453
+ /**
454
+ * A Solidity ABI definition for decoding smart contract calldata.
455
+ */
456
+ export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
457
+
458
+ export namespace AbiSchema {
459
+ export interface AbiSchemaItem {
460
+ type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
461
+
462
+ anonymous?: boolean;
463
+
464
+ inputs?: Array<PoliciesAPI.AbiParameter>;
465
+
466
+ name?: string;
467
+
468
+ outputs?: Array<PoliciesAPI.AbiParameter>;
469
+
470
+ stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
471
+ }
472
+ }
473
+
261
474
  /**
262
475
  * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
263
476
  * supported for command names.
@@ -293,6 +506,24 @@ export interface TronTransactionCondition {
293
506
  value: string | Array<string>;
294
507
  }
295
508
 
509
+ /**
510
+ * Decoded calldata from a TRON TriggerSmartContract interaction.
511
+ */
512
+ export interface TronCalldataCondition {
513
+ /**
514
+ * A Solidity ABI definition for decoding smart contract calldata.
515
+ */
516
+ abi: AbiSchema;
517
+
518
+ field: string;
519
+
520
+ field_source: 'tron_trigger_smart_contract_data';
521
+
522
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
523
+
524
+ value: string | Array<string>;
525
+ }
526
+
296
527
  /**
297
528
  * SUI transaction command attributes, enables allowlisting specific command types.
298
529
  * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
@@ -334,375 +565,125 @@ export interface SuiTransferObjectsCommandCondition {
334
565
  }
335
566
 
336
567
  /**
337
- * A policy for controlling wallet operations.
568
+ * Condition referencing an aggregation value. The field must start with
569
+ * "aggregation." followed by the aggregation ID.
338
570
  */
339
- export interface Policy {
340
- /**
341
- * Unique ID of the created policy. This will be the primary identifier when using
342
- * the policy in the future.
343
- */
344
- id: string;
345
-
346
- /**
347
- * The chain type the policy applies to.
348
- */
349
- chain_type: 'ethereum' | 'solana' | 'tron' | 'sui';
350
-
351
- /**
352
- * Unix timestamp of when the policy was created in milliseconds.
353
- */
354
- created_at: number;
355
-
356
- /**
357
- * Name to assign to policy.
358
- */
359
- name: string;
571
+ export interface AggregationCondition {
572
+ field: string;
360
573
 
361
- /**
362
- * The key quorum ID of the owner of the policy.
363
- */
364
- owner_id: string | null;
574
+ field_source: 'reference';
365
575
 
366
- rules: Array<Policy.Rule>;
576
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
367
577
 
368
- /**
369
- * Version of the policy. Currently, 1.0 is the only version.
370
- */
371
- version: '1.0';
578
+ value: string | Array<string>;
372
579
  }
373
580
 
374
- export namespace Policy {
581
+ /**
582
+ * A condition that must be true for the rule action to be applied.
583
+ */
584
+ export type PolicyCondition =
585
+ | PolicyCondition.EthereumTransactionCondition
586
+ | PolicyCondition.EthereumCalldataCondition
587
+ | PolicyCondition.EthereumTypedDataDomainCondition
588
+ | PolicyCondition.EthereumTypedDataMessageCondition
589
+ | PolicyCondition.Ethereum7702AuthorizationCondition
590
+ | PolicyCondition.SolanaProgramInstructionCondition
591
+ | PolicyCondition.SolanaSystemProgramInstructionCondition
592
+ | PolicyCondition.SolanaTokenProgramInstructionCondition
593
+ | PolicyCondition.SystemCondition
594
+ | TronTransactionCondition
595
+ | TronCalldataCondition
596
+ | SuiTransactionCommandCondition
597
+ | SuiTransferObjectsCommandCondition
598
+ | AggregationCondition;
599
+
600
+ export namespace PolicyCondition {
375
601
  /**
376
- * A rule that defines the conditions and action to take if the conditions are
377
- * true.
602
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
603
+ * eth_sendTransaction request.
378
604
  */
379
- export interface Rule {
380
- id: string;
605
+ export interface EthereumTransactionCondition {
606
+ field: 'to' | 'value' | 'chain_id';
381
607
 
382
- /**
383
- * Action to take if the conditions are true.
384
- */
385
- action: 'ALLOW' | 'DENY';
386
-
387
- conditions: Array<
388
- | Rule.EthereumTransactionCondition
389
- | Rule.EthereumCalldataCondition
390
- | Rule.EthereumTypedDataDomainCondition
391
- | Rule.EthereumTypedDataMessageCondition
392
- | Rule.Ethereum7702AuthorizationCondition
393
- | Rule.SolanaProgramInstructionCondition
394
- | Rule.SolanaSystemProgramInstructionCondition
395
- | Rule.SolanaTokenProgramInstructionCondition
396
- | Rule.SystemCondition
397
- | PoliciesAPI.TronTransactionCondition
398
- | PoliciesAPI.SuiTransactionCommandCondition
399
- | PoliciesAPI.SuiTransferObjectsCommandCondition
400
- >;
608
+ field_source: 'ethereum_transaction';
401
609
 
402
- /**
403
- * Method the rule applies to.
404
- */
405
- method:
406
- | 'eth_sendTransaction'
407
- | 'eth_signTransaction'
408
- | 'eth_signUserOperation'
409
- | 'eth_signTypedData_v4'
410
- | 'eth_sign7702Authorization'
411
- | 'signTransaction'
412
- | 'signAndSendTransaction'
413
- | 'exportPrivateKey'
414
- | 'signTransactionBytes'
415
- | '*';
610
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
416
611
 
417
- name: string;
612
+ value: string | Array<string>;
418
613
  }
419
614
 
420
- export namespace Rule {
615
+ /**
616
+ * The decoded calldata in a smart contract interaction as the smart contract
617
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
618
+ * an abi parameter with the JSON ABI of the smart contract.
619
+ */
620
+ export interface EthereumCalldataCondition {
421
621
  /**
422
- * The verbatim Ethereum transaction object in an eth_signTransaction or
423
- * eth_sendTransaction request.
622
+ * A Solidity ABI definition for decoding smart contract calldata.
424
623
  */
425
- export interface EthereumTransactionCondition {
426
- field: 'to' | 'value' | 'chain_id';
427
-
428
- field_source: 'ethereum_transaction';
429
-
430
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
624
+ abi: PoliciesAPI.AbiSchema;
431
625
 
432
- value: string | Array<string>;
433
- }
626
+ field: string;
434
627
 
435
- /**
436
- * The decoded calldata in a smart contract interaction as the smart contract
437
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
438
- * an abi parameter with the JSON ABI of the smart contract.
439
- */
440
- export interface EthereumCalldataCondition {
441
- abi: unknown;
628
+ field_source: 'ethereum_calldata';
442
629
 
443
- field: string;
630
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
444
631
 
445
- field_source: 'ethereum_calldata';
632
+ value: string | Array<string>;
633
+ }
446
634
 
447
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
635
+ /**
636
+ * Attributes from the signing domain that will verify the signature.
637
+ */
638
+ export interface EthereumTypedDataDomainCondition {
639
+ field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
448
640
 
449
- value: string | Array<string>;
450
- }
641
+ field_source: 'ethereum_typed_data_domain';
451
642
 
452
- /**
453
- * Attributes from the signing domain that will verify the signature.
454
- */
455
- export interface EthereumTypedDataDomainCondition {
456
- field: 'chainId' | 'verifyingContract';
643
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
457
644
 
458
- field_source: 'ethereum_typed_data_domain';
645
+ value: string | Array<string>;
646
+ }
459
647
 
460
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
648
+ /**
649
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
650
+ * EIP-712.
651
+ */
652
+ export interface EthereumTypedDataMessageCondition {
653
+ field: string;
461
654
 
462
- value: string | Array<string>;
463
- }
655
+ field_source: 'ethereum_typed_data_message';
464
656
 
465
- /**
466
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
467
- * EIP-712.
468
- */
469
- export interface EthereumTypedDataMessageCondition {
470
- field: string;
657
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
471
658
 
472
- field_source: 'ethereum_typed_data_message';
659
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
473
660
 
474
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
661
+ value: string | Array<string>;
662
+ }
475
663
 
476
- typed_data: EthereumTypedDataMessageCondition.TypedData;
664
+ export namespace EthereumTypedDataMessageCondition {
665
+ export interface TypedData {
666
+ primary_type: string;
477
667
 
478
- value: string | Array<string>;
668
+ /**
669
+ * The type definitions for EIP-712 typed data signing.
670
+ */
671
+ types: WalletsAPI.TypedDataTypesInputParams;
479
672
  }
673
+ }
480
674
 
481
- export namespace EthereumTypedDataMessageCondition {
482
- export interface TypedData {
483
- primary_type: string;
675
+ /**
676
+ * Allowed contract addresses for eth_sign7702Authorization requests.
677
+ */
678
+ export interface Ethereum7702AuthorizationCondition {
679
+ field: 'contract';
484
680
 
485
- types: { [key: string]: Array<TypedData.Type> };
486
- }
681
+ field_source: 'ethereum_7702_authorization';
487
682
 
488
- export namespace TypedData {
489
- export interface Type {
490
- name: string;
683
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
491
684
 
492
- type: string;
493
- }
494
- }
495
- }
496
-
497
- /**
498
- * Allowed contract addresses for eth_sign7702Authorization requests.
499
- */
500
- export interface Ethereum7702AuthorizationCondition {
501
- field: 'contract';
502
-
503
- field_source: 'ethereum_7702_authorization';
504
-
505
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
506
-
507
- value: string | Array<string>;
508
- }
509
-
510
- /**
511
- * Solana Program attributes, enables allowlisting Solana Programs.
512
- */
513
- export interface SolanaProgramInstructionCondition {
514
- field: 'programId';
515
-
516
- field_source: 'solana_program_instruction';
517
-
518
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
519
-
520
- value: string | Array<string>;
521
- }
522
-
523
- /**
524
- * Solana System Program attributes, including more granular Transfer instruction
525
- * fields.
526
- */
527
- export interface SolanaSystemProgramInstructionCondition {
528
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
529
-
530
- field_source: 'solana_system_program_instruction';
531
-
532
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
533
-
534
- value: string | Array<string>;
535
- }
536
-
537
- /**
538
- * Solana Token Program attributes, including more granular TransferChecked
539
- * instruction fields.
540
- */
541
- export interface SolanaTokenProgramInstructionCondition {
542
- field:
543
- | 'instructionName'
544
- | 'TransferChecked.source'
545
- | 'TransferChecked.destination'
546
- | 'TransferChecked.authority'
547
- | 'TransferChecked.amount'
548
- | 'TransferChecked.mint';
549
-
550
- field_source: 'solana_token_program_instruction';
551
-
552
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
553
-
554
- value: string | Array<string>;
555
- }
556
-
557
- /**
558
- * System attributes, including current unix timestamp (in seconds).
559
- */
560
- export interface SystemCondition {
561
- field: 'current_unix_timestamp';
562
-
563
- field_source: 'system';
564
-
565
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
566
-
567
- value: string | Array<string>;
568
- }
569
- }
570
- }
571
-
572
- /**
573
- * A rule that defines the conditions and action to take if the conditions are
574
- * true.
575
- */
576
- export interface PolicyCreateRuleResponse {
577
- id: string;
578
-
579
- /**
580
- * Action to take if the conditions are true.
581
- */
582
- action: 'ALLOW' | 'DENY';
583
-
584
- conditions: Array<
585
- | PolicyCreateRuleResponse.EthereumTransactionCondition
586
- | PolicyCreateRuleResponse.EthereumCalldataCondition
587
- | PolicyCreateRuleResponse.EthereumTypedDataDomainCondition
588
- | PolicyCreateRuleResponse.EthereumTypedDataMessageCondition
589
- | PolicyCreateRuleResponse.Ethereum7702AuthorizationCondition
590
- | PolicyCreateRuleResponse.SolanaProgramInstructionCondition
591
- | PolicyCreateRuleResponse.SolanaSystemProgramInstructionCondition
592
- | PolicyCreateRuleResponse.SolanaTokenProgramInstructionCondition
593
- | PolicyCreateRuleResponse.SystemCondition
594
- | TronTransactionCondition
595
- | SuiTransactionCommandCondition
596
- | SuiTransferObjectsCommandCondition
597
- >;
598
-
599
- /**
600
- * Method the rule applies to.
601
- */
602
- method:
603
- | 'eth_sendTransaction'
604
- | 'eth_signTransaction'
605
- | 'eth_signUserOperation'
606
- | 'eth_signTypedData_v4'
607
- | 'eth_sign7702Authorization'
608
- | 'signTransaction'
609
- | 'signAndSendTransaction'
610
- | 'exportPrivateKey'
611
- | 'signTransactionBytes'
612
- | '*';
613
-
614
- name: string;
615
- }
616
-
617
- export namespace PolicyCreateRuleResponse {
618
- /**
619
- * The verbatim Ethereum transaction object in an eth_signTransaction or
620
- * eth_sendTransaction request.
621
- */
622
- export interface EthereumTransactionCondition {
623
- field: 'to' | 'value' | 'chain_id';
624
-
625
- field_source: 'ethereum_transaction';
626
-
627
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
628
-
629
- value: string | Array<string>;
630
- }
631
-
632
- /**
633
- * The decoded calldata in a smart contract interaction as the smart contract
634
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
635
- * an abi parameter with the JSON ABI of the smart contract.
636
- */
637
- export interface EthereumCalldataCondition {
638
- abi: unknown;
639
-
640
- field: string;
641
-
642
- field_source: 'ethereum_calldata';
643
-
644
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
645
-
646
- value: string | Array<string>;
647
- }
648
-
649
- /**
650
- * Attributes from the signing domain that will verify the signature.
651
- */
652
- export interface EthereumTypedDataDomainCondition {
653
- field: 'chainId' | 'verifyingContract';
654
-
655
- field_source: 'ethereum_typed_data_domain';
656
-
657
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
658
-
659
- value: string | Array<string>;
660
- }
661
-
662
- /**
663
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
664
- * EIP-712.
665
- */
666
- export interface EthereumTypedDataMessageCondition {
667
- field: string;
668
-
669
- field_source: 'ethereum_typed_data_message';
670
-
671
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
672
-
673
- typed_data: EthereumTypedDataMessageCondition.TypedData;
674
-
675
- value: string | Array<string>;
676
- }
677
-
678
- export namespace EthereumTypedDataMessageCondition {
679
- export interface TypedData {
680
- primary_type: string;
681
-
682
- types: { [key: string]: Array<TypedData.Type> };
683
- }
684
-
685
- export namespace TypedData {
686
- export interface Type {
687
- name: string;
688
-
689
- type: string;
690
- }
691
- }
692
- }
693
-
694
- /**
695
- * Allowed contract addresses for eth_sign7702Authorization requests.
696
- */
697
- export interface Ethereum7702AuthorizationCondition {
698
- field: 'contract';
699
-
700
- field_source: 'ethereum_7702_authorization';
701
-
702
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
703
-
704
- value: string | Array<string>;
705
- }
685
+ value: string | Array<string>;
686
+ }
706
687
 
707
688
  /**
708
689
  * Solana Program attributes, enables allowlisting Solana Programs.
@@ -738,11 +719,29 @@ export namespace PolicyCreateRuleResponse {
738
719
  export interface SolanaTokenProgramInstructionCondition {
739
720
  field:
740
721
  | 'instructionName'
722
+ | 'Transfer.source'
723
+ | 'Transfer.destination'
724
+ | 'Transfer.authority'
725
+ | 'Transfer.amount'
741
726
  | 'TransferChecked.source'
742
727
  | 'TransferChecked.destination'
743
728
  | 'TransferChecked.authority'
744
729
  | 'TransferChecked.amount'
745
- | 'TransferChecked.mint';
730
+ | 'TransferChecked.mint'
731
+ | 'Burn.account'
732
+ | 'Burn.mint'
733
+ | 'Burn.authority'
734
+ | 'Burn.amount'
735
+ | 'MintTo.mint'
736
+ | 'MintTo.account'
737
+ | 'MintTo.authority'
738
+ | 'MintTo.amount'
739
+ | 'CloseAccount.account'
740
+ | 'CloseAccount.destination'
741
+ | 'CloseAccount.authority'
742
+ | 'InitializeAccount3.account'
743
+ | 'InitializeAccount3.mint'
744
+ | 'InitializeAccount3.owner';
746
745
 
747
746
  field_source: 'solana_token_program_instruction';
748
747
 
@@ -765,865 +764,238 @@ export namespace PolicyCreateRuleResponse {
765
764
  }
766
765
  }
767
766
 
768
- export interface PolicyDeleteResponse {
767
+ /**
768
+ * Method the rule applies to.
769
+ */
770
+ export type PolicyMethod =
771
+ | 'eth_sendTransaction'
772
+ | 'eth_signTransaction'
773
+ | 'eth_signUserOperation'
774
+ | 'eth_signTypedData_v4'
775
+ | 'eth_sign7702Authorization'
776
+ | 'wallet_sendCalls'
777
+ | 'signTransaction'
778
+ | 'signAndSendTransaction'
779
+ | 'exportPrivateKey'
780
+ | 'exportSeedPhrase'
781
+ | 'signTransactionBytes'
782
+ | '*';
783
+
784
+ /**
785
+ * The rules that apply to each method the policy covers.
786
+ */
787
+ export interface PolicyRuleRequestBody {
769
788
  /**
770
- * Whether the policy was deleted successfully.
789
+ * The action to take when a policy rule matches.
771
790
  */
772
- success: boolean;
773
- }
791
+ action: PolicyAction;
792
+
793
+ conditions: Array<PolicyCondition>;
774
794
 
775
- export interface PolicyDeleteRuleResponse {
776
795
  /**
777
- * Whether the rule was deleted successfully.
796
+ * Method the rule applies to.
778
797
  */
779
- success: boolean;
798
+ method: PolicyMethod;
799
+
800
+ name: string;
780
801
  }
781
802
 
782
803
  /**
783
804
  * A rule that defines the conditions and action to take if the conditions are
784
805
  * true.
785
806
  */
786
- export interface PolicyUpdateRuleResponse {
807
+ export interface PolicyRuleResponse {
787
808
  id: string;
788
809
 
789
810
  /**
790
- * Action to take if the conditions are true.
811
+ * The action to take when a policy rule matches.
791
812
  */
792
- action: 'ALLOW' | 'DENY';
813
+ action: PolicyAction;
793
814
 
794
- conditions: Array<
795
- | PolicyUpdateRuleResponse.EthereumTransactionCondition
796
- | PolicyUpdateRuleResponse.EthereumCalldataCondition
797
- | PolicyUpdateRuleResponse.EthereumTypedDataDomainCondition
798
- | PolicyUpdateRuleResponse.EthereumTypedDataMessageCondition
799
- | PolicyUpdateRuleResponse.Ethereum7702AuthorizationCondition
800
- | PolicyUpdateRuleResponse.SolanaProgramInstructionCondition
801
- | PolicyUpdateRuleResponse.SolanaSystemProgramInstructionCondition
802
- | PolicyUpdateRuleResponse.SolanaTokenProgramInstructionCondition
803
- | PolicyUpdateRuleResponse.SystemCondition
804
- | TronTransactionCondition
805
- | SuiTransactionCommandCondition
806
- | SuiTransferObjectsCommandCondition
807
- >;
815
+ conditions: Array<PolicyCondition>;
808
816
 
809
817
  /**
810
818
  * Method the rule applies to.
811
819
  */
812
- method:
813
- | 'eth_sendTransaction'
814
- | 'eth_signTransaction'
815
- | 'eth_signUserOperation'
816
- | 'eth_signTypedData_v4'
817
- | 'eth_sign7702Authorization'
818
- | 'signTransaction'
819
- | 'signAndSendTransaction'
820
- | 'exportPrivateKey'
821
- | 'signTransactionBytes'
822
- | '*';
820
+ method: PolicyMethod;
823
821
 
824
822
  name: string;
825
823
  }
826
824
 
827
- export namespace PolicyUpdateRuleResponse {
825
+ /**
826
+ * A policy for controlling wallet operations.
827
+ */
828
+ export interface Policy {
828
829
  /**
829
- * The verbatim Ethereum transaction object in an eth_signTransaction or
830
- * eth_sendTransaction request.
830
+ * Unique ID of the created policy. This will be the primary identifier when using
831
+ * the policy in the future.
831
832
  */
832
- export interface EthereumTransactionCondition {
833
- field: 'to' | 'value' | 'chain_id';
834
-
835
- field_source: 'ethereum_transaction';
836
-
837
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
838
-
839
- value: string | Array<string>;
840
- }
833
+ id: string;
841
834
 
842
835
  /**
843
- * The decoded calldata in a smart contract interaction as the smart contract
844
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
845
- * an abi parameter with the JSON ABI of the smart contract.
836
+ * The wallet chain types.
846
837
  */
847
- export interface EthereumCalldataCondition {
848
- abi: unknown;
838
+ chain_type: WalletsAPI.WalletChainType;
849
839
 
850
- field: string;
840
+ /**
841
+ * Unix timestamp of when the policy was created in milliseconds.
842
+ */
843
+ created_at: number;
851
844
 
852
- field_source: 'ethereum_calldata';
845
+ /**
846
+ * Name to assign to policy.
847
+ */
848
+ name: string;
853
849
 
854
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
850
+ /**
851
+ * The key quorum ID of the owner of the policy.
852
+ */
853
+ owner_id: string | null;
855
854
 
856
- value: string | Array<string>;
857
- }
855
+ rules: Array<PolicyRuleResponse>;
858
856
 
859
857
  /**
860
- * Attributes from the signing domain that will verify the signature.
858
+ * Version of the policy. Currently, 1.0 is the only version.
861
859
  */
862
- export interface EthereumTypedDataDomainCondition {
863
- field: 'chainId' | 'verifyingContract';
860
+ version: '1.0';
861
+ }
864
862
 
865
- field_source: 'ethereum_typed_data_domain';
863
+ /**
864
+ * Headers required to authorize modifications to policies.
865
+ */
866
+ export interface PolicyAuthorizationHeaders {
867
+ /**
868
+ * ID of your Privy app.
869
+ */
870
+ 'privy-app-id': string;
866
871
 
867
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
872
+ /**
873
+ * Request authorization signature. If multiple signatures are required, they
874
+ * should be comma separated.
875
+ */
876
+ 'privy-authorization-signature'?: string;
868
877
 
869
- value: string | Array<string>;
870
- }
878
+ /**
879
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
880
+ * deadline by which the request must be processed.
881
+ */
882
+ 'privy-request-expiry'?: string;
883
+ }
871
884
 
885
+ /**
886
+ * Headers required to authorize modifications to condition sets.
887
+ */
888
+ export interface ConditionSetAuthorizationHeaders {
872
889
  /**
873
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
874
- * EIP-712.
890
+ * ID of your Privy app.
875
891
  */
876
- export interface EthereumTypedDataMessageCondition {
877
- field: string;
892
+ 'privy-app-id': string;
878
893
 
879
- field_source: 'ethereum_typed_data_message';
894
+ /**
895
+ * Request authorization signature. If multiple signatures are required, they
896
+ * should be comma separated.
897
+ */
898
+ 'privy-authorization-signature'?: string;
880
899
 
881
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
900
+ /**
901
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
902
+ * deadline by which the request must be processed.
903
+ */
904
+ 'privy-request-expiry'?: string;
905
+ }
882
906
 
883
- typed_data: EthereumTypedDataMessageCondition.TypedData;
907
+ export interface PolicyCreateParams {
908
+ /**
909
+ * Body param: The wallet chain types.
910
+ */
911
+ chain_type: WalletsAPI.WalletChainType;
884
912
 
885
- value: string | Array<string>;
886
- }
913
+ /**
914
+ * Body param: Name to assign to policy.
915
+ */
916
+ name: string;
887
917
 
888
- export namespace EthereumTypedDataMessageCondition {
889
- export interface TypedData {
890
- primary_type: string;
918
+ /**
919
+ * Body param
920
+ */
921
+ rules: Array<PolicyCreateParams.Rule>;
891
922
 
892
- types: { [key: string]: Array<TypedData.Type> };
893
- }
923
+ /**
924
+ * Body param: Version of the policy. Currently, 1.0 is the only version.
925
+ */
926
+ version: '1.0';
894
927
 
895
- export namespace TypedData {
896
- export interface Type {
897
- name: string;
928
+ /**
929
+ * Body param: The owner of the resource, specified as a Privy user ID, a P-256
930
+ * public key, or null to remove the current owner.
931
+ */
932
+ owner?: SharedAPI.OwnerInput | null;
898
933
 
899
- type: string;
900
- }
901
- }
902
- }
934
+ /**
935
+ * Body param: The key quorum ID to set as the owner of the resource. If you
936
+ * provide this, do not specify an owner.
937
+ */
938
+ owner_id?: SharedAPI.OwnerIDInput | null;
903
939
 
904
940
  /**
905
- * Allowed contract addresses for eth_sign7702Authorization requests.
941
+ * Header param: Idempotency keys ensure API requests are executed only once within
942
+ * a 24-hour window.
906
943
  */
907
- export interface Ethereum7702AuthorizationCondition {
908
- field: 'contract';
909
-
910
- field_source: 'ethereum_7702_authorization';
911
-
912
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
913
-
914
- value: string | Array<string>;
915
- }
916
-
917
- /**
918
- * Solana Program attributes, enables allowlisting Solana Programs.
919
- */
920
- export interface SolanaProgramInstructionCondition {
921
- field: 'programId';
922
-
923
- field_source: 'solana_program_instruction';
924
-
925
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
926
-
927
- value: string | Array<string>;
928
- }
929
-
930
- /**
931
- * Solana System Program attributes, including more granular Transfer instruction
932
- * fields.
933
- */
934
- export interface SolanaSystemProgramInstructionCondition {
935
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
936
-
937
- field_source: 'solana_system_program_instruction';
938
-
939
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
940
-
941
- value: string | Array<string>;
942
- }
943
-
944
- /**
945
- * Solana Token Program attributes, including more granular TransferChecked
946
- * instruction fields.
947
- */
948
- export interface SolanaTokenProgramInstructionCondition {
949
- field:
950
- | 'instructionName'
951
- | 'TransferChecked.source'
952
- | 'TransferChecked.destination'
953
- | 'TransferChecked.authority'
954
- | 'TransferChecked.amount'
955
- | 'TransferChecked.mint';
956
-
957
- field_source: 'solana_token_program_instruction';
958
-
959
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
960
-
961
- value: string | Array<string>;
962
- }
963
-
964
- /**
965
- * System attributes, including current unix timestamp (in seconds).
966
- */
967
- export interface SystemCondition {
968
- field: 'current_unix_timestamp';
969
-
970
- field_source: 'system';
971
-
972
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
973
-
974
- value: string | Array<string>;
975
- }
976
- }
977
-
978
- /**
979
- * A rule that defines the conditions and action to take if the conditions are
980
- * true.
981
- */
982
- export interface PolicyGetRuleResponse {
983
- id: string;
984
-
985
- /**
986
- * Action to take if the conditions are true.
987
- */
988
- action: 'ALLOW' | 'DENY';
989
-
990
- conditions: Array<
991
- | PolicyGetRuleResponse.EthereumTransactionCondition
992
- | PolicyGetRuleResponse.EthereumCalldataCondition
993
- | PolicyGetRuleResponse.EthereumTypedDataDomainCondition
994
- | PolicyGetRuleResponse.EthereumTypedDataMessageCondition
995
- | PolicyGetRuleResponse.Ethereum7702AuthorizationCondition
996
- | PolicyGetRuleResponse.SolanaProgramInstructionCondition
997
- | PolicyGetRuleResponse.SolanaSystemProgramInstructionCondition
998
- | PolicyGetRuleResponse.SolanaTokenProgramInstructionCondition
999
- | PolicyGetRuleResponse.SystemCondition
1000
- | TronTransactionCondition
1001
- | SuiTransactionCommandCondition
1002
- | SuiTransferObjectsCommandCondition
1003
- >;
1004
-
1005
- /**
1006
- * Method the rule applies to.
1007
- */
1008
- method:
1009
- | 'eth_sendTransaction'
1010
- | 'eth_signTransaction'
1011
- | 'eth_signUserOperation'
1012
- | 'eth_signTypedData_v4'
1013
- | 'eth_sign7702Authorization'
1014
- | 'signTransaction'
1015
- | 'signAndSendTransaction'
1016
- | 'exportPrivateKey'
1017
- | 'signTransactionBytes'
1018
- | '*';
1019
-
1020
- name: string;
1021
- }
1022
-
1023
- export namespace PolicyGetRuleResponse {
1024
- /**
1025
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1026
- * eth_sendTransaction request.
1027
- */
1028
- export interface EthereumTransactionCondition {
1029
- field: 'to' | 'value' | 'chain_id';
1030
-
1031
- field_source: 'ethereum_transaction';
1032
-
1033
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1034
-
1035
- value: string | Array<string>;
1036
- }
1037
-
1038
- /**
1039
- * The decoded calldata in a smart contract interaction as the smart contract
1040
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1041
- * an abi parameter with the JSON ABI of the smart contract.
1042
- */
1043
- export interface EthereumCalldataCondition {
1044
- abi: unknown;
1045
-
1046
- field: string;
1047
-
1048
- field_source: 'ethereum_calldata';
1049
-
1050
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1051
-
1052
- value: string | Array<string>;
1053
- }
1054
-
1055
- /**
1056
- * Attributes from the signing domain that will verify the signature.
1057
- */
1058
- export interface EthereumTypedDataDomainCondition {
1059
- field: 'chainId' | 'verifyingContract';
1060
-
1061
- field_source: 'ethereum_typed_data_domain';
1062
-
1063
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1064
-
1065
- value: string | Array<string>;
1066
- }
1067
-
1068
- /**
1069
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1070
- * EIP-712.
1071
- */
1072
- export interface EthereumTypedDataMessageCondition {
1073
- field: string;
1074
-
1075
- field_source: 'ethereum_typed_data_message';
1076
-
1077
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1078
-
1079
- typed_data: EthereumTypedDataMessageCondition.TypedData;
1080
-
1081
- value: string | Array<string>;
1082
- }
1083
-
1084
- export namespace EthereumTypedDataMessageCondition {
1085
- export interface TypedData {
1086
- primary_type: string;
1087
-
1088
- types: { [key: string]: Array<TypedData.Type> };
1089
- }
1090
-
1091
- export namespace TypedData {
1092
- export interface Type {
1093
- name: string;
1094
-
1095
- type: string;
1096
- }
1097
- }
1098
- }
1099
-
1100
- /**
1101
- * Allowed contract addresses for eth_sign7702Authorization requests.
1102
- */
1103
- export interface Ethereum7702AuthorizationCondition {
1104
- field: 'contract';
1105
-
1106
- field_source: 'ethereum_7702_authorization';
1107
-
1108
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1109
-
1110
- value: string | Array<string>;
1111
- }
1112
-
1113
- /**
1114
- * Solana Program attributes, enables allowlisting Solana Programs.
1115
- */
1116
- export interface SolanaProgramInstructionCondition {
1117
- field: 'programId';
1118
-
1119
- field_source: 'solana_program_instruction';
1120
-
1121
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1122
-
1123
- value: string | Array<string>;
1124
- }
1125
-
1126
- /**
1127
- * Solana System Program attributes, including more granular Transfer instruction
1128
- * fields.
1129
- */
1130
- export interface SolanaSystemProgramInstructionCondition {
1131
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1132
-
1133
- field_source: 'solana_system_program_instruction';
1134
-
1135
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1136
-
1137
- value: string | Array<string>;
1138
- }
1139
-
1140
- /**
1141
- * Solana Token Program attributes, including more granular TransferChecked
1142
- * instruction fields.
1143
- */
1144
- export interface SolanaTokenProgramInstructionCondition {
1145
- field:
1146
- | 'instructionName'
1147
- | 'TransferChecked.source'
1148
- | 'TransferChecked.destination'
1149
- | 'TransferChecked.authority'
1150
- | 'TransferChecked.amount'
1151
- | 'TransferChecked.mint';
1152
-
1153
- field_source: 'solana_token_program_instruction';
1154
-
1155
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1156
-
1157
- value: string | Array<string>;
1158
- }
1159
-
1160
- /**
1161
- * System attributes, including current unix timestamp (in seconds).
1162
- */
1163
- export interface SystemCondition {
1164
- field: 'current_unix_timestamp';
1165
-
1166
- field_source: 'system';
1167
-
1168
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1169
-
1170
- value: string | Array<string>;
1171
- }
1172
- }
1173
-
1174
- export interface PolicyCreateParams {
1175
- /**
1176
- * Body param: The chain type the policy applies to.
1177
- */
1178
- chain_type: 'ethereum' | 'solana' | 'tron' | 'sui';
1179
-
1180
- /**
1181
- * Body param: Name to assign to policy.
1182
- */
1183
- name: string;
1184
-
1185
- /**
1186
- * Body param
1187
- */
1188
- rules: Array<PolicyCreateParams.Rule>;
1189
-
1190
- /**
1191
- * Body param: Version of the policy. Currently, 1.0 is the only version.
1192
- */
1193
- version: '1.0';
1194
-
1195
- /**
1196
- * Body param: The owner of the resource. If you provide this, do not specify an
1197
- * owner_id as it will be generated automatically. When updating a wallet, you can
1198
- * set the owner to null to remove the owner.
1199
- */
1200
- owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
1201
-
1202
- /**
1203
- * Body param
1204
- */
1205
- owner_id?: string | null;
1206
-
1207
- /**
1208
- * Header param: Idempotency keys ensure API requests are executed only once within
1209
- * a 24-hour window.
1210
- */
1211
- 'privy-idempotency-key'?: string;
1212
- }
944
+ 'privy-idempotency-key'?: string;
945
+ }
1213
946
 
1214
947
  export namespace PolicyCreateParams {
1215
- /**
1216
- * The rules that apply to each method the policy covers.
1217
- */
1218
948
  export interface Rule {
1219
949
  /**
1220
- * Action to take if the conditions are true.
950
+ * The action to take when a policy rule matches.
1221
951
  */
1222
- action: 'ALLOW' | 'DENY';
1223
-
1224
- conditions: Array<
1225
- | Rule.EthereumTransactionCondition
1226
- | Rule.EthereumCalldataCondition
1227
- | Rule.EthereumTypedDataDomainCondition
1228
- | Rule.EthereumTypedDataMessageCondition
1229
- | Rule.Ethereum7702AuthorizationCondition
1230
- | Rule.SolanaProgramInstructionCondition
1231
- | Rule.SolanaSystemProgramInstructionCondition
1232
- | Rule.SolanaTokenProgramInstructionCondition
1233
- | Rule.SystemCondition
1234
- | PoliciesAPI.TronTransactionCondition
1235
- | PoliciesAPI.SuiTransactionCommandCondition
1236
- | PoliciesAPI.SuiTransferObjectsCommandCondition
1237
- >;
952
+ action: PoliciesAPI.PolicyAction;
953
+
954
+ conditions: Array<PoliciesAPI.PolicyCondition>;
1238
955
 
1239
956
  /**
1240
957
  * Method the rule applies to.
1241
958
  */
1242
- method:
1243
- | 'eth_sendTransaction'
1244
- | 'eth_signTransaction'
1245
- | 'eth_signUserOperation'
1246
- | 'eth_signTypedData_v4'
1247
- | 'eth_sign7702Authorization'
1248
- | 'signTransaction'
1249
- | 'signAndSendTransaction'
1250
- | 'exportPrivateKey'
1251
- | 'signTransactionBytes'
1252
- | '*';
959
+ method: PoliciesAPI.PolicyMethod;
1253
960
 
1254
961
  name: string;
1255
- }
1256
-
1257
- export namespace Rule {
1258
- /**
1259
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1260
- * eth_sendTransaction request.
1261
- */
1262
- export interface EthereumTransactionCondition {
1263
- field: 'to' | 'value' | 'chain_id';
1264
-
1265
- field_source: 'ethereum_transaction';
1266
-
1267
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1268
-
1269
- value: string | Array<string>;
1270
- }
1271
-
1272
- /**
1273
- * The decoded calldata in a smart contract interaction as the smart contract
1274
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1275
- * an abi parameter with the JSON ABI of the smart contract.
1276
- */
1277
- export interface EthereumCalldataCondition {
1278
- abi: unknown;
1279
-
1280
- field: string;
1281
-
1282
- field_source: 'ethereum_calldata';
1283
-
1284
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1285
-
1286
- value: string | Array<string>;
1287
- }
1288
-
1289
- /**
1290
- * Attributes from the signing domain that will verify the signature.
1291
- */
1292
- export interface EthereumTypedDataDomainCondition {
1293
- field: 'chainId' | 'verifyingContract';
1294
-
1295
- field_source: 'ethereum_typed_data_domain';
1296
-
1297
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1298
-
1299
- value: string | Array<string>;
1300
- }
1301
-
1302
- /**
1303
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1304
- * EIP-712.
1305
- */
1306
- export interface EthereumTypedDataMessageCondition {
1307
- field: string;
1308
-
1309
- field_source: 'ethereum_typed_data_message';
1310
-
1311
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1312
-
1313
- typed_data: EthereumTypedDataMessageCondition.TypedData;
1314
-
1315
- value: string | Array<string>;
1316
- }
1317
-
1318
- export namespace EthereumTypedDataMessageCondition {
1319
- export interface TypedData {
1320
- primary_type: string;
1321
-
1322
- types: { [key: string]: Array<TypedData.Type> };
1323
- }
1324
-
1325
- export namespace TypedData {
1326
- export interface Type {
1327
- name: string;
1328
-
1329
- type: string;
1330
- }
1331
- }
1332
- }
1333
-
1334
- /**
1335
- * Allowed contract addresses for eth_sign7702Authorization requests.
1336
- */
1337
- export interface Ethereum7702AuthorizationCondition {
1338
- field: 'contract';
1339
-
1340
- field_source: 'ethereum_7702_authorization';
1341
-
1342
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1343
-
1344
- value: string | Array<string>;
1345
- }
1346
962
 
1347
- /**
1348
- * Solana Program attributes, enables allowlisting Solana Programs.
1349
- */
1350
- export interface SolanaProgramInstructionCondition {
1351
- field: 'programId';
1352
-
1353
- field_source: 'solana_program_instruction';
1354
-
1355
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1356
-
1357
- value: string | Array<string>;
1358
- }
1359
-
1360
- /**
1361
- * Solana System Program attributes, including more granular Transfer instruction
1362
- * fields.
1363
- */
1364
- export interface SolanaSystemProgramInstructionCondition {
1365
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1366
-
1367
- field_source: 'solana_system_program_instruction';
1368
-
1369
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1370
-
1371
- value: string | Array<string>;
1372
- }
1373
-
1374
- /**
1375
- * Solana Token Program attributes, including more granular TransferChecked
1376
- * instruction fields.
1377
- */
1378
- export interface SolanaTokenProgramInstructionCondition {
1379
- field:
1380
- | 'instructionName'
1381
- | 'TransferChecked.source'
1382
- | 'TransferChecked.destination'
1383
- | 'TransferChecked.authority'
1384
- | 'TransferChecked.amount'
1385
- | 'TransferChecked.mint';
1386
-
1387
- field_source: 'solana_token_program_instruction';
1388
-
1389
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1390
-
1391
- value: string | Array<string>;
1392
- }
1393
-
1394
- /**
1395
- * System attributes, including current unix timestamp (in seconds).
1396
- */
1397
- export interface SystemCondition {
1398
- field: 'current_unix_timestamp';
1399
-
1400
- field_source: 'system';
1401
-
1402
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1403
-
1404
- value: string | Array<string>;
1405
- }
1406
- }
1407
-
1408
- /**
1409
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
1410
- * If you provide this, do not specify an owner_id as it will be generated
1411
- * automatically.
1412
- */
1413
- export interface PublicKeyOwner {
1414
- public_key: string;
1415
- }
1416
-
1417
- /**
1418
- * The user ID of the owner of the resource. The user must already exist, and this
1419
- * value must start with "did:privy:". If you provide this, do not specify an
1420
- * owner_id as it will be generated automatically.
1421
- */
1422
- export interface UserOwner {
1423
- user_id: string;
963
+ id?: string;
1424
964
  }
1425
965
  }
1426
966
 
1427
967
  export interface PolicyCreateRuleParams {
1428
968
  /**
1429
- * Body param: Action to take if the conditions are true.
1430
- */
1431
- action: 'ALLOW' | 'DENY';
1432
-
1433
- /**
1434
- * Body param
1435
- */
1436
- conditions: Array<
1437
- | PolicyCreateRuleParams.EthereumTransactionCondition
1438
- | PolicyCreateRuleParams.EthereumCalldataCondition
1439
- | PolicyCreateRuleParams.EthereumTypedDataDomainCondition
1440
- | PolicyCreateRuleParams.EthereumTypedDataMessageCondition
1441
- | PolicyCreateRuleParams.Ethereum7702AuthorizationCondition
1442
- | PolicyCreateRuleParams.SolanaProgramInstructionCondition
1443
- | PolicyCreateRuleParams.SolanaSystemProgramInstructionCondition
1444
- | PolicyCreateRuleParams.SolanaTokenProgramInstructionCondition
1445
- | PolicyCreateRuleParams.SystemCondition
1446
- | TronTransactionCondition
1447
- | SuiTransactionCommandCondition
1448
- | SuiTransferObjectsCommandCondition
1449
- >;
1450
-
1451
- /**
1452
- * Body param: Method the rule applies to.
1453
- */
1454
- method:
1455
- | 'eth_sendTransaction'
1456
- | 'eth_signTransaction'
1457
- | 'eth_signUserOperation'
1458
- | 'eth_signTypedData_v4'
1459
- | 'eth_sign7702Authorization'
1460
- | 'signTransaction'
1461
- | 'signAndSendTransaction'
1462
- | 'exportPrivateKey'
1463
- | 'signTransactionBytes'
1464
- | '*';
1465
-
1466
- /**
1467
- * Body param
969
+ * Body param: The action to take when a policy rule matches.
1468
970
  */
1469
- name: string;
971
+ action: PolicyAction;
1470
972
 
1471
973
  /**
1472
- * Header param: Request authorization signature. If multiple signatures are
1473
- * required, they should be comma separated.
1474
- */
1475
- 'privy-authorization-signature'?: string;
1476
- }
1477
-
1478
- export namespace PolicyCreateRuleParams {
1479
- /**
1480
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1481
- * eth_sendTransaction request.
1482
- */
1483
- export interface EthereumTransactionCondition {
1484
- field: 'to' | 'value' | 'chain_id';
1485
-
1486
- field_source: 'ethereum_transaction';
1487
-
1488
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1489
-
1490
- value: string | Array<string>;
1491
- }
1492
-
1493
- /**
1494
- * The decoded calldata in a smart contract interaction as the smart contract
1495
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1496
- * an abi parameter with the JSON ABI of the smart contract.
1497
- */
1498
- export interface EthereumCalldataCondition {
1499
- abi: unknown;
1500
-
1501
- field: string;
1502
-
1503
- field_source: 'ethereum_calldata';
1504
-
1505
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1506
-
1507
- value: string | Array<string>;
1508
- }
1509
-
1510
- /**
1511
- * Attributes from the signing domain that will verify the signature.
1512
- */
1513
- export interface EthereumTypedDataDomainCondition {
1514
- field: 'chainId' | 'verifyingContract';
1515
-
1516
- field_source: 'ethereum_typed_data_domain';
1517
-
1518
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1519
-
1520
- value: string | Array<string>;
1521
- }
1522
-
1523
- /**
1524
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1525
- * EIP-712.
1526
- */
1527
- export interface EthereumTypedDataMessageCondition {
1528
- field: string;
1529
-
1530
- field_source: 'ethereum_typed_data_message';
1531
-
1532
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1533
-
1534
- typed_data: EthereumTypedDataMessageCondition.TypedData;
1535
-
1536
- value: string | Array<string>;
1537
- }
1538
-
1539
- export namespace EthereumTypedDataMessageCondition {
1540
- export interface TypedData {
1541
- primary_type: string;
1542
-
1543
- types: { [key: string]: Array<TypedData.Type> };
1544
- }
1545
-
1546
- export namespace TypedData {
1547
- export interface Type {
1548
- name: string;
1549
-
1550
- type: string;
1551
- }
1552
- }
1553
- }
1554
-
1555
- /**
1556
- * Allowed contract addresses for eth_sign7702Authorization requests.
1557
- */
1558
- export interface Ethereum7702AuthorizationCondition {
1559
- field: 'contract';
1560
-
1561
- field_source: 'ethereum_7702_authorization';
1562
-
1563
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1564
-
1565
- value: string | Array<string>;
1566
- }
1567
-
1568
- /**
1569
- * Solana Program attributes, enables allowlisting Solana Programs.
1570
- */
1571
- export interface SolanaProgramInstructionCondition {
1572
- field: 'programId';
1573
-
1574
- field_source: 'solana_program_instruction';
1575
-
1576
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1577
-
1578
- value: string | Array<string>;
1579
- }
1580
-
1581
- /**
1582
- * Solana System Program attributes, including more granular Transfer instruction
1583
- * fields.
1584
- */
1585
- export interface SolanaSystemProgramInstructionCondition {
1586
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1587
-
1588
- field_source: 'solana_system_program_instruction';
1589
-
1590
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1591
-
1592
- value: string | Array<string>;
1593
- }
1594
-
1595
- /**
1596
- * Solana Token Program attributes, including more granular TransferChecked
1597
- * instruction fields.
1598
- */
1599
- export interface SolanaTokenProgramInstructionCondition {
1600
- field:
1601
- | 'instructionName'
1602
- | 'TransferChecked.source'
1603
- | 'TransferChecked.destination'
1604
- | 'TransferChecked.authority'
1605
- | 'TransferChecked.amount'
1606
- | 'TransferChecked.mint';
1607
-
1608
- field_source: 'solana_token_program_instruction';
1609
-
1610
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1611
-
1612
- value: string | Array<string>;
1613
- }
974
+ * Body param
975
+ */
976
+ conditions: Array<PolicyCondition>;
1614
977
 
1615
978
  /**
1616
- * System attributes, including current unix timestamp (in seconds).
979
+ * Body param: Method the rule applies to.
1617
980
  */
1618
- export interface SystemCondition {
1619
- field: 'current_unix_timestamp';
981
+ method: PolicyMethod;
1620
982
 
1621
- field_source: 'system';
983
+ /**
984
+ * Body param
985
+ */
986
+ name: string;
1622
987
 
1623
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
988
+ /**
989
+ * Header param: Request authorization signature. If multiple signatures are
990
+ * required, they should be comma separated.
991
+ */
992
+ 'privy-authorization-signature'?: string;
1624
993
 
1625
- value: string | Array<string>;
1626
- }
994
+ /**
995
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
996
+ * representing the deadline by which the request must be processed.
997
+ */
998
+ 'privy-request-expiry'?: string;
1627
999
  }
1628
1000
 
1629
1001
  export interface PolicyDeleteParams {
@@ -1632,6 +1004,12 @@ export interface PolicyDeleteParams {
1632
1004
  * should be comma separated.
1633
1005
  */
1634
1006
  'privy-authorization-signature'?: string;
1007
+
1008
+ /**
1009
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
1010
+ * deadline by which the request must be processed.
1011
+ */
1012
+ 'privy-request-expiry'?: string;
1635
1013
  }
1636
1014
 
1637
1015
  export interface PolicyDeleteRuleParams {
@@ -1645,6 +1023,12 @@ export interface PolicyDeleteRuleParams {
1645
1023
  * required, they should be comma separated.
1646
1024
  */
1647
1025
  'privy-authorization-signature'?: string;
1026
+
1027
+ /**
1028
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1029
+ * representing the deadline by which the request must be processed.
1030
+ */
1031
+ 'privy-request-expiry'?: string;
1648
1032
  }
1649
1033
 
1650
1034
  export interface PolicyUpdateParams {
@@ -1654,240 +1038,33 @@ export interface PolicyUpdateParams {
1654
1038
  name?: string;
1655
1039
 
1656
1040
  /**
1657
- * Body param: The owner of the resource. If you provide this, do not specify an
1658
- * owner_id as it will be generated automatically. When updating a wallet, you can
1659
- * set the owner to null to remove the owner.
1041
+ * Body param: The owner of the resource, specified as a Privy user ID, a P-256
1042
+ * public key, or null to remove the current owner.
1660
1043
  */
1661
- owner?: PolicyUpdateParams.PublicKeyOwner | PolicyUpdateParams.UserOwner | null;
1044
+ owner?: SharedAPI.OwnerInput | null;
1662
1045
 
1663
1046
  /**
1664
- * Body param
1047
+ * Body param: The key quorum ID to set as the owner of the resource. If you
1048
+ * provide this, do not specify an owner.
1665
1049
  */
1666
- owner_id?: string | null;
1050
+ owner_id?: SharedAPI.OwnerIDInput | null;
1667
1051
 
1668
1052
  /**
1669
1053
  * Body param
1670
1054
  */
1671
- rules?: Array<PolicyUpdateParams.Rule>;
1055
+ rules?: Array<PolicyRuleRequestBody>;
1672
1056
 
1673
1057
  /**
1674
1058
  * Header param: Request authorization signature. If multiple signatures are
1675
1059
  * required, they should be comma separated.
1676
1060
  */
1677
1061
  'privy-authorization-signature'?: string;
1678
- }
1679
-
1680
- export namespace PolicyUpdateParams {
1681
- /**
1682
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
1683
- * If you provide this, do not specify an owner_id as it will be generated
1684
- * automatically.
1685
- */
1686
- export interface PublicKeyOwner {
1687
- public_key: string;
1688
- }
1689
-
1690
- /**
1691
- * The user ID of the owner of the resource. The user must already exist, and this
1692
- * value must start with "did:privy:". If you provide this, do not specify an
1693
- * owner_id as it will be generated automatically.
1694
- */
1695
- export interface UserOwner {
1696
- user_id: string;
1697
- }
1698
1062
 
1699
1063
  /**
1700
- * The rules that apply to each method the policy covers.
1064
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1065
+ * representing the deadline by which the request must be processed.
1701
1066
  */
1702
- export interface Rule {
1703
- /**
1704
- * Action to take if the conditions are true.
1705
- */
1706
- action: 'ALLOW' | 'DENY';
1707
-
1708
- conditions: Array<
1709
- | Rule.EthereumTransactionCondition
1710
- | Rule.EthereumCalldataCondition
1711
- | Rule.EthereumTypedDataDomainCondition
1712
- | Rule.EthereumTypedDataMessageCondition
1713
- | Rule.Ethereum7702AuthorizationCondition
1714
- | Rule.SolanaProgramInstructionCondition
1715
- | Rule.SolanaSystemProgramInstructionCondition
1716
- | Rule.SolanaTokenProgramInstructionCondition
1717
- | Rule.SystemCondition
1718
- | PoliciesAPI.TronTransactionCondition
1719
- | PoliciesAPI.SuiTransactionCommandCondition
1720
- | PoliciesAPI.SuiTransferObjectsCommandCondition
1721
- >;
1722
-
1723
- /**
1724
- * Method the rule applies to.
1725
- */
1726
- method:
1727
- | 'eth_sendTransaction'
1728
- | 'eth_signTransaction'
1729
- | 'eth_signUserOperation'
1730
- | 'eth_signTypedData_v4'
1731
- | 'eth_sign7702Authorization'
1732
- | 'signTransaction'
1733
- | 'signAndSendTransaction'
1734
- | 'exportPrivateKey'
1735
- | 'signTransactionBytes'
1736
- | '*';
1737
-
1738
- name: string;
1739
- }
1740
-
1741
- export namespace Rule {
1742
- /**
1743
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1744
- * eth_sendTransaction request.
1745
- */
1746
- export interface EthereumTransactionCondition {
1747
- field: 'to' | 'value' | 'chain_id';
1748
-
1749
- field_source: 'ethereum_transaction';
1750
-
1751
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1752
-
1753
- value: string | Array<string>;
1754
- }
1755
-
1756
- /**
1757
- * The decoded calldata in a smart contract interaction as the smart contract
1758
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1759
- * an abi parameter with the JSON ABI of the smart contract.
1760
- */
1761
- export interface EthereumCalldataCondition {
1762
- abi: unknown;
1763
-
1764
- field: string;
1765
-
1766
- field_source: 'ethereum_calldata';
1767
-
1768
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1769
-
1770
- value: string | Array<string>;
1771
- }
1772
-
1773
- /**
1774
- * Attributes from the signing domain that will verify the signature.
1775
- */
1776
- export interface EthereumTypedDataDomainCondition {
1777
- field: 'chainId' | 'verifyingContract';
1778
-
1779
- field_source: 'ethereum_typed_data_domain';
1780
-
1781
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1782
-
1783
- value: string | Array<string>;
1784
- }
1785
-
1786
- /**
1787
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1788
- * EIP-712.
1789
- */
1790
- export interface EthereumTypedDataMessageCondition {
1791
- field: string;
1792
-
1793
- field_source: 'ethereum_typed_data_message';
1794
-
1795
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1796
-
1797
- typed_data: EthereumTypedDataMessageCondition.TypedData;
1798
-
1799
- value: string | Array<string>;
1800
- }
1801
-
1802
- export namespace EthereumTypedDataMessageCondition {
1803
- export interface TypedData {
1804
- primary_type: string;
1805
-
1806
- types: { [key: string]: Array<TypedData.Type> };
1807
- }
1808
-
1809
- export namespace TypedData {
1810
- export interface Type {
1811
- name: string;
1812
-
1813
- type: string;
1814
- }
1815
- }
1816
- }
1817
-
1818
- /**
1819
- * Allowed contract addresses for eth_sign7702Authorization requests.
1820
- */
1821
- export interface Ethereum7702AuthorizationCondition {
1822
- field: 'contract';
1823
-
1824
- field_source: 'ethereum_7702_authorization';
1825
-
1826
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1827
-
1828
- value: string | Array<string>;
1829
- }
1830
-
1831
- /**
1832
- * Solana Program attributes, enables allowlisting Solana Programs.
1833
- */
1834
- export interface SolanaProgramInstructionCondition {
1835
- field: 'programId';
1836
-
1837
- field_source: 'solana_program_instruction';
1838
-
1839
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1840
-
1841
- value: string | Array<string>;
1842
- }
1843
-
1844
- /**
1845
- * Solana System Program attributes, including more granular Transfer instruction
1846
- * fields.
1847
- */
1848
- export interface SolanaSystemProgramInstructionCondition {
1849
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1850
-
1851
- field_source: 'solana_system_program_instruction';
1852
-
1853
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1854
-
1855
- value: string | Array<string>;
1856
- }
1857
-
1858
- /**
1859
- * Solana Token Program attributes, including more granular TransferChecked
1860
- * instruction fields.
1861
- */
1862
- export interface SolanaTokenProgramInstructionCondition {
1863
- field:
1864
- | 'instructionName'
1865
- | 'TransferChecked.source'
1866
- | 'TransferChecked.destination'
1867
- | 'TransferChecked.authority'
1868
- | 'TransferChecked.amount'
1869
- | 'TransferChecked.mint';
1870
-
1871
- field_source: 'solana_token_program_instruction';
1872
-
1873
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1874
-
1875
- value: string | Array<string>;
1876
- }
1877
-
1878
- /**
1879
- * System attributes, including current unix timestamp (in seconds).
1880
- */
1881
- export interface SystemCondition {
1882
- field: 'current_unix_timestamp';
1883
-
1884
- field_source: 'system';
1885
-
1886
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1887
-
1888
- value: string | Array<string>;
1889
- }
1890
- }
1067
+ 'privy-request-expiry'?: string;
1891
1068
  }
1892
1069
 
1893
1070
  export interface PolicyUpdateRuleParams {
@@ -1897,42 +1074,19 @@ export interface PolicyUpdateRuleParams {
1897
1074
  policy_id: string;
1898
1075
 
1899
1076
  /**
1900
- * Body param: Action to take if the conditions are true.
1077
+ * Body param: The action to take when a policy rule matches.
1901
1078
  */
1902
- action: 'ALLOW' | 'DENY';
1079
+ action: PolicyAction;
1903
1080
 
1904
1081
  /**
1905
1082
  * Body param
1906
1083
  */
1907
- conditions: Array<
1908
- | PolicyUpdateRuleParams.EthereumTransactionCondition
1909
- | PolicyUpdateRuleParams.EthereumCalldataCondition
1910
- | PolicyUpdateRuleParams.EthereumTypedDataDomainCondition
1911
- | PolicyUpdateRuleParams.EthereumTypedDataMessageCondition
1912
- | PolicyUpdateRuleParams.Ethereum7702AuthorizationCondition
1913
- | PolicyUpdateRuleParams.SolanaProgramInstructionCondition
1914
- | PolicyUpdateRuleParams.SolanaSystemProgramInstructionCondition
1915
- | PolicyUpdateRuleParams.SolanaTokenProgramInstructionCondition
1916
- | PolicyUpdateRuleParams.SystemCondition
1917
- | TronTransactionCondition
1918
- | SuiTransactionCommandCondition
1919
- | SuiTransferObjectsCommandCondition
1920
- >;
1084
+ conditions: Array<PolicyCondition>;
1921
1085
 
1922
1086
  /**
1923
1087
  * Body param: Method the rule applies to.
1924
1088
  */
1925
- method:
1926
- | 'eth_sendTransaction'
1927
- | 'eth_signTransaction'
1928
- | 'eth_signUserOperation'
1929
- | 'eth_signTypedData_v4'
1930
- | 'eth_sign7702Authorization'
1931
- | 'signTransaction'
1932
- | 'signAndSendTransaction'
1933
- | 'exportPrivateKey'
1934
- | 'signTransactionBytes'
1935
- | '*';
1089
+ method: PolicyMethod;
1936
1090
 
1937
1091
  /**
1938
1092
  * Body param
@@ -1944,157 +1098,12 @@ export interface PolicyUpdateRuleParams {
1944
1098
  * required, they should be comma separated.
1945
1099
  */
1946
1100
  'privy-authorization-signature'?: string;
1947
- }
1948
-
1949
- export namespace PolicyUpdateRuleParams {
1950
- /**
1951
- * The verbatim Ethereum transaction object in an eth_signTransaction or
1952
- * eth_sendTransaction request.
1953
- */
1954
- export interface EthereumTransactionCondition {
1955
- field: 'to' | 'value' | 'chain_id';
1956
-
1957
- field_source: 'ethereum_transaction';
1958
-
1959
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1960
-
1961
- value: string | Array<string>;
1962
- }
1963
-
1964
- /**
1965
- * The decoded calldata in a smart contract interaction as the smart contract
1966
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1967
- * an abi parameter with the JSON ABI of the smart contract.
1968
- */
1969
- export interface EthereumCalldataCondition {
1970
- abi: unknown;
1971
-
1972
- field: string;
1973
-
1974
- field_source: 'ethereum_calldata';
1975
-
1976
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1977
-
1978
- value: string | Array<string>;
1979
- }
1980
-
1981
- /**
1982
- * Attributes from the signing domain that will verify the signature.
1983
- */
1984
- export interface EthereumTypedDataDomainCondition {
1985
- field: 'chainId' | 'verifyingContract';
1986
-
1987
- field_source: 'ethereum_typed_data_domain';
1988
-
1989
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1990
-
1991
- value: string | Array<string>;
1992
- }
1993
-
1994
- /**
1995
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1996
- * EIP-712.
1997
- */
1998
- export interface EthereumTypedDataMessageCondition {
1999
- field: string;
2000
-
2001
- field_source: 'ethereum_typed_data_message';
2002
-
2003
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2004
-
2005
- typed_data: EthereumTypedDataMessageCondition.TypedData;
2006
-
2007
- value: string | Array<string>;
2008
- }
2009
-
2010
- export namespace EthereumTypedDataMessageCondition {
2011
- export interface TypedData {
2012
- primary_type: string;
2013
-
2014
- types: { [key: string]: Array<TypedData.Type> };
2015
- }
2016
-
2017
- export namespace TypedData {
2018
- export interface Type {
2019
- name: string;
2020
-
2021
- type: string;
2022
- }
2023
- }
2024
- }
2025
-
2026
- /**
2027
- * Allowed contract addresses for eth_sign7702Authorization requests.
2028
- */
2029
- export interface Ethereum7702AuthorizationCondition {
2030
- field: 'contract';
2031
-
2032
- field_source: 'ethereum_7702_authorization';
2033
-
2034
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2035
-
2036
- value: string | Array<string>;
2037
- }
2038
-
2039
- /**
2040
- * Solana Program attributes, enables allowlisting Solana Programs.
2041
- */
2042
- export interface SolanaProgramInstructionCondition {
2043
- field: 'programId';
2044
-
2045
- field_source: 'solana_program_instruction';
2046
-
2047
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2048
-
2049
- value: string | Array<string>;
2050
- }
2051
-
2052
- /**
2053
- * Solana System Program attributes, including more granular Transfer instruction
2054
- * fields.
2055
- */
2056
- export interface SolanaSystemProgramInstructionCondition {
2057
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
2058
-
2059
- field_source: 'solana_system_program_instruction';
2060
-
2061
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2062
-
2063
- value: string | Array<string>;
2064
- }
2065
-
2066
- /**
2067
- * Solana Token Program attributes, including more granular TransferChecked
2068
- * instruction fields.
2069
- */
2070
- export interface SolanaTokenProgramInstructionCondition {
2071
- field:
2072
- | 'instructionName'
2073
- | 'TransferChecked.source'
2074
- | 'TransferChecked.destination'
2075
- | 'TransferChecked.authority'
2076
- | 'TransferChecked.amount'
2077
- | 'TransferChecked.mint';
2078
-
2079
- field_source: 'solana_token_program_instruction';
2080
-
2081
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2082
-
2083
- value: string | Array<string>;
2084
- }
2085
1101
 
2086
1102
  /**
2087
- * System attributes, including current unix timestamp (in seconds).
1103
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1104
+ * representing the deadline by which the request must be processed.
2088
1105
  */
2089
- export interface SystemCondition {
2090
- field: 'current_unix_timestamp';
2091
-
2092
- field_source: 'system';
2093
-
2094
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2095
-
2096
- value: string | Array<string>;
2097
- }
1106
+ 'privy-request-expiry'?: string;
2098
1107
  }
2099
1108
 
2100
1109
  export interface PolicyGetRuleParams {
@@ -2103,17 +1112,33 @@ export interface PolicyGetRuleParams {
2103
1112
 
2104
1113
  export declare namespace Policies {
2105
1114
  export {
1115
+ type ConditionSetRequestParams as ConditionSetRequestParams,
1116
+ type ConditionSetItemRequestParams as ConditionSetItemRequestParams,
1117
+ type ConditionSetRequestBody as ConditionSetRequestBody,
1118
+ type ConditionSet as ConditionSet,
1119
+ type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody,
1120
+ type ConditionSetItemValueInput as ConditionSetItemValueInput,
1121
+ type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody,
1122
+ type ConditionSetItem as ConditionSetItem,
1123
+ type ConditionSetItems as ConditionSetItems,
1124
+ type ConditionSetItemsResponse as ConditionSetItemsResponse,
1125
+ type PolicyAction as PolicyAction,
1126
+ type AbiParameter as AbiParameter,
1127
+ type AbiSchema as AbiSchema,
2106
1128
  type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
2107
1129
  type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
2108
1130
  type TronTransactionCondition as TronTransactionCondition,
1131
+ type TronCalldataCondition as TronCalldataCondition,
2109
1132
  type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
2110
1133
  type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
1134
+ type AggregationCondition as AggregationCondition,
1135
+ type PolicyCondition as PolicyCondition,
1136
+ type PolicyMethod as PolicyMethod,
1137
+ type PolicyRuleRequestBody as PolicyRuleRequestBody,
1138
+ type PolicyRuleResponse as PolicyRuleResponse,
2111
1139
  type Policy as Policy,
2112
- type PolicyCreateRuleResponse as PolicyCreateRuleResponse,
2113
- type PolicyDeleteResponse as PolicyDeleteResponse,
2114
- type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse,
2115
- type PolicyUpdateRuleResponse as PolicyUpdateRuleResponse,
2116
- type PolicyGetRuleResponse as PolicyGetRuleResponse,
1140
+ type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
1141
+ type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders,
2117
1142
  type PolicyCreateParams as PolicyCreateParams,
2118
1143
  type PolicyCreateRuleParams as PolicyCreateRuleParams,
2119
1144
  type PolicyDeleteParams as PolicyDeleteParams,