@privy-io/api-types 0.23.0 → 0.24.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 (143) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/client.d.mts +16 -16
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +16 -16
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/aggregations.d.mts +1 -1
  12. package/resources/aggregations.d.mts.map +1 -1
  13. package/resources/aggregations.d.ts +1 -1
  14. package/resources/aggregations.d.ts.map +1 -1
  15. package/resources/apps.d.mts +88 -1
  16. package/resources/apps.d.mts.map +1 -1
  17. package/resources/apps.d.ts +88 -1
  18. package/resources/apps.d.ts.map +1 -1
  19. package/resources/cards.d.mts +83 -6
  20. package/resources/cards.d.mts.map +1 -1
  21. package/resources/cards.d.ts +83 -6
  22. package/resources/cards.d.ts.map +1 -1
  23. package/resources/client-auth.d.mts +1 -1
  24. package/resources/client-auth.d.mts.map +1 -1
  25. package/resources/client-auth.d.ts +1 -1
  26. package/resources/client-auth.d.ts.map +1 -1
  27. package/resources/fiat.d.mts +177 -1
  28. package/resources/fiat.d.mts.map +1 -1
  29. package/resources/fiat.d.ts +177 -1
  30. package/resources/fiat.d.ts.map +1 -1
  31. package/resources/index.d.mts +8 -8
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +8 -8
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +1 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/intents.d.mts +82 -4
  40. package/resources/intents.d.mts.map +1 -1
  41. package/resources/intents.d.ts +82 -4
  42. package/resources/intents.d.ts.map +1 -1
  43. package/resources/key-quorums.d.mts +14 -1
  44. package/resources/key-quorums.d.mts.map +1 -1
  45. package/resources/key-quorums.d.ts +14 -1
  46. package/resources/key-quorums.d.ts.map +1 -1
  47. package/resources/policies/condition-sets.d.mts +21 -0
  48. package/resources/policies/condition-sets.d.mts.map +1 -0
  49. package/resources/policies/condition-sets.d.ts +21 -0
  50. package/resources/policies/condition-sets.d.ts.map +1 -0
  51. package/resources/policies/condition-sets.js +9 -0
  52. package/resources/policies/condition-sets.js.map +1 -0
  53. package/resources/policies/condition-sets.mjs +5 -0
  54. package/resources/policies/condition-sets.mjs.map +1 -0
  55. package/resources/policies/index.d.mts +3 -0
  56. package/resources/policies/index.d.mts.map +1 -0
  57. package/resources/policies/index.d.ts +3 -0
  58. package/resources/policies/index.d.ts.map +1 -0
  59. package/resources/policies/index.js +9 -0
  60. package/resources/policies/index.js.map +1 -0
  61. package/resources/policies/index.mjs +4 -0
  62. package/resources/policies/index.mjs.map +1 -0
  63. package/resources/policies/policies.d.mts +775 -0
  64. package/resources/policies/policies.d.mts.map +1 -0
  65. package/resources/policies/policies.d.ts +775 -0
  66. package/resources/policies/policies.d.ts.map +1 -0
  67. package/resources/policies/policies.js +17 -0
  68. package/resources/policies/policies.js.map +1 -0
  69. package/resources/policies/policies.mjs +12 -0
  70. package/resources/policies/policies.mjs.map +1 -0
  71. package/resources/policies.d.mts +1 -698
  72. package/resources/policies.d.mts.map +1 -1
  73. package/resources/policies.d.ts +1 -698
  74. package/resources/policies.d.ts.map +1 -1
  75. package/resources/policies.js +2 -5
  76. package/resources/policies.js.map +1 -1
  77. package/resources/policies.mjs +1 -3
  78. package/resources/policies.mjs.map +1 -1
  79. package/resources/users.d.mts +25 -20
  80. package/resources/users.d.mts.map +1 -1
  81. package/resources/users.d.ts +25 -20
  82. package/resources/users.d.ts.map +1 -1
  83. package/resources/wallet-automations.d.mts +4 -0
  84. package/resources/wallet-automations.d.mts.map +1 -1
  85. package/resources/wallet-automations.d.ts +4 -0
  86. package/resources/wallet-automations.d.ts.map +1 -1
  87. package/resources/wallets/actions.d.mts +38 -11
  88. package/resources/wallets/actions.d.mts.map +1 -1
  89. package/resources/wallets/actions.d.ts +38 -11
  90. package/resources/wallets/actions.d.ts.map +1 -1
  91. package/resources/wallets/balance.d.mts +3 -3
  92. package/resources/wallets/balance.d.mts.map +1 -1
  93. package/resources/wallets/balance.d.ts +3 -3
  94. package/resources/wallets/balance.d.ts.map +1 -1
  95. package/resources/wallets/index.d.mts +2 -2
  96. package/resources/wallets/index.d.mts.map +1 -1
  97. package/resources/wallets/index.d.ts +2 -2
  98. package/resources/wallets/index.d.ts.map +1 -1
  99. package/resources/wallets/index.js.map +1 -1
  100. package/resources/wallets/index.mjs.map +1 -1
  101. package/resources/wallets/transactions.d.mts +4 -1
  102. package/resources/wallets/transactions.d.mts.map +1 -1
  103. package/resources/wallets/transactions.d.ts +4 -1
  104. package/resources/wallets/transactions.d.ts.map +1 -1
  105. package/resources/wallets/wallets.d.mts +60 -9
  106. package/resources/wallets/wallets.d.mts.map +1 -1
  107. package/resources/wallets/wallets.d.ts +60 -9
  108. package/resources/wallets/wallets.d.ts.map +1 -1
  109. package/resources/wallets/wallets.js.map +1 -1
  110. package/resources/wallets/wallets.mjs.map +1 -1
  111. package/resources/webhooks.d.mts +63 -1
  112. package/resources/webhooks.d.mts.map +1 -1
  113. package/resources/webhooks.d.ts +63 -1
  114. package/resources/webhooks.d.ts.map +1 -1
  115. package/resources/yield.d.mts +2 -2
  116. package/resources/yield.d.ts +2 -2
  117. package/src/client.ts +132 -56
  118. package/src/resources/aggregations.ts +1 -1
  119. package/src/resources/apps.ts +126 -0
  120. package/src/resources/cards.ts +107 -5
  121. package/src/resources/client-auth.ts +1 -1
  122. package/src/resources/fiat.ts +228 -0
  123. package/src/resources/index.ts +39 -1
  124. package/src/resources/intents.ts +114 -3
  125. package/src/resources/key-quorums.ts +16 -0
  126. package/src/resources/policies/condition-sets.ts +25 -0
  127. package/src/resources/policies/index.ts +63 -0
  128. package/src/resources/policies/policies.ts +1122 -0
  129. package/src/resources/policies.ts +1 -1023
  130. package/src/resources/users.ts +31 -25
  131. package/src/resources/wallet-automations.ts +5 -0
  132. package/src/resources/wallets/actions.ts +46 -10
  133. package/src/resources/wallets/balance.ts +3 -0
  134. package/src/resources/wallets/index.ts +4 -0
  135. package/src/resources/wallets/transactions.ts +4 -0
  136. package/src/resources/wallets/wallets.ts +71 -0
  137. package/src/resources/webhooks.ts +78 -0
  138. package/src/resources/yield.ts +2 -2
  139. package/src/version.ts +1 -1
  140. package/version.d.mts +1 -1
  141. package/version.d.ts +1 -1
  142. package/version.js +1 -1
  143. package/version.mjs +1 -1
@@ -1,1025 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../core/resource';
4
- import * as PoliciesAPI from './policies';
5
- import * as SharedAPI from './shared';
6
- import * as WalletsAPI from './wallets/wallets';
7
-
8
- export class Policies extends APIResource {}
9
-
10
- /**
11
- * A parameter in a Solidity ABI function or event definition.
12
- */
13
- export interface AbiParameter {
14
- type: string;
15
-
16
- components?: Array<{ [key: string]: unknown }>;
17
-
18
- indexed?: boolean;
19
-
20
- internalType?: string;
21
-
22
- name?: string;
23
- }
24
-
25
- /**
26
- * A Solidity ABI definition for decoding smart contract calldata.
27
- */
28
- export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
29
-
30
- export namespace AbiSchema {
31
- export interface AbiSchemaItem {
32
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
33
-
34
- anonymous?: boolean;
35
-
36
- inputs?: Array<PoliciesAPI.AbiParameter>;
37
-
38
- name?: string;
39
-
40
- outputs?: Array<PoliciesAPI.AbiParameter>;
41
-
42
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
43
- }
44
- }
45
-
46
- /**
47
- * Condition on the original wallet action API request body fields.
48
- */
49
- export interface ActionRequestBodyCondition {
50
- field: string;
51
-
52
- field_source: 'action_request_body';
53
-
54
- /**
55
- * Operator to use for policy conditions.
56
- */
57
- operator: ConditionOperator;
58
-
59
- /**
60
- * Value to compare against in a policy condition. Can be a single string or an
61
- * array of strings.
62
- */
63
- value: ConditionValue;
64
- }
65
-
66
- /**
67
- * Condition referencing an aggregation value. The field must start with
68
- * "aggregation." followed by the aggregation ID.
69
- */
70
- export interface AggregationCondition {
71
- field: string;
72
-
73
- field_source: 'reference';
74
-
75
- /**
76
- * Operator to use for policy conditions.
77
- */
78
- operator: ConditionOperator;
79
-
80
- /**
81
- * Value to compare against in a policy condition. Can be a single string or an
82
- * array of strings.
83
- */
84
- value: ConditionValue;
85
- }
86
-
87
- /**
88
- * Operator to use for policy conditions.
89
- */
90
- export type ConditionOperator =
91
- | 'eq'
92
- | 'gt'
93
- | 'gte'
94
- | 'lt'
95
- | 'lte'
96
- | 'in'
97
- | 'in_condition_set'
98
- | 'contains'
99
- | 'starts_with'
100
- | 'ends_with';
101
-
102
- /**
103
- * A condition set for grouping related condition values.
104
- */
105
- export interface ConditionSet {
106
- /**
107
- * Unique ID of the created condition set. This will be the primary identifier when
108
- * using the condition set in the future.
109
- */
110
- id: string;
111
-
112
- /**
113
- * Unix timestamp of when the condition set was created in milliseconds.
114
- */
115
- created_at: number;
116
-
117
- /**
118
- * Name of the condition set.
119
- */
120
- name: string;
121
-
122
- /**
123
- * A unique identifier for a key quorum.
124
- */
125
- owner_id: SharedAPI.KeyQuorumID | null;
126
- }
127
-
128
- /**
129
- * Headers required to authorize modifications to condition sets.
130
- */
131
- export interface ConditionSetAuthorizationHeaders {
132
- /**
133
- * ID of your Privy app.
134
- */
135
- 'privy-app-id': string;
136
-
137
- /**
138
- * Request authorization signature. If multiple signatures are required, they
139
- * should be comma separated.
140
- */
141
- 'privy-authorization-signature'?: string;
142
-
143
- /**
144
- * Request expiry. Value is a Unix timestamp in milliseconds representing the
145
- * deadline by which the request must be processed.
146
- */
147
- 'privy-request-expiry'?: string;
148
- }
149
-
150
- /**
151
- * A single item in a condition set.
152
- */
153
- export interface ConditionSetItem {
154
- /**
155
- * Unique ID of the created condition set item.
156
- */
157
- id: string;
158
-
159
- /**
160
- * Unique ID of the condition set this item belongs to.
161
- */
162
- condition_set_id: string;
163
-
164
- /**
165
- * Unix timestamp of when the condition set item was created in milliseconds.
166
- */
167
- created_at: number;
168
-
169
- /**
170
- * The value stored in this condition set item.
171
- */
172
- value: string;
173
- }
174
-
175
- /**
176
- * Unique IDs of the condition set and the condition set item within the condition
177
- * set to take actions on.
178
- */
179
- export interface ConditionSetItemRequestParams {
180
- condition_set_id: string;
181
-
182
- condition_set_item_id: string;
183
- }
184
-
185
- /**
186
- * A single value to add to a condition set.
187
- */
188
- export interface ConditionSetItemValueInput {
189
- value: string;
190
- }
191
-
192
- /**
193
- * Array of condition set items.
194
- */
195
- export type ConditionSetItems = Array<ConditionSetItem>;
196
-
197
- /**
198
- * Array of values to add to the condition set. Maximum 100 items per request.
199
- */
200
- export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
201
-
202
- /**
203
- * Paginated list of condition set items.
204
- */
205
- export interface ConditionSetItemsResponse {
206
- /**
207
- * List of condition set items.
208
- */
209
- items: Array<ConditionSetItem>;
210
-
211
- /**
212
- * Cursor for pagination. Null if there are no more items.
213
- */
214
- next_cursor: string | null;
215
- }
216
-
217
- /**
218
- * Request body for creating a condition set. Optionally provide `owner` or
219
- * `owner_id` (but not both) to specify ownership.
220
- */
221
- export interface ConditionSetRequestBody {
222
- /**
223
- * Name to assign to condition set.
224
- */
225
- name: string;
226
-
227
- /**
228
- * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
229
- * null to remove the current owner.
230
- */
231
- owner?: SharedAPI.OwnerInput | null;
232
-
233
- /**
234
- * The key quorum ID to set as the owner of the resource. If you provide this, do
235
- * not specify an owner.
236
- */
237
- owner_id?: SharedAPI.OwnerIDInput | null;
238
- }
239
-
240
- /**
241
- * Unique ID of the condition set to take actions on.
242
- */
243
- export interface ConditionSetRequestParams {
244
- condition_set_id: string;
245
- }
246
-
247
- /**
248
- * Value to compare against in a policy condition. Can be a single string or an
249
- * array of strings.
250
- */
251
- export type ConditionValue = string | Array<string>;
252
-
253
- /**
254
- * Allowed contract addresses for eth_sign7702Authorization requests.
255
- */
256
- export interface Ethereum7702AuthorizationCondition {
257
- field: 'contract';
258
-
259
- field_source: 'ethereum_7702_authorization';
260
-
261
- /**
262
- * Operator to use for policy conditions.
263
- */
264
- operator: ConditionOperator;
265
-
266
- /**
267
- * Value to compare against in a policy condition. Can be a single string or an
268
- * array of strings.
269
- */
270
- value: ConditionValue;
271
- }
272
-
273
- /**
274
- * The decoded calldata in a smart contract interaction as the smart contract
275
- * method's parameters. Note that 'ethereum_calldata' conditions must contain an
276
- * abi parameter with the JSON ABI of the smart contract.
277
- */
278
- export interface EthereumCalldataCondition {
279
- /**
280
- * A Solidity ABI definition for decoding smart contract calldata.
281
- */
282
- abi: AbiSchema;
283
-
284
- field: string;
285
-
286
- field_source: 'ethereum_calldata';
287
-
288
- /**
289
- * Operator to use for policy conditions.
290
- */
291
- operator: ConditionOperator;
292
-
293
- /**
294
- * Value to compare against in a policy condition. Can be a single string or an
295
- * array of strings.
296
- */
297
- value: ConditionValue;
298
- }
299
-
300
- /**
301
- * The verbatim Ethereum transaction object in an eth_signTransaction or
302
- * eth_sendTransaction request.
303
- */
304
- export interface EthereumTransactionCondition {
305
- /**
306
- * Ethereum transaction-level fields that can be referenced in a policy condition.
307
- */
308
- field: EthereumTransactionConditionField;
309
-
310
- field_source: 'ethereum_transaction';
311
-
312
- /**
313
- * Operator to use for policy conditions.
314
- */
315
- operator: ConditionOperator;
316
-
317
- /**
318
- * Value to compare against in a policy condition. Can be a single string or an
319
- * array of strings.
320
- */
321
- value: ConditionValue;
322
- }
323
-
324
- /**
325
- * Ethereum transaction-level fields that can be referenced in a policy condition.
326
- */
327
- export type EthereumTransactionConditionField = 'to' | 'value' | 'chain_id';
328
-
329
- /**
330
- * Attributes from the signing domain that will verify the signature.
331
- */
332
- export interface EthereumTypedDataDomainCondition {
333
- /**
334
- * Supported fields for Ethereum typed data domain conditions.
335
- */
336
- field: EthereumTypedDataDomainConditionField;
337
-
338
- field_source: 'ethereum_typed_data_domain';
339
-
340
- /**
341
- * Operator to use for policy conditions.
342
- */
343
- operator: ConditionOperator;
344
-
345
- /**
346
- * Value to compare against in a policy condition. Can be a single string or an
347
- * array of strings.
348
- */
349
- value: ConditionValue;
350
- }
351
-
352
- /**
353
- * Supported fields for Ethereum typed data domain conditions.
354
- */
355
- export type EthereumTypedDataDomainConditionField =
356
- | 'chainId'
357
- | 'verifyingContract'
358
- | 'chain_id'
359
- | 'verifying_contract';
360
-
361
- /**
362
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
363
- * EIP-712.
364
- */
365
- export interface EthereumTypedDataMessageCondition {
366
- field: string;
367
-
368
- field_source: 'ethereum_typed_data_message';
369
-
370
- /**
371
- * Operator to use for policy conditions.
372
- */
373
- operator: ConditionOperator;
374
-
375
- /**
376
- * The typed data structure containing EIP-712 types and the primary type for typed
377
- * data message policy conditions.
378
- */
379
- typed_data: TypedDataInput;
380
-
381
- /**
382
- * Value to compare against in a policy condition. Can be a single string or an
383
- * array of strings.
384
- */
385
- value: ConditionValue;
386
- }
387
-
388
- /**
389
- * Condition on the message being signed (e.g. in personal_sign).
390
- */
391
- export interface MessageSigningCondition {
392
- /**
393
- * Supported fields for message signing conditions.
394
- */
395
- field: MessageSigningField;
396
-
397
- field_source: 'message';
398
-
399
- /**
400
- * Operator to use for policy conditions.
401
- */
402
- operator: ConditionOperator;
403
-
404
- /**
405
- * Value to compare against in a policy condition. Can be a single string or an
406
- * array of strings.
407
- */
408
- value: ConditionValue;
409
- }
410
-
411
- /**
412
- * Supported fields for message signing conditions.
413
- */
414
- export type MessageSigningField = 'content' | 'byte_length';
415
-
416
- /**
417
- * A policy for controlling wallet operations.
418
- */
419
- export interface Policy {
420
- /**
421
- * Unique ID of the created policy. This will be the primary identifier when using
422
- * the policy in the future.
423
- */
424
- id: string;
425
-
426
- /**
427
- * The wallet chain types.
428
- */
429
- chain_type: WalletsAPI.WalletChainType;
430
-
431
- /**
432
- * Unix timestamp of when the policy was created in milliseconds.
433
- */
434
- created_at: number;
435
-
436
- /**
437
- * Name to assign to policy.
438
- */
439
- name: string;
440
-
441
- /**
442
- * A unique identifier for a key quorum.
443
- */
444
- owner_id: SharedAPI.KeyQuorumID | null;
445
-
446
- rules: Array<PolicyRuleResponse>;
447
-
448
- /**
449
- * Version of the policy. Currently, 1.0 is the only version.
450
- */
451
- version: '1.0';
452
- }
453
-
454
- /**
455
- * The action to take when a policy rule matches.
456
- */
457
- export type PolicyAction = 'ALLOW' | 'DENY';
458
-
459
- /**
460
- * Headers required to authorize modifications to policies.
461
- */
462
- export interface PolicyAuthorizationHeaders {
463
- /**
464
- * ID of your Privy app.
465
- */
466
- 'privy-app-id': string;
467
-
468
- /**
469
- * Request authorization signature. If multiple signatures are required, they
470
- * should be comma separated.
471
- */
472
- 'privy-authorization-signature'?: string;
473
-
474
- /**
475
- * Request expiry. Value is a Unix timestamp in milliseconds representing the
476
- * deadline by which the request must be processed.
477
- */
478
- 'privy-request-expiry'?: string;
479
- }
480
-
481
- /**
482
- * A condition that must be true for the rule action to be applied.
483
- */
484
- export type PolicyCondition =
485
- | EthereumTransactionCondition
486
- | EthereumCalldataCondition
487
- | EthereumTypedDataDomainCondition
488
- | EthereumTypedDataMessageCondition
489
- | Ethereum7702AuthorizationCondition
490
- | TempoTransactionCondition
491
- | SolanaProgramInstructionCondition
492
- | SolanaSystemProgramInstructionCondition
493
- | SolanaTokenProgramInstructionCondition
494
- | SystemCondition
495
- | TronTransactionCondition
496
- | TronCalldataCondition
497
- | XrplTransactionCondition
498
- | SuiTransactionCommandCondition
499
- | SuiTransferObjectsCommandCondition
500
- | ActionRequestBodyCondition
501
- | AggregationCondition
502
- | MessageSigningCondition;
503
-
504
- /**
505
- * Method the rule applies to.
506
- */
507
- export type PolicyMethod =
508
- | 'eth_sendTransaction'
509
- | 'eth_signTransaction'
510
- | 'eth_signUserOperation'
511
- | 'eth_signTypedData_v4'
512
- | 'personal_sign'
513
- | 'eth_sign7702Authorization'
514
- | 'wallet_sendCalls'
515
- | 'signTransaction'
516
- | 'signAndSendTransaction'
517
- | 'signMessage'
518
- | 'exportPrivateKey'
519
- | 'exportSeedPhrase'
520
- | 'signTransactionBytes'
521
- | 'signRawMessageBytes'
522
- | 'tron_sendTransaction'
523
- | 'tron_signTransaction'
524
- | 'xrpl_signTransaction'
525
- | 'earn_deposit'
526
- | 'earn_withdraw'
527
- | 'transfer'
528
- | '*';
529
-
530
- /**
531
- * Unique ID of the policy to take actions on.
532
- */
533
- export interface PolicyRequestBody {
534
- policy_id: string;
535
- }
536
-
537
- /**
538
- * The rules that apply to each method the policy covers.
539
- */
540
- export interface PolicyRuleRequestBody {
541
- /**
542
- * The action to take when a policy rule matches.
543
- */
544
- action: PolicyAction;
545
-
546
- conditions: Array<PolicyCondition>;
547
-
548
- /**
549
- * Method the rule applies to.
550
- */
551
- method: PolicyMethod;
552
-
553
- name: string;
554
- }
555
-
556
- /**
557
- * Unique IDs of the policy and the rule within the policy to take actions on.
558
- */
559
- export interface PolicyRuleRequestParams {
560
- policy_id: string;
561
-
562
- rule_id: string;
563
- }
564
-
565
- /**
566
- * A rule that defines the conditions and action to take if the conditions are
567
- * true.
568
- */
569
- export interface PolicyRuleResponse {
570
- id: string;
571
-
572
- /**
573
- * The action to take when a policy rule matches.
574
- */
575
- action: PolicyAction;
576
-
577
- conditions: Array<PolicyCondition>;
578
-
579
- /**
580
- * Method the rule applies to.
581
- */
582
- method: PolicyMethod;
583
-
584
- name: string;
585
- }
586
-
587
- /**
588
- * Solana Program attributes, enables allowlisting Solana Programs.
589
- */
590
- export interface SolanaProgramInstructionCondition {
591
- field: 'programId';
592
-
593
- field_source: 'solana_program_instruction';
594
-
595
- /**
596
- * Operator to use for policy conditions.
597
- */
598
- operator: ConditionOperator;
599
-
600
- /**
601
- * Value to compare against in a policy condition. Can be a single string or an
602
- * array of strings.
603
- */
604
- value: ConditionValue;
605
- }
606
-
607
- /**
608
- * Solana System Program attributes, including more granular Transfer instruction
609
- * fields.
610
- */
611
- export interface SolanaSystemProgramInstructionCondition {
612
- /**
613
- * Supported fields for Solana System Program conditions including Transfer
614
- * instruction fields.
615
- */
616
- field: SolanaSystemProgramInstructionConditionField;
617
-
618
- field_source: 'solana_system_program_instruction';
619
-
620
- /**
621
- * Operator to use for policy conditions.
622
- */
623
- operator: ConditionOperator;
624
-
625
- /**
626
- * Value to compare against in a policy condition. Can be a single string or an
627
- * array of strings.
628
- */
629
- value: ConditionValue;
630
- }
631
-
632
- /**
633
- * Supported fields for Solana System Program conditions including Transfer
634
- * instruction fields.
635
- */
636
- export type SolanaSystemProgramInstructionConditionField =
637
- | 'instructionName'
638
- | 'Transfer.from'
639
- | 'Transfer.to'
640
- | 'Transfer.lamports';
641
-
642
- /**
643
- * Solana Token Program attributes, including more granular TransferChecked
644
- * instruction fields.
645
- */
646
- export interface SolanaTokenProgramInstructionCondition {
647
- /**
648
- * Supported fields for Solana Token Program conditions including Transfer,
649
- * TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction
650
- * fields.
651
- */
652
- field: SolanaTokenProgramInstructionConditionField;
653
-
654
- field_source: 'solana_token_program_instruction';
655
-
656
- /**
657
- * Operator to use for policy conditions.
658
- */
659
- operator: ConditionOperator;
660
-
661
- /**
662
- * Value to compare against in a policy condition. Can be a single string or an
663
- * array of strings.
664
- */
665
- value: ConditionValue;
666
- }
667
-
668
- /**
669
- * Supported fields for Solana Token Program conditions including Transfer,
670
- * TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction
671
- * fields.
672
- */
673
- export type SolanaTokenProgramInstructionConditionField =
674
- | 'instructionName'
675
- | 'Transfer.source'
676
- | 'Transfer.destination'
677
- | 'Transfer.authority'
678
- | 'Transfer.amount'
679
- | 'TransferChecked.source'
680
- | 'TransferChecked.destination'
681
- | 'TransferChecked.authority'
682
- | 'TransferChecked.amount'
683
- | 'TransferChecked.mint'
684
- | 'Burn.account'
685
- | 'Burn.mint'
686
- | 'Burn.authority'
687
- | 'Burn.amount'
688
- | 'MintTo.mint'
689
- | 'MintTo.account'
690
- | 'MintTo.authority'
691
- | 'MintTo.amount'
692
- | 'CloseAccount.account'
693
- | 'CloseAccount.destination'
694
- | 'CloseAccount.authority'
695
- | 'InitializeAccount3.account'
696
- | 'InitializeAccount3.mint'
697
- | 'InitializeAccount3.owner';
698
-
699
- /**
700
- * SUI transaction command attributes, enables allowlisting specific command types.
701
- * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
702
- * 'in' operators are supported.
703
- */
704
- export interface SuiTransactionCommandCondition {
705
- field: 'commandName';
706
-
707
- field_source: 'sui_transaction_command';
708
-
709
- /**
710
- * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
711
- * supported for command names.
712
- */
713
- operator: SuiTransactionCommandOperator;
714
-
715
- /**
716
- * Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
717
- * 'MergeCoins'
718
- */
719
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
720
- }
721
-
722
- /**
723
- * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
724
- * supported for command names.
725
- */
726
- export type SuiTransactionCommandOperator = 'eq' | 'in';
727
-
728
- /**
729
- * SUI TransferObjects command attributes, including recipient and amount fields.
730
- */
731
- export interface SuiTransferObjectsCommandCondition {
732
- /**
733
- * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
734
- * and 'amount' are supported.
735
- */
736
- field: SuiTransferObjectsCommandField;
737
-
738
- field_source: 'sui_transfer_objects_command';
739
-
740
- /**
741
- * Operator to use for policy conditions.
742
- */
743
- operator: ConditionOperator;
744
-
745
- /**
746
- * Value to compare against in a policy condition. Can be a single string or an
747
- * array of strings.
748
- */
749
- value: ConditionValue;
750
- }
751
-
752
- /**
753
- * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
754
- * and 'amount' are supported.
755
- */
756
- export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
757
-
758
- /**
759
- * System attributes, including current unix timestamp (in seconds).
760
- */
761
- export interface SystemCondition {
762
- field: 'current_unix_timestamp';
763
-
764
- field_source: 'system';
765
-
766
- /**
767
- * Operator to use for policy conditions.
768
- */
769
- operator: ConditionOperator;
770
-
771
- /**
772
- * Value to compare against in a policy condition. Can be a single string or an
773
- * array of strings.
774
- */
775
- value: ConditionValue;
776
- }
777
-
778
- /**
779
- * A Tempo (type 118) transaction-level field. Evaluated once per transaction (not
780
- * per call).
781
- */
782
- export interface TempoTransactionCondition {
783
- /**
784
- * Tempo (type 118) transaction-level fields that can be referenced in a policy
785
- * condition.
786
- */
787
- field: TempoTransactionConditionField;
788
-
789
- field_source: 'tempo_transaction';
790
-
791
- /**
792
- * Operator to use for policy conditions.
793
- */
794
- operator: ConditionOperator;
795
-
796
- /**
797
- * Value to compare against in a policy condition. Can be a single string or an
798
- * array of strings.
799
- */
800
- value: ConditionValue;
801
- }
802
-
803
- /**
804
- * Tempo (type 118) transaction-level fields that can be referenced in a policy
805
- * condition.
806
- */
807
- export type TempoTransactionConditionField =
808
- | 'fee_token'
809
- | 'fee_payer_signature'
810
- | 'nonce_key'
811
- | 'valid_before'
812
- | 'valid_after';
813
-
814
- /**
815
- * Decoded calldata from a TRON TriggerSmartContract interaction.
816
- */
817
- export interface TronCalldataCondition {
818
- /**
819
- * A Solidity ABI definition for decoding smart contract calldata.
820
- */
821
- abi: AbiSchema;
822
-
823
- field: string;
824
-
825
- field_source: 'tron_trigger_smart_contract_data';
826
-
827
- /**
828
- * Operator to use for policy conditions.
829
- */
830
- operator: ConditionOperator;
831
-
832
- /**
833
- * Value to compare against in a policy condition. Can be a single string or an
834
- * array of strings.
835
- */
836
- value: ConditionValue;
837
- }
838
-
839
- /**
840
- * TRON transaction fields for TransferContract and TriggerSmartContract
841
- * transaction types.
842
- */
843
- export interface TronTransactionCondition {
844
- /**
845
- * Supported TRON transaction fields for TransferContract and TriggerSmartContract
846
- * in format "TransactionType.field_name".
847
- */
848
- field: TronTransactionConditionField;
849
-
850
- field_source: 'tron_transaction';
851
-
852
- /**
853
- * Operator to use for policy conditions.
854
- */
855
- operator: ConditionOperator;
856
-
857
- /**
858
- * Value to compare against in a policy condition. Can be a single string or an
859
- * array of strings.
860
- */
861
- value: ConditionValue;
862
- }
863
-
864
- /**
865
- * Supported TRON transaction fields for TransferContract and TriggerSmartContract
866
- * in format "TransactionType.field_name".
867
- */
868
- export type TronTransactionConditionField =
869
- | 'TransferContract.to_address'
870
- | 'TransferContract.amount'
871
- | 'TriggerSmartContract.contract_address'
872
- | 'TriggerSmartContract.call_value'
873
- | 'TriggerSmartContract.token_id'
874
- | 'TriggerSmartContract.call_token_value';
875
-
876
- /**
877
- * The typed data structure containing EIP-712 types and the primary type for typed
878
- * data message policy conditions.
879
- */
880
- export interface TypedDataInput {
881
- primary_type: string;
882
-
883
- /**
884
- * The type definitions for EIP-712 typed data signing.
885
- */
886
- types: WalletsAPI.TypedDataTypesInputParams;
887
- }
888
-
889
- /**
890
- * Request body for updating a condition set. At least one field must be provided.
891
- * `owner` and `owner_id` are mutually exclusive.
892
- */
893
- export interface UpdateConditionSetRequestBody {
894
- /**
895
- * Name to assign to condition set.
896
- */
897
- name?: string;
898
-
899
- /**
900
- * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
901
- * null to remove the current owner.
902
- */
903
- owner?: SharedAPI.OwnerInput | null;
904
-
905
- /**
906
- * The key quorum ID to set as the owner of the resource. If you provide this, do
907
- * not specify an owner.
908
- */
909
- owner_id?: SharedAPI.OwnerIDInput | null;
910
- }
911
-
912
- /**
913
- * Policy condition evaluated against decoded XRPL transaction fields.
914
- */
915
- export interface XrplTransactionCondition {
916
- /**
917
- * Supported XRPL transaction field paths for policy conditions.
918
- */
919
- field: XrplTransactionConditionField;
920
-
921
- field_source: 'xrpl_transaction';
922
-
923
- /**
924
- * Operator to use for policy conditions.
925
- */
926
- operator: ConditionOperator;
927
-
928
- /**
929
- * Value to compare against in a policy condition. Can be a single string or an
930
- * array of strings.
931
- */
932
- value: ConditionValue;
933
- }
934
-
935
- /**
936
- * Supported XRPL transaction field paths for policy conditions.
937
- */
938
- export type XrplTransactionConditionField =
939
- | 'TransactionType'
940
- | 'Payment.Destination'
941
- | 'Payment.DestinationTag'
942
- | 'Payment.Amount.drops'
943
- | 'Payment.Amount.value'
944
- | 'Payment.Amount.currency'
945
- | 'Payment.Amount.issuer'
946
- | 'Payment.SendMax.drops'
947
- | 'Payment.SendMax.value'
948
- | 'Payment.SendMax.currency'
949
- | 'Payment.SendMax.issuer'
950
- | 'Payment.DeliverMin.drops'
951
- | 'Payment.DeliverMin.value'
952
- | 'Payment.DeliverMin.currency'
953
- | 'Payment.DeliverMin.issuer'
954
- | 'OfferCreate.TakerPays.drops'
955
- | 'OfferCreate.TakerPays.value'
956
- | 'OfferCreate.TakerPays.currency'
957
- | 'OfferCreate.TakerPays.issuer'
958
- | 'OfferCreate.TakerGets.drops'
959
- | 'OfferCreate.TakerGets.value'
960
- | 'OfferCreate.TakerGets.currency'
961
- | 'OfferCreate.TakerGets.issuer'
962
- | 'OfferCreate.Expiration'
963
- | 'TrustSet.LimitAmount.value'
964
- | 'TrustSet.LimitAmount.currency'
965
- | 'TrustSet.LimitAmount.issuer'
966
- | 'TrustSet.QualityIn'
967
- | 'TrustSet.QualityOut';
968
-
969
- export declare namespace Policies {
970
- export {
971
- type AbiParameter as AbiParameter,
972
- type AbiSchema as AbiSchema,
973
- type ActionRequestBodyCondition as ActionRequestBodyCondition,
974
- type AggregationCondition as AggregationCondition,
975
- type ConditionOperator as ConditionOperator,
976
- type ConditionSet as ConditionSet,
977
- type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders,
978
- type ConditionSetItem as ConditionSetItem,
979
- type ConditionSetItemRequestParams as ConditionSetItemRequestParams,
980
- type ConditionSetItemValueInput as ConditionSetItemValueInput,
981
- type ConditionSetItems as ConditionSetItems,
982
- type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody,
983
- type ConditionSetItemsResponse as ConditionSetItemsResponse,
984
- type ConditionSetRequestBody as ConditionSetRequestBody,
985
- type ConditionSetRequestParams as ConditionSetRequestParams,
986
- type ConditionValue as ConditionValue,
987
- type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition,
988
- type EthereumCalldataCondition as EthereumCalldataCondition,
989
- type EthereumTransactionCondition as EthereumTransactionCondition,
990
- type EthereumTransactionConditionField as EthereumTransactionConditionField,
991
- type EthereumTypedDataDomainCondition as EthereumTypedDataDomainCondition,
992
- type EthereumTypedDataDomainConditionField as EthereumTypedDataDomainConditionField,
993
- type EthereumTypedDataMessageCondition as EthereumTypedDataMessageCondition,
994
- type MessageSigningCondition as MessageSigningCondition,
995
- type MessageSigningField as MessageSigningField,
996
- type Policy as Policy,
997
- type PolicyAction as PolicyAction,
998
- type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
999
- type PolicyCondition as PolicyCondition,
1000
- type PolicyMethod as PolicyMethod,
1001
- type PolicyRequestBody as PolicyRequestBody,
1002
- type PolicyRuleRequestBody as PolicyRuleRequestBody,
1003
- type PolicyRuleRequestParams as PolicyRuleRequestParams,
1004
- type PolicyRuleResponse as PolicyRuleResponse,
1005
- type SolanaProgramInstructionCondition as SolanaProgramInstructionCondition,
1006
- type SolanaSystemProgramInstructionCondition as SolanaSystemProgramInstructionCondition,
1007
- type SolanaSystemProgramInstructionConditionField as SolanaSystemProgramInstructionConditionField,
1008
- type SolanaTokenProgramInstructionCondition as SolanaTokenProgramInstructionCondition,
1009
- type SolanaTokenProgramInstructionConditionField as SolanaTokenProgramInstructionConditionField,
1010
- type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
1011
- type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
1012
- type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
1013
- type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
1014
- type SystemCondition as SystemCondition,
1015
- type TempoTransactionCondition as TempoTransactionCondition,
1016
- type TempoTransactionConditionField as TempoTransactionConditionField,
1017
- type TronCalldataCondition as TronCalldataCondition,
1018
- type TronTransactionCondition as TronTransactionCondition,
1019
- type TronTransactionConditionField as TronTransactionConditionField,
1020
- type TypedDataInput as TypedDataInput,
1021
- type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody,
1022
- type XrplTransactionCondition as XrplTransactionCondition,
1023
- type XrplTransactionConditionField as XrplTransactionConditionField,
1024
- };
1025
- }
3
+ export * from './policies/index';