@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,9 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as IntentsAPI from './intents';
5
+ import * as KeyQuorumsAPI from './key-quorums';
6
+ import * as PoliciesAPI from './policies';
7
+ import * as SharedAPI from './shared';
5
8
  import * as WalletsAPI from './wallets/wallets';
6
9
 
7
10
  export class Intents extends APIResource {}
@@ -9,7 +12,7 @@ export class Intents extends APIResource {}
9
12
  /**
10
13
  * Type of intent.
11
14
  */
12
- export type IntentType = 'KEY_QUORUM' | 'POLICY' | 'RULE' | 'RPC' | 'WALLET';
15
+ export type IntentType = 'KEY_QUORUM' | 'POLICY' | 'RULE' | 'RPC' | 'TRANSFER' | 'WALLET';
13
16
 
14
17
  /**
15
18
  * Current status of an intent.
@@ -17,676 +20,115 @@ export type IntentType = 'KEY_QUORUM' | 'POLICY' | 'RULE' | 'RPC' | 'WALLET';
17
20
  export type IntentStatus = 'pending' | 'executed' | 'failed' | 'expired' | 'rejected' | 'dismissed';
18
21
 
19
22
  /**
20
- * The original rule request. Method is POST (create), PATCH (update), or DELETE
21
- * (delete)
23
+ * Request details for an RPC intent.
22
24
  */
23
- export type RuleIntentRequestDetails =
24
- | RuleIntentRequestDetails.UnionMember0
25
- | RuleIntentRequestDetails.UnionMember1
26
- | RuleIntentRequestDetails.UnionMember2;
27
-
28
- export namespace RuleIntentRequestDetails {
29
- export interface UnionMember0 {
30
- body: UnionMember0.Body;
31
-
32
- method: 'POST';
33
-
34
- url: string;
35
- }
36
-
37
- export namespace UnionMember0 {
38
- export interface Body {
39
- action: 'ALLOW' | 'DENY';
40
-
41
- conditions: Array<
42
- | Body.UnionMember0
43
- | Body.UnionMember1
44
- | Body.UnionMember2
45
- | Body.UnionMember3
46
- | Body.UnionMember4
47
- | Body.UnionMember5
48
- | Body.UnionMember6
49
- | Body.UnionMember7
50
- | Body.UnionMember8
51
- | Body.UnionMember9
52
- | Body.UnionMember10
53
- | Body.UnionMember11
54
- | Body.UnionMember12
55
- | Body.UnionMember13
56
- >;
57
-
58
- method:
59
- | 'eth_sendTransaction'
60
- | 'eth_signTransaction'
61
- | 'eth_signTypedData_v4'
62
- | 'eth_signUserOperation'
63
- | 'eth_sign7702Authorization'
64
- | 'signTransaction'
65
- | 'signAndSendTransaction'
66
- | 'signTransactionBytes'
67
- | 'exportPrivateKey'
68
- | '*';
69
-
70
- name: string;
71
- }
72
-
73
- export namespace Body {
74
- export interface UnionMember0 {
75
- field: 'to' | 'value' | 'chain_id';
76
-
77
- field_source: 'ethereum_transaction';
78
-
79
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
80
-
81
- value: string | Array<string>;
82
- }
83
-
84
- export interface UnionMember1 {
85
- abi: Array<UnionMember1.Abi>;
86
-
87
- field: string;
88
-
89
- field_source: 'ethereum_calldata';
90
-
91
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
92
-
93
- value: string | Array<string>;
94
- }
95
-
96
- export namespace UnionMember1 {
97
- export interface Abi {
98
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
99
-
100
- anonymous?: boolean;
101
-
102
- inputs?: Array<Abi.Input>;
103
-
104
- name?: string;
105
-
106
- outputs?: Array<Abi.Output>;
107
-
108
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
109
- }
110
-
111
- export namespace Abi {
112
- export interface Input {
113
- type: string;
114
-
115
- components?: Array<unknown>;
116
-
117
- indexed?: boolean;
118
-
119
- internalType?: string;
120
-
121
- name?: string;
122
- }
123
-
124
- export interface Output {
125
- type: string;
126
-
127
- components?: Array<unknown>;
128
-
129
- indexed?: boolean;
130
-
131
- internalType?: string;
132
-
133
- name?: string;
134
- }
135
- }
136
- }
137
-
138
- export interface UnionMember2 {
139
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
140
-
141
- field_source: 'ethereum_typed_data_domain';
142
-
143
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
144
-
145
- value: string | Array<string>;
146
- }
147
-
148
- export interface UnionMember3 {
149
- field: string;
150
-
151
- field_source: 'ethereum_typed_data_message';
152
-
153
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
154
-
155
- typed_data: UnionMember3.TypedData;
156
-
157
- value: string | Array<string>;
158
- }
159
-
160
- export namespace UnionMember3 {
161
- export interface TypedData {
162
- primary_type: string;
163
-
164
- types: { [key: string]: Array<TypedData.Type> };
165
- }
166
-
167
- export namespace TypedData {
168
- export interface Type {
169
- name: string;
170
-
171
- type: string;
172
- }
173
- }
174
- }
175
-
176
- export interface UnionMember4 {
177
- field: 'contract';
178
-
179
- field_source: 'ethereum_7702_authorization';
180
-
181
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
182
-
183
- value: string | Array<string>;
184
- }
185
-
186
- export interface UnionMember5 {
187
- field: 'programId';
188
-
189
- field_source: 'solana_program_instruction';
190
-
191
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
192
-
193
- value: string | Array<string>;
194
- }
195
-
196
- export interface UnionMember6 {
197
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
198
-
199
- field_source: 'solana_system_program_instruction';
200
-
201
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
202
-
203
- value: string | Array<string>;
204
- }
205
-
206
- export interface UnionMember7 {
207
- field:
208
- | 'instructionName'
209
- | 'Transfer.source'
210
- | 'Transfer.destination'
211
- | 'Transfer.authority'
212
- | 'Transfer.amount'
213
- | 'TransferChecked.source'
214
- | 'TransferChecked.destination'
215
- | 'TransferChecked.authority'
216
- | 'TransferChecked.amount'
217
- | 'TransferChecked.mint'
218
- | 'Burn.account'
219
- | 'Burn.mint'
220
- | 'Burn.authority'
221
- | 'Burn.amount'
222
- | 'MintTo.mint'
223
- | 'MintTo.account'
224
- | 'MintTo.authority'
225
- | 'MintTo.amount'
226
- | 'CloseAccount.account'
227
- | 'CloseAccount.destination'
228
- | 'CloseAccount.authority'
229
- | 'InitializeAccount3.account'
230
- | 'InitializeAccount3.mint'
231
- | 'InitializeAccount3.owner';
232
-
233
- field_source: 'solana_token_program_instruction';
234
-
235
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
236
-
237
- value: string | Array<string>;
238
- }
239
-
240
- export interface UnionMember8 {
241
- field:
242
- | 'TransferContract.to_address'
243
- | 'TransferContract.amount'
244
- | 'TriggerSmartContract.contract_address'
245
- | 'TriggerSmartContract.call_value'
246
- | 'TriggerSmartContract.token_id'
247
- | 'TriggerSmartContract.call_token_value';
248
-
249
- field_source: 'tron_transaction';
250
-
251
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
252
-
253
- value: string | Array<string>;
254
- }
255
-
256
- export interface UnionMember9 {
257
- field: 'current_unix_timestamp';
258
-
259
- field_source: 'system';
260
-
261
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
262
-
263
- value: string | Array<string>;
264
- }
265
-
266
- export interface UnionMember10 {
267
- field: string;
268
-
269
- field_source: 'reference';
270
-
271
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
272
-
273
- value: string | Array<string>;
274
- }
275
-
276
- export interface UnionMember11 {
277
- abi: Array<UnionMember11.Abi>;
278
-
279
- field: string;
280
-
281
- field_source: 'tron_trigger_smart_contract_data';
282
-
283
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
284
-
285
- value: string | Array<string>;
286
- }
287
-
288
- export namespace UnionMember11 {
289
- export interface Abi {
290
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
291
-
292
- anonymous?: boolean;
293
-
294
- inputs?: Array<Abi.Input>;
295
-
296
- name?: string;
297
-
298
- outputs?: Array<Abi.Output>;
299
-
300
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
301
- }
302
-
303
- export namespace Abi {
304
- export interface Input {
305
- type: string;
306
-
307
- components?: Array<unknown>;
308
-
309
- indexed?: boolean;
310
-
311
- internalType?: string;
312
-
313
- name?: string;
314
- }
315
-
316
- export interface Output {
317
- type: string;
318
-
319
- components?: Array<unknown>;
320
-
321
- indexed?: boolean;
322
-
323
- internalType?: string;
25
+ export interface RpcIntentRequestDetails {
26
+ /**
27
+ * Request body for wallet RPC operations, discriminated by method.
28
+ */
29
+ body: WalletsAPI.WalletRpcRequestBody;
324
30
 
325
- name?: string;
326
- }
327
- }
328
- }
31
+ method: 'POST';
329
32
 
330
- export interface UnionMember12 {
331
- field: 'commandName';
33
+ url: string;
34
+ }
332
35
 
333
- field_source: 'sui_transaction_command';
36
+ /**
37
+ * Request details for a transfer intent.
38
+ */
39
+ export interface TransferIntentRequestDetails {
40
+ /**
41
+ * Request body for initiating a sponsored token transfer from an embedded wallet.
42
+ */
43
+ body: WalletsAPI.CreateTokenTransferRequest;
334
44
 
335
- operator: 'eq' | 'in';
45
+ method: 'POST';
336
46
 
337
- /**
338
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
339
- */
340
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
341
- }
47
+ url: string;
48
+ }
342
49
 
343
- export interface UnionMember13 {
344
- field: 'recipient' | 'amount';
50
+ /**
51
+ * Request details for a policy intent.
52
+ */
53
+ export interface PolicyIntentRequestDetails {
54
+ body: PolicyIntentRequestDetails.Body;
345
55
 
346
- field_source: 'sui_transfer_objects_command';
56
+ method: 'PATCH';
347
57
 
348
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
58
+ url: string;
59
+ }
349
60
 
350
- value: string | Array<string>;
351
- }
352
- }
353
- }
61
+ export namespace PolicyIntentRequestDetails {
62
+ export interface Body {
63
+ /**
64
+ * Name to assign to policy.
65
+ */
66
+ name?: string;
354
67
 
355
- export interface UnionMember1 {
356
- body: UnionMember1.Body;
68
+ /**
69
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
70
+ * null to remove the current owner.
71
+ */
72
+ owner?: SharedAPI.OwnerInput | null;
357
73
 
358
- method: 'PATCH';
74
+ /**
75
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
76
+ * not specify an owner.
77
+ */
78
+ owner_id?: SharedAPI.OwnerIDInput | null;
359
79
 
360
- url: string;
80
+ rules?: Array<PoliciesAPI.PolicyRuleRequestBody>;
361
81
  }
82
+ }
362
83
 
363
- export namespace UnionMember1 {
364
- export interface Body {
365
- action: 'ALLOW' | 'DENY';
366
-
367
- conditions: Array<
368
- | Body.UnionMember0
369
- | Body.UnionMember1
370
- | Body.UnionMember2
371
- | Body.UnionMember3
372
- | Body.UnionMember4
373
- | Body.UnionMember5
374
- | Body.UnionMember6
375
- | Body.UnionMember7
376
- | Body.UnionMember8
377
- | Body.UnionMember9
378
- | Body.UnionMember10
379
- | Body.UnionMember11
380
- | Body.UnionMember12
381
- | Body.UnionMember13
382
- >;
383
-
384
- method:
385
- | 'eth_sendTransaction'
386
- | 'eth_signTransaction'
387
- | 'eth_signTypedData_v4'
388
- | 'eth_signUserOperation'
389
- | 'eth_sign7702Authorization'
390
- | 'signTransaction'
391
- | 'signAndSendTransaction'
392
- | 'signTransactionBytes'
393
- | 'exportPrivateKey'
394
- | '*';
395
-
396
- name: string;
397
- }
398
-
399
- export namespace Body {
400
- export interface UnionMember0 {
401
- field: 'to' | 'value' | 'chain_id';
402
-
403
- field_source: 'ethereum_transaction';
404
-
405
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
406
-
407
- value: string | Array<string>;
408
- }
409
-
410
- export interface UnionMember1 {
411
- abi: Array<UnionMember1.Abi>;
412
-
413
- field: string;
414
-
415
- field_source: 'ethereum_calldata';
416
-
417
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
418
-
419
- value: string | Array<string>;
420
- }
421
-
422
- export namespace UnionMember1 {
423
- export interface Abi {
424
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
425
-
426
- anonymous?: boolean;
427
-
428
- inputs?: Array<Abi.Input>;
429
-
430
- name?: string;
431
-
432
- outputs?: Array<Abi.Output>;
433
-
434
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
435
- }
436
-
437
- export namespace Abi {
438
- export interface Input {
439
- type: string;
440
-
441
- components?: Array<unknown>;
442
-
443
- indexed?: boolean;
444
-
445
- internalType?: string;
446
-
447
- name?: string;
448
- }
449
-
450
- export interface Output {
451
- type: string;
452
-
453
- components?: Array<unknown>;
454
-
455
- indexed?: boolean;
456
-
457
- internalType?: string;
458
-
459
- name?: string;
460
- }
461
- }
462
- }
463
-
464
- export interface UnionMember2 {
465
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
466
-
467
- field_source: 'ethereum_typed_data_domain';
468
-
469
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
470
-
471
- value: string | Array<string>;
472
- }
473
-
474
- export interface UnionMember3 {
475
- field: string;
476
-
477
- field_source: 'ethereum_typed_data_message';
478
-
479
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
480
-
481
- typed_data: UnionMember3.TypedData;
482
-
483
- value: string | Array<string>;
484
- }
485
-
486
- export namespace UnionMember3 {
487
- export interface TypedData {
488
- primary_type: string;
489
-
490
- types: { [key: string]: Array<TypedData.Type> };
491
- }
492
-
493
- export namespace TypedData {
494
- export interface Type {
495
- name: string;
496
-
497
- type: string;
498
- }
499
- }
500
- }
501
-
502
- export interface UnionMember4 {
503
- field: 'contract';
504
-
505
- field_source: 'ethereum_7702_authorization';
506
-
507
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
508
-
509
- value: string | Array<string>;
510
- }
511
-
512
- export interface UnionMember5 {
513
- field: 'programId';
514
-
515
- field_source: 'solana_program_instruction';
516
-
517
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
518
-
519
- value: string | Array<string>;
520
- }
521
-
522
- export interface UnionMember6 {
523
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
524
-
525
- field_source: 'solana_system_program_instruction';
526
-
527
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
528
-
529
- value: string | Array<string>;
530
- }
531
-
532
- export interface UnionMember7 {
533
- field:
534
- | 'instructionName'
535
- | 'Transfer.source'
536
- | 'Transfer.destination'
537
- | 'Transfer.authority'
538
- | 'Transfer.amount'
539
- | 'TransferChecked.source'
540
- | 'TransferChecked.destination'
541
- | 'TransferChecked.authority'
542
- | 'TransferChecked.amount'
543
- | 'TransferChecked.mint'
544
- | 'Burn.account'
545
- | 'Burn.mint'
546
- | 'Burn.authority'
547
- | 'Burn.amount'
548
- | 'MintTo.mint'
549
- | 'MintTo.account'
550
- | 'MintTo.authority'
551
- | 'MintTo.amount'
552
- | 'CloseAccount.account'
553
- | 'CloseAccount.destination'
554
- | 'CloseAccount.authority'
555
- | 'InitializeAccount3.account'
556
- | 'InitializeAccount3.mint'
557
- | 'InitializeAccount3.owner';
558
-
559
- field_source: 'solana_token_program_instruction';
560
-
561
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
562
-
563
- value: string | Array<string>;
564
- }
565
-
566
- export interface UnionMember8 {
567
- field:
568
- | 'TransferContract.to_address'
569
- | 'TransferContract.amount'
570
- | 'TriggerSmartContract.contract_address'
571
- | 'TriggerSmartContract.call_value'
572
- | 'TriggerSmartContract.token_id'
573
- | 'TriggerSmartContract.call_token_value';
574
-
575
- field_source: 'tron_transaction';
576
-
577
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
578
-
579
- value: string | Array<string>;
580
- }
581
-
582
- export interface UnionMember9 {
583
- field: 'current_unix_timestamp';
584
-
585
- field_source: 'system';
586
-
587
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
588
-
589
- value: string | Array<string>;
590
- }
591
-
592
- export interface UnionMember10 {
593
- field: string;
594
-
595
- field_source: 'reference';
596
-
597
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
598
-
599
- value: string | Array<string>;
600
- }
601
-
602
- export interface UnionMember11 {
603
- abi: Array<UnionMember11.Abi>;
604
-
605
- field: string;
606
-
607
- field_source: 'tron_trigger_smart_contract_data';
608
-
609
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
610
-
611
- value: string | Array<string>;
612
- }
613
-
614
- export namespace UnionMember11 {
615
- export interface Abi {
616
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
617
-
618
- anonymous?: boolean;
619
-
620
- inputs?: Array<Abi.Input>;
621
-
622
- name?: string;
623
-
624
- outputs?: Array<Abi.Output>;
625
-
626
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
627
- }
628
-
629
- export namespace Abi {
630
- export interface Input {
631
- type: string;
632
-
633
- components?: Array<unknown>;
634
-
635
- indexed?: boolean;
636
-
637
- internalType?: string;
638
-
639
- name?: string;
640
- }
641
-
642
- export interface Output {
643
- type: string;
644
-
645
- components?: Array<unknown>;
646
-
647
- indexed?: boolean;
648
-
649
- internalType?: string;
650
-
651
- name?: string;
652
- }
653
- }
654
- }
655
-
656
- export interface UnionMember12 {
657
- field: 'commandName';
658
-
659
- field_source: 'sui_transaction_command';
660
-
661
- operator: 'eq' | 'in';
84
+ /**
85
+ * Request details for creating a rule via intent.
86
+ */
87
+ export interface RuleIntentCreateRequestDetails {
88
+ /**
89
+ * The rules that apply to each method the policy covers.
90
+ */
91
+ body: PoliciesAPI.PolicyRuleRequestBody;
662
92
 
663
- /**
664
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
665
- */
666
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
667
- }
93
+ method: 'POST';
668
94
 
669
- export interface UnionMember13 {
670
- field: 'recipient' | 'amount';
95
+ url: string;
96
+ }
671
97
 
672
- field_source: 'sui_transfer_objects_command';
98
+ /**
99
+ * Request details for updating a rule via intent.
100
+ */
101
+ export interface RuleIntentUpdateRequestDetails {
102
+ /**
103
+ * The rules that apply to each method the policy covers.
104
+ */
105
+ body: PoliciesAPI.PolicyRuleRequestBody;
673
106
 
674
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
107
+ method: 'PATCH';
675
108
 
676
- value: string | Array<string>;
677
- }
678
- }
679
- }
109
+ url: string;
110
+ }
680
111
 
681
- export interface UnionMember2 {
682
- method: 'DELETE';
112
+ /**
113
+ * Request details for deleting a rule via intent.
114
+ */
115
+ export interface RuleIntentDeleteRequestDetails {
116
+ method: 'DELETE';
683
117
 
684
- url: string;
118
+ url: string;
685
119
 
686
- body?: unknown;
687
- }
120
+ body?: unknown;
688
121
  }
689
122
 
123
+ /**
124
+ * The original rule request. Method is POST (create), PATCH (update), or DELETE
125
+ * (delete)
126
+ */
127
+ export type RuleIntentRequestDetails =
128
+ | RuleIntentCreateRequestDetails
129
+ | RuleIntentUpdateRequestDetails
130
+ | RuleIntentDeleteRequestDetails;
131
+
690
132
  /**
691
133
  * A leaf member (user or key) of a nested key quorum in an intent authorization.
692
134
  */
@@ -813,49 +255,30 @@ export interface IntentAuthorization {
813
255
  }
814
256
 
815
257
  /**
816
- * Common fields for intent action execution results.
258
+ * Common fields shared by all intent response types.
817
259
  */
818
- export interface BaseActionResult {
260
+ export interface BaseIntentResponse {
819
261
  /**
820
- * Unix timestamp when the action was executed
262
+ * Detailed authorization information including key quorum members, thresholds, and
263
+ * signature status
821
264
  */
822
- executed_at: number;
265
+ authorization_details: Array<IntentAuthorization>;
823
266
 
824
267
  /**
825
- * HTTP status code from the action execution
268
+ * Unix timestamp when the intent was created
826
269
  */
827
- status_code: number;
270
+ created_at: number;
828
271
 
829
272
  /**
830
- * Display name of the key quorum that authorized execution
273
+ * Display name of the user who created the intent
831
274
  */
832
- authorized_by_display_name?: string;
275
+ created_by_display_name: string;
833
276
 
834
277
  /**
835
- * ID of the key quorum that authorized execution
278
+ * Whether this intent has a custom expiry time set by the client. If false, the
279
+ * intent expires after a default duration.
836
280
  */
837
- authorized_by_id?: string;
838
- }
839
-
840
- /**
841
- * Response for an RPC intent
842
- */
843
- export interface RpcIntentResponse {
844
- /**
845
- * Detailed authorization information including key quorum members, thresholds, and
846
- * signature status
847
- */
848
- authorization_details: Array<IntentAuthorization>;
849
-
850
- /**
851
- * Unix timestamp when the intent was created
852
- */
853
- created_at: number;
854
-
855
- /**
856
- * Display name of the user who created the intent
857
- */
858
- created_by_display_name: string;
281
+ custom_expiry: boolean;
859
282
 
860
283
  /**
861
284
  * Unix timestamp when the intent expires
@@ -867,13 +290,6 @@ export interface RpcIntentResponse {
867
290
  */
868
291
  intent_id: string;
869
292
 
870
- intent_type: 'RPC';
871
-
872
- /**
873
- * The original RPC request that would be sent to the wallet endpoint
874
- */
875
- request_details: RpcIntentResponse.RequestDetails;
876
-
877
293
  /**
878
294
  * ID of the resource being modified (wallet_id, policy_id, etc)
879
295
  */
@@ -884,23 +300,12 @@ export interface RpcIntentResponse {
884
300
  */
885
301
  status: IntentStatus;
886
302
 
887
- /**
888
- * Result of RPC execution (only present if status is 'executed' or 'failed')
889
- */
890
- action_result?: BaseActionResult;
891
-
892
303
  /**
893
304
  * ID of the user who created the intent. If undefined, the intent was created
894
305
  * using the app secret
895
306
  */
896
307
  created_by_id?: string;
897
308
 
898
- /**
899
- * Current state of the wallet before any changes. If undefined, the resource was
900
- * deleted and no longer exists
901
- */
902
- current_resource_data?: RpcIntentResponse.CurrentResourceData;
903
-
904
309
  /**
905
310
  * Human-readable reason for dismissal, present when status is 'dismissed'
906
311
  */
@@ -917,2490 +322,355 @@ export interface RpcIntentResponse {
917
322
  rejected_at?: number;
918
323
  }
919
324
 
920
- export namespace RpcIntentResponse {
325
+ /**
326
+ * Common fields for intent action execution results.
327
+ */
328
+ export interface BaseActionResult {
921
329
  /**
922
- * The original RPC request that would be sent to the wallet endpoint
330
+ * Unix timestamp when the action was executed
923
331
  */
924
- export interface RequestDetails {
925
- body:
926
- | RequestDetails.UnionMember0
927
- | RequestDetails.UnionMember1
928
- | RequestDetails.UnionMember2
929
- | RequestDetails.UnionMember3
930
- | RequestDetails.UnionMember4
931
- | RequestDetails.UnionMember5
932
- | RequestDetails.UnionMember6
933
- | RequestDetails.UnionMember7
934
- | RequestDetails.UnionMember8
935
- | RequestDetails.UnionMember9
936
- | RequestDetails.UnionMember10
937
- | RequestDetails.UnionMember11
938
- | RequestDetails.UnionMember12
939
- | RequestDetails.UnionMember13
940
- | RequestDetails.UnionMember14
941
- | RequestDetails.UnionMember15
942
- | RequestDetails.UnionMember16
943
- | RequestDetails.UnionMember17
944
- | RequestDetails.UnionMember18
945
- | RequestDetails.UnionMember19;
946
-
947
- method: 'POST';
948
-
949
- url: string;
950
- }
332
+ executed_at: number;
951
333
 
952
- export namespace RequestDetails {
953
- export interface UnionMember0 {
954
- method: 'eth_signTransaction';
334
+ /**
335
+ * HTTP status code from the action execution
336
+ */
337
+ status_code: number;
955
338
 
956
- params: UnionMember0.Params;
339
+ /**
340
+ * Display name of the key quorum that authorized execution
341
+ */
342
+ authorized_by_display_name?: string;
957
343
 
958
- address?: string;
344
+ /**
345
+ * ID of the key quorum that authorized execution
346
+ */
347
+ authorized_by_id?: string;
348
+ }
959
349
 
960
- chain_type?: 'ethereum';
350
+ /**
351
+ * Response for an RPC intent
352
+ */
353
+ export interface RpcIntentResponse extends BaseIntentResponse {
354
+ intent_type: 'RPC';
961
355
 
962
- wallet_id?: string;
963
- }
356
+ /**
357
+ * The original RPC request that would be sent to the wallet endpoint
358
+ */
359
+ request_details: RpcIntentResponse.RequestDetails;
964
360
 
965
- export namespace UnionMember0 {
966
- export interface Params {
967
- transaction: Params.Transaction;
968
- }
361
+ /**
362
+ * Result of RPC execution (only present if status is 'executed' or 'failed')
363
+ */
364
+ action_result?: BaseActionResult;
969
365
 
970
- export namespace Params {
971
- export interface Transaction {
972
- authorization_list?: Array<Transaction.AuthorizationList>;
366
+ /**
367
+ * A wallet managed by Privy's wallet infrastructure.
368
+ */
369
+ current_resource_data?: WalletsAPI.Wallet;
370
+ }
973
371
 
974
- chain_id?: string | number;
372
+ export namespace RpcIntentResponse {
373
+ /**
374
+ * The original RPC request that would be sent to the wallet endpoint
375
+ */
376
+ export interface RequestDetails {
377
+ /**
378
+ * Request body for wallet RPC operations, discriminated by method.
379
+ */
380
+ body: WalletsAPI.WalletRpcRequestBody;
975
381
 
976
- data?: string;
382
+ method: 'POST';
977
383
 
978
- from?: string;
384
+ url: string;
385
+ }
386
+ }
979
387
 
980
- gas_limit?: string | number;
388
+ /**
389
+ * Response for a transfer intent
390
+ */
391
+ export interface TransferIntentResponse extends BaseIntentResponse {
392
+ intent_type: 'TRANSFER';
981
393
 
982
- gas_price?: string | number;
394
+ /**
395
+ * The original transfer request that would be sent to the wallet transfer endpoint
396
+ */
397
+ request_details: TransferIntentResponse.RequestDetails;
983
398
 
984
- max_fee_per_gas?: string | number;
399
+ /**
400
+ * Result of transfer execution (only present if intent status is 'executed' or
401
+ * 'failed')
402
+ */
403
+ action_result?: BaseActionResult;
985
404
 
986
- max_priority_fee_per_gas?: string | number;
405
+ /**
406
+ * A wallet managed by Privy's wallet infrastructure.
407
+ */
408
+ current_resource_data?: WalletsAPI.Wallet;
409
+ }
987
410
 
988
- nonce?: string | number;
411
+ export namespace TransferIntentResponse {
412
+ /**
413
+ * The original transfer request that would be sent to the wallet transfer endpoint
414
+ */
415
+ export interface RequestDetails {
416
+ /**
417
+ * Request body for initiating a sponsored token transfer from an embedded wallet.
418
+ */
419
+ body: WalletsAPI.CreateTokenTransferRequest;
989
420
 
990
- to?: string;
421
+ method: 'POST';
991
422
 
992
- type?: 0 | 1 | 2 | 4;
423
+ url: string;
424
+ }
425
+ }
993
426
 
994
- value?: string | number;
995
- }
427
+ /**
428
+ * Response for a wallet intent
429
+ */
430
+ export interface WalletIntentResponse extends BaseIntentResponse {
431
+ intent_type: 'WALLET';
996
432
 
997
- export namespace Transaction {
998
- export interface AuthorizationList {
999
- chain_id: string | number;
433
+ /**
434
+ * The original wallet update request that would be sent to the wallet endpoint
435
+ */
436
+ request_details: WalletIntentResponse.RequestDetails;
1000
437
 
1001
- contract: string;
438
+ /**
439
+ * Result of wallet update execution (only present if status is 'executed' or
440
+ * 'failed')
441
+ */
442
+ action_result?: BaseActionResult;
1002
443
 
1003
- nonce: string | number;
444
+ /**
445
+ * A wallet managed by Privy's wallet infrastructure.
446
+ */
447
+ current_resource_data?: WalletsAPI.Wallet;
448
+ }
1004
449
 
1005
- r: string;
450
+ export namespace WalletIntentResponse {
451
+ /**
452
+ * The original wallet update request that would be sent to the wallet endpoint
453
+ */
454
+ export interface RequestDetails {
455
+ body: RequestDetails.Body;
1006
456
 
1007
- s: string;
457
+ method: 'PATCH';
1008
458
 
1009
- y_parity: number;
1010
- }
1011
- }
1012
- }
1013
- }
459
+ url: string;
460
+ }
1014
461
 
1015
- export interface UnionMember1 {
1016
- caip2: string;
462
+ export namespace RequestDetails {
463
+ export interface Body {
464
+ /**
465
+ * Additional signers for the wallet.
466
+ */
467
+ additional_signers?: WalletsAPI.AdditionalSignerInput;
1017
468
 
1018
- method: 'eth_sendTransaction';
469
+ authorization_key_ids?: Array<string>;
1019
470
 
1020
- params: UnionMember1.Params;
471
+ authorization_threshold?: number;
1021
472
 
1022
- address?: string;
473
+ display_name?: string | null;
1023
474
 
1024
- chain_type?: 'ethereum';
475
+ /**
476
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
477
+ * null to remove the current owner.
478
+ */
479
+ owner?: SharedAPI.OwnerInput | null;
1025
480
 
1026
- sponsor?: boolean;
481
+ /**
482
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
483
+ * not specify an owner.
484
+ */
485
+ owner_id?: SharedAPI.OwnerIDInput | null;
1027
486
 
1028
- wallet_id?: string;
487
+ /**
488
+ * An optional list of up to one policy ID to enforce on the wallet.
489
+ */
490
+ policy_ids?: WalletsAPI.PolicyInput;
1029
491
  }
492
+ }
493
+ }
1030
494
 
1031
- export namespace UnionMember1 {
1032
- export interface Params {
1033
- transaction: Params.Transaction;
1034
- }
1035
-
1036
- export namespace Params {
1037
- export interface Transaction {
1038
- authorization_list?: Array<Transaction.AuthorizationList>;
1039
-
1040
- chain_id?: string | number;
1041
-
1042
- data?: string;
1043
-
1044
- from?: string;
1045
-
1046
- gas_limit?: string | number;
1047
-
1048
- gas_price?: string | number;
1049
-
1050
- max_fee_per_gas?: string | number;
1051
-
1052
- max_priority_fee_per_gas?: string | number;
495
+ /**
496
+ * Response for a policy intent
497
+ */
498
+ export interface PolicyIntentResponse extends BaseIntentResponse {
499
+ intent_type: 'POLICY';
1053
500
 
1054
- nonce?: string | number;
501
+ /**
502
+ * The original policy update request that would be sent to the policy endpoint
503
+ */
504
+ request_details: PolicyIntentResponse.RequestDetails;
1055
505
 
1056
- to?: string;
506
+ /**
507
+ * Result of policy update execution (only present if status is 'executed' or
508
+ * 'failed')
509
+ */
510
+ action_result?: BaseActionResult;
1057
511
 
1058
- type?: 0 | 1 | 2 | 4;
512
+ /**
513
+ * A policy for controlling wallet operations.
514
+ */
515
+ current_resource_data?: PoliciesAPI.Policy;
516
+ }
1059
517
 
1060
- value?: string | number;
1061
- }
518
+ export namespace PolicyIntentResponse {
519
+ /**
520
+ * The original policy update request that would be sent to the policy endpoint
521
+ */
522
+ export interface RequestDetails {
523
+ body: RequestDetails.Body;
1062
524
 
1063
- export namespace Transaction {
1064
- export interface AuthorizationList {
1065
- chain_id: string | number;
525
+ method: 'PATCH';
1066
526
 
1067
- contract: string;
527
+ url: string;
528
+ }
1068
529
 
1069
- nonce: string | number;
530
+ export namespace RequestDetails {
531
+ export interface Body {
532
+ /**
533
+ * Name to assign to policy.
534
+ */
535
+ name?: string;
1070
536
 
1071
- r: string;
537
+ /**
538
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
539
+ * null to remove the current owner.
540
+ */
541
+ owner?: SharedAPI.OwnerInput | null;
1072
542
 
1073
- s: string;
543
+ /**
544
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
545
+ * not specify an owner.
546
+ */
547
+ owner_id?: SharedAPI.OwnerIDInput | null;
1074
548
 
1075
- y_parity: number;
1076
- }
1077
- }
1078
- }
549
+ rules?: Array<PoliciesAPI.PolicyRuleRequestBody>;
1079
550
  }
551
+ }
552
+ }
1080
553
 
1081
- export interface UnionMember2 {
1082
- method: 'personal_sign';
1083
-
1084
- params: UnionMember2.Params;
1085
-
1086
- address?: string;
1087
-
1088
- chain_type?: 'ethereum';
1089
-
1090
- wallet_id?: string;
1091
- }
554
+ /**
555
+ * Response for a key quorum intent
556
+ */
557
+ export interface KeyQuorumIntentResponse extends BaseIntentResponse {
558
+ intent_type: 'KEY_QUORUM';
1092
559
 
1093
- export namespace UnionMember2 {
1094
- export interface Params {
1095
- encoding: 'utf-8' | 'hex';
560
+ /**
561
+ * The original key quorum update request that would be sent to the key quorum
562
+ * endpoint
563
+ */
564
+ request_details: KeyQuorumIntentResponse.RequestDetails;
1096
565
 
1097
- message: string;
1098
- }
1099
- }
566
+ /**
567
+ * Result of key quorum update execution (only present if status is 'executed' or
568
+ * 'failed')
569
+ */
570
+ action_result?: BaseActionResult;
1100
571
 
1101
- export interface UnionMember3 {
1102
- method: 'eth_signTypedData_v4';
572
+ /**
573
+ * A key quorum for authorizing wallet operations.
574
+ */
575
+ current_resource_data?: KeyQuorumsAPI.KeyQuorum;
576
+ }
1103
577
 
1104
- params: UnionMember3.Params;
578
+ export namespace KeyQuorumIntentResponse {
579
+ /**
580
+ * The original key quorum update request that would be sent to the key quorum
581
+ * endpoint
582
+ */
583
+ export interface RequestDetails {
584
+ /**
585
+ * Request input for updating an existing key quorum.
586
+ */
587
+ body: KeyQuorumsAPI.KeyQuorumUpdateRequestBody;
1105
588
 
1106
- address?: string;
589
+ method: 'PATCH';
1107
590
 
1108
- chain_type?: 'ethereum';
591
+ url: string;
592
+ }
593
+ }
1109
594
 
1110
- wallet_id?: string;
1111
- }
595
+ /**
596
+ * Response for a rule intent
597
+ */
598
+ export interface RuleIntentResponse extends BaseIntentResponse {
599
+ intent_type: 'RULE';
1112
600
 
1113
- export namespace UnionMember3 {
1114
- export interface Params {
1115
- typed_data: Params.TypedData;
1116
- }
601
+ /**
602
+ * The original rule request. Method is POST (create), PATCH (update), or DELETE
603
+ * (delete)
604
+ */
605
+ request_details: RuleIntentRequestDetails;
1117
606
 
1118
- export namespace Params {
1119
- export interface TypedData {
1120
- domain: { [key: string]: unknown };
607
+ /**
608
+ * Result of rule execution (only present if status is 'executed' or 'failed')
609
+ */
610
+ action_result?: BaseActionResult;
1121
611
 
1122
- message: { [key: string]: unknown };
612
+ /**
613
+ * A rule that defines the conditions and action to take if the conditions are
614
+ * true.
615
+ */
616
+ current_resource_data?: PoliciesAPI.PolicyRuleResponse;
1123
617
 
1124
- primary_type: string;
618
+ /**
619
+ * A policy for controlling wallet operations.
620
+ */
621
+ policy?: PoliciesAPI.Policy;
622
+ }
1125
623
 
1126
- types: { [key: string]: Array<TypedData.Type> };
1127
- }
624
+ /**
625
+ * Response for an intent object
626
+ */
627
+ export type IntentResponse =
628
+ | RpcIntentResponse
629
+ | TransferIntentResponse
630
+ | WalletIntentResponse
631
+ | PolicyIntentResponse
632
+ | RuleIntentResponse
633
+ | KeyQuorumIntentResponse;
1128
634
 
1129
- export namespace TypedData {
1130
- export interface Type {
1131
- name: string;
1132
-
1133
- type: string;
1134
- }
1135
- }
1136
- }
1137
- }
1138
-
1139
- export interface UnionMember4 {
1140
- method: 'secp256k1_sign';
1141
-
1142
- params: UnionMember4.Params;
1143
-
1144
- address?: string;
1145
-
1146
- chain_type?: 'ethereum';
1147
-
1148
- wallet_id?: string;
1149
- }
1150
-
1151
- export namespace UnionMember4 {
1152
- export interface Params {
1153
- hash: string;
1154
- }
1155
- }
1156
-
1157
- export interface UnionMember5 {
1158
- method: 'eth_sign7702Authorization';
1159
-
1160
- params: UnionMember5.Params;
1161
-
1162
- address?: string;
1163
-
1164
- chain_type?: 'ethereum';
1165
-
1166
- wallet_id?: string;
1167
- }
1168
-
1169
- export namespace UnionMember5 {
1170
- export interface Params {
1171
- chain_id: string | number;
1172
-
1173
- contract: string;
1174
-
1175
- nonce?: string | number;
1176
- }
1177
- }
1178
-
1179
- export interface UnionMember6 {
1180
- method: 'eth_signUserOperation';
1181
-
1182
- params: UnionMember6.Params;
1183
-
1184
- address?: string;
1185
-
1186
- chain_type?: 'ethereum';
1187
-
1188
- wallet_id?: string;
1189
- }
1190
-
1191
- export namespace UnionMember6 {
1192
- export interface Params {
1193
- chain_id: string | number;
1194
-
1195
- contract: string;
1196
-
1197
- user_operation: Params.UserOperation;
1198
- }
1199
-
1200
- export namespace Params {
1201
- export interface UserOperation {
1202
- call_data: string;
1203
-
1204
- call_gas_limit: string;
1205
-
1206
- max_fee_per_gas: string;
1207
-
1208
- max_priority_fee_per_gas: string;
1209
-
1210
- nonce: string;
1211
-
1212
- paymaster: string;
1213
-
1214
- paymaster_data: string;
1215
-
1216
- paymaster_post_op_gas_limit: string;
1217
-
1218
- paymaster_verification_gas_limit: string;
1219
-
1220
- pre_verification_gas: string;
1221
-
1222
- sender: string;
1223
-
1224
- verification_gas_limit: string;
1225
- }
1226
- }
1227
- }
1228
-
1229
- export interface UnionMember7 {
1230
- method: 'signTransaction';
1231
-
1232
- params: UnionMember7.Params;
1233
-
1234
- address?: string;
1235
-
1236
- chain_type?: 'solana';
1237
-
1238
- wallet_id?: string;
1239
- }
1240
-
1241
- export namespace UnionMember7 {
1242
- export interface Params {
1243
- encoding: 'base64';
1244
-
1245
- transaction: string;
1246
- }
1247
- }
1248
-
1249
- export interface UnionMember8 {
1250
- caip2: string;
1251
-
1252
- method: 'signAndSendTransaction';
1253
-
1254
- params: UnionMember8.Params;
1255
-
1256
- address?: string;
1257
-
1258
- chain_type?: 'solana';
1259
-
1260
- sponsor?: boolean;
1261
-
1262
- wallet_id?: string;
1263
- }
1264
-
1265
- export namespace UnionMember8 {
1266
- export interface Params {
1267
- encoding: 'base64';
1268
-
1269
- transaction: string;
1270
- }
1271
- }
1272
-
1273
- export interface UnionMember9 {
1274
- method: 'signMessage';
1275
-
1276
- params: UnionMember9.Params;
1277
-
1278
- address?: string;
1279
-
1280
- chain_type?: 'solana';
1281
-
1282
- wallet_id?: string;
1283
- }
1284
-
1285
- export namespace UnionMember9 {
1286
- export interface Params {
1287
- encoding: 'base64';
1288
-
1289
- message: string;
1290
- }
1291
- }
1292
-
1293
- export interface UnionMember10 {
1294
- address: string;
1295
-
1296
- method: 'exportPrivateKey';
1297
-
1298
- params: UnionMember10.Params;
1299
- }
1300
-
1301
- export namespace UnionMember10 {
1302
- export interface Params {
1303
- encryption_type: 'HPKE';
1304
-
1305
- recipient_public_key: string;
1306
-
1307
- export_type?: 'display' | 'client';
1308
- }
1309
- }
1310
-
1311
- export interface UnionMember11 {
1312
- method: 'transfer';
1313
-
1314
- params: UnionMember11.Params;
1315
-
1316
- network?: 'MAINNET' | 'REGTEST';
1317
- }
1318
-
1319
- export namespace UnionMember11 {
1320
- export interface Params {
1321
- amount_sats: number;
1322
-
1323
- receiver_spark_address: string;
1324
- }
1325
- }
1326
-
1327
- export interface UnionMember12 {
1328
- method: 'getBalance';
1329
-
1330
- network?: 'MAINNET' | 'REGTEST';
1331
- }
1332
-
1333
- export interface UnionMember13 {
1334
- method: 'transferTokens';
1335
-
1336
- params: UnionMember13.Params;
1337
-
1338
- network?: 'MAINNET' | 'REGTEST';
1339
- }
1340
-
1341
- export namespace UnionMember13 {
1342
- export interface Params {
1343
- receiver_spark_address: string;
1344
-
1345
- token_amount: number;
1346
-
1347
- token_identifier: string;
1348
-
1349
- output_selection_strategy?: 'SMALL_FIRST' | 'LARGE_FIRST';
1350
-
1351
- selected_outputs?: Array<Params.SelectedOutput>;
1352
- }
1353
-
1354
- export namespace Params {
1355
- export interface SelectedOutput {
1356
- previous_transaction_hash: string;
1357
-
1358
- previous_transaction_vout: number;
1359
-
1360
- output?: SelectedOutput.Output;
1361
- }
1362
-
1363
- export namespace SelectedOutput {
1364
- export interface Output {
1365
- owner_public_key: string;
1366
-
1367
- token_amount: string;
1368
-
1369
- id?: string;
1370
-
1371
- revocation_commitment?: string;
1372
-
1373
- token_identifier?: string;
1374
-
1375
- token_public_key?: string;
1376
-
1377
- withdraw_bond_sats?: number;
1378
-
1379
- withdraw_relative_block_locktime?: number;
1380
- }
1381
- }
1382
- }
1383
- }
1384
-
1385
- export interface UnionMember14 {
1386
- method: 'getStaticDepositAddress';
1387
-
1388
- network?: 'MAINNET' | 'REGTEST';
1389
- }
1390
-
1391
- export interface UnionMember15 {
1392
- method: 'getClaimStaticDepositQuote';
1393
-
1394
- params: UnionMember15.Params;
1395
-
1396
- network?: 'MAINNET' | 'REGTEST';
1397
- }
1398
-
1399
- export namespace UnionMember15 {
1400
- export interface Params {
1401
- transaction_id: string;
1402
-
1403
- output_index?: number;
1404
- }
1405
- }
1406
-
1407
- export interface UnionMember16 {
1408
- method: 'claimStaticDeposit';
1409
-
1410
- params: UnionMember16.Params;
1411
-
1412
- network?: 'MAINNET' | 'REGTEST';
1413
- }
1414
-
1415
- export namespace UnionMember16 {
1416
- export interface Params {
1417
- credit_amount_sats: number;
1418
-
1419
- signature: string;
1420
-
1421
- transaction_id: string;
1422
-
1423
- output_index?: number;
1424
- }
1425
- }
1426
-
1427
- export interface UnionMember17 {
1428
- method: 'createLightningInvoice';
1429
-
1430
- params: UnionMember17.Params;
1431
-
1432
- network?: 'MAINNET' | 'REGTEST';
1433
- }
1434
-
1435
- export namespace UnionMember17 {
1436
- export interface Params {
1437
- amount_sats: number;
1438
-
1439
- description_hash?: string;
1440
-
1441
- expiry_seconds?: number;
1442
-
1443
- include_spark_address?: boolean;
1444
-
1445
- memo?: string;
1446
-
1447
- receiver_identity_pubkey?: string;
1448
- }
1449
- }
1450
-
1451
- export interface UnionMember18 {
1452
- method: 'payLightningInvoice';
1453
-
1454
- params: UnionMember18.Params;
1455
-
1456
- network?: 'MAINNET' | 'REGTEST';
1457
- }
1458
-
1459
- export namespace UnionMember18 {
1460
- export interface Params {
1461
- invoice: string;
1462
-
1463
- max_fee_sats: number;
1464
-
1465
- amount_sats_to_send?: number;
1466
-
1467
- prefer_spark?: boolean;
1468
- }
1469
- }
1470
-
1471
- export interface UnionMember19 {
1472
- method: 'signMessageWithIdentityKey';
1473
-
1474
- params: UnionMember19.Params;
1475
-
1476
- network?: 'MAINNET' | 'REGTEST';
1477
- }
1478
-
1479
- export namespace UnionMember19 {
1480
- export interface Params {
1481
- message: string;
1482
-
1483
- compact?: boolean;
1484
- }
1485
- }
1486
- }
1487
-
1488
- /**
1489
- * Current state of the wallet before any changes. If undefined, the resource was
1490
- * deleted and no longer exists
1491
- */
1492
- export interface CurrentResourceData {
1493
- id: string;
1494
-
1495
- additional_signers: Array<CurrentResourceData.AdditionalSigner>;
1496
-
1497
- address: string;
1498
-
1499
- /**
1500
- * The wallet chain types.
1501
- */
1502
- chain_type: WalletsAPI.WalletChainType;
1503
-
1504
- created_at: number;
1505
-
1506
- exported_at: number | null;
1507
-
1508
- imported_at: number | null;
1509
-
1510
- owner_id: string | null;
1511
-
1512
- policy_ids: Array<string>;
1513
-
1514
- authorization_threshold?: number;
1515
-
1516
- custodian?: CurrentResourceData.Custodian;
1517
-
1518
- /**
1519
- * Information about the custodian managing this wallet.
1520
- */
1521
- custody?: WalletsAPI.WalletCustodian;
1522
-
1523
- public_key?: string;
1524
- }
1525
-
1526
- export namespace CurrentResourceData {
1527
- export interface AdditionalSigner {
1528
- signer_id: string;
1529
-
1530
- override_policy_ids?: Array<string>;
1531
- }
1532
-
1533
- export interface Custodian {
1534
- name: string;
1535
- }
1536
- }
1537
- }
1538
-
1539
- /**
1540
- * Response for a wallet intent
1541
- */
1542
- export interface WalletIntentResponse {
1543
- /**
1544
- * Detailed authorization information including key quorum members, thresholds, and
1545
- * signature status
1546
- */
1547
- authorization_details: Array<IntentAuthorization>;
1548
-
1549
- /**
1550
- * Unix timestamp when the intent was created
1551
- */
1552
- created_at: number;
1553
-
1554
- /**
1555
- * Display name of the user who created the intent
1556
- */
1557
- created_by_display_name: string;
1558
-
1559
- /**
1560
- * Unix timestamp when the intent expires
1561
- */
1562
- expires_at: number;
1563
-
1564
- /**
1565
- * Unique ID for the intent
1566
- */
1567
- intent_id: string;
1568
-
1569
- intent_type: 'WALLET';
1570
-
1571
- /**
1572
- * The original wallet update request that would be sent to the wallet endpoint
1573
- */
1574
- request_details: WalletIntentResponse.RequestDetails;
1575
-
1576
- /**
1577
- * ID of the resource being modified (wallet_id, policy_id, etc)
1578
- */
1579
- resource_id: string;
1580
-
1581
- /**
1582
- * Current status of an intent.
1583
- */
1584
- status: IntentStatus;
1585
-
1586
- /**
1587
- * Result of wallet update execution (only present if status is 'executed' or
1588
- * 'failed')
1589
- */
1590
- action_result?: BaseActionResult;
1591
-
1592
- /**
1593
- * ID of the user who created the intent. If undefined, the intent was created
1594
- * using the app secret
1595
- */
1596
- created_by_id?: string;
1597
-
1598
- /**
1599
- * Current state of the wallet before any changes. If undefined, the resource was
1600
- * deleted and no longer exists
1601
- */
1602
- current_resource_data?: WalletIntentResponse.CurrentResourceData;
1603
-
1604
- /**
1605
- * Human-readable reason for dismissal, present when status is 'dismissed'
1606
- */
1607
- dismissal_reason?: string;
1608
-
1609
- /**
1610
- * Unix timestamp when the intent was dismissed, present when status is 'dismissed'
1611
- */
1612
- dismissed_at?: number;
1613
-
1614
- /**
1615
- * Unix timestamp when the intent was rejected, present when status is 'rejected'
1616
- */
1617
- rejected_at?: number;
1618
- }
1619
-
1620
- export namespace WalletIntentResponse {
1621
- /**
1622
- * The original wallet update request that would be sent to the wallet endpoint
1623
- */
1624
- export interface RequestDetails {
1625
- body: RequestDetails.Body;
1626
-
1627
- method: 'PATCH';
1628
-
1629
- url: string;
1630
- }
1631
-
1632
- export namespace RequestDetails {
1633
- export interface Body {
1634
- additional_signers?: Array<Body.AdditionalSigner>;
1635
-
1636
- authorization_key_ids?: Array<string>;
1637
-
1638
- authorization_threshold?: number;
1639
-
1640
- owner?: Body.UserID | Body.PublicKey | null;
1641
-
1642
- owner_id?: string | null;
1643
-
1644
- policy_ids?: Array<string>;
1645
- }
1646
-
1647
- export namespace Body {
1648
- export interface AdditionalSigner {
1649
- signer_id: string;
1650
-
1651
- override_policy_ids?: Array<string>;
1652
- }
1653
-
1654
- export interface UserID {
1655
- user_id: string;
1656
- }
1657
-
1658
- export interface PublicKey {
1659
- public_key: string;
1660
- }
1661
- }
1662
- }
1663
-
1664
- /**
1665
- * Current state of the wallet before any changes. If undefined, the resource was
1666
- * deleted and no longer exists
1667
- */
1668
- export interface CurrentResourceData {
1669
- id: string;
1670
-
1671
- additional_signers: Array<CurrentResourceData.AdditionalSigner>;
1672
-
1673
- address: string;
1674
-
1675
- /**
1676
- * The wallet chain types.
1677
- */
1678
- chain_type: WalletsAPI.WalletChainType;
1679
-
1680
- created_at: number;
1681
-
1682
- exported_at: number | null;
1683
-
1684
- imported_at: number | null;
1685
-
1686
- owner_id: string | null;
1687
-
1688
- policy_ids: Array<string>;
1689
-
1690
- authorization_threshold?: number;
1691
-
1692
- custodian?: CurrentResourceData.Custodian;
1693
-
1694
- /**
1695
- * Information about the custodian managing this wallet.
1696
- */
1697
- custody?: WalletsAPI.WalletCustodian;
1698
-
1699
- public_key?: string;
1700
- }
1701
-
1702
- export namespace CurrentResourceData {
1703
- export interface AdditionalSigner {
1704
- signer_id: string;
1705
-
1706
- override_policy_ids?: Array<string>;
1707
- }
1708
-
1709
- export interface Custodian {
1710
- name: string;
1711
- }
1712
- }
1713
- }
1714
-
1715
- /**
1716
- * Response for a policy intent
1717
- */
1718
- export interface PolicyIntentResponse {
1719
- /**
1720
- * Detailed authorization information including key quorum members, thresholds, and
1721
- * signature status
1722
- */
1723
- authorization_details: Array<IntentAuthorization>;
1724
-
1725
- /**
1726
- * Unix timestamp when the intent was created
1727
- */
1728
- created_at: number;
1729
-
1730
- /**
1731
- * Display name of the user who created the intent
1732
- */
1733
- created_by_display_name: string;
1734
-
1735
- /**
1736
- * Unix timestamp when the intent expires
1737
- */
1738
- expires_at: number;
1739
-
1740
- /**
1741
- * Unique ID for the intent
1742
- */
1743
- intent_id: string;
1744
-
1745
- intent_type: 'POLICY';
1746
-
1747
- /**
1748
- * The original policy update request that would be sent to the policy endpoint
1749
- */
1750
- request_details: PolicyIntentResponse.RequestDetails;
1751
-
1752
- /**
1753
- * ID of the resource being modified (wallet_id, policy_id, etc)
1754
- */
1755
- resource_id: string;
1756
-
1757
- /**
1758
- * Current status of an intent.
1759
- */
1760
- status: IntentStatus;
1761
-
1762
- /**
1763
- * Result of policy update execution (only present if status is 'executed' or
1764
- * 'failed')
1765
- */
1766
- action_result?: BaseActionResult;
1767
-
1768
- /**
1769
- * ID of the user who created the intent. If undefined, the intent was created
1770
- * using the app secret
1771
- */
1772
- created_by_id?: string;
1773
-
1774
- /**
1775
- * Current state of the policy before any changes. If undefined, the resource was
1776
- * deleted and no longer exists
1777
- */
1778
- current_resource_data?: PolicyIntentResponse.CurrentResourceData;
1779
-
1780
- /**
1781
- * Human-readable reason for dismissal, present when status is 'dismissed'
1782
- */
1783
- dismissal_reason?: string;
1784
-
1785
- /**
1786
- * Unix timestamp when the intent was dismissed, present when status is 'dismissed'
1787
- */
1788
- dismissed_at?: number;
1789
-
1790
- /**
1791
- * Unix timestamp when the intent was rejected, present when status is 'rejected'
1792
- */
1793
- rejected_at?: number;
1794
- }
1795
-
1796
- export namespace PolicyIntentResponse {
1797
- /**
1798
- * The original policy update request that would be sent to the policy endpoint
1799
- */
1800
- export interface RequestDetails {
1801
- body: RequestDetails.Body;
1802
-
1803
- method: 'PATCH';
1804
-
1805
- url: string;
1806
- }
1807
-
1808
- export namespace RequestDetails {
1809
- export interface Body {
1810
- name?: string;
1811
-
1812
- owner?: Body.UserID | Body.PublicKey | null;
1813
-
1814
- owner_id?: string | null;
1815
-
1816
- rules?: Array<Body.Rule>;
1817
- }
1818
-
1819
- export namespace Body {
1820
- export interface UserID {
1821
- user_id: string;
1822
- }
1823
-
1824
- export interface PublicKey {
1825
- public_key: string;
1826
- }
1827
-
1828
- export interface Rule {
1829
- action: 'ALLOW' | 'DENY';
1830
-
1831
- conditions: Array<
1832
- | Rule.UnionMember0
1833
- | Rule.UnionMember1
1834
- | Rule.UnionMember2
1835
- | Rule.UnionMember3
1836
- | Rule.UnionMember4
1837
- | Rule.UnionMember5
1838
- | Rule.UnionMember6
1839
- | Rule.UnionMember7
1840
- | Rule.UnionMember8
1841
- | Rule.UnionMember9
1842
- | Rule.UnionMember10
1843
- | Rule.UnionMember11
1844
- | Rule.UnionMember12
1845
- | Rule.UnionMember13
1846
- >;
1847
-
1848
- method:
1849
- | 'eth_sendTransaction'
1850
- | 'eth_signTransaction'
1851
- | 'eth_signTypedData_v4'
1852
- | 'eth_signUserOperation'
1853
- | 'eth_sign7702Authorization'
1854
- | 'signTransaction'
1855
- | 'signAndSendTransaction'
1856
- | 'signTransactionBytes'
1857
- | 'exportPrivateKey'
1858
- | '*';
1859
-
1860
- name: string;
1861
- }
1862
-
1863
- export namespace Rule {
1864
- export interface UnionMember0 {
1865
- field: 'to' | 'value' | 'chain_id';
1866
-
1867
- field_source: 'ethereum_transaction';
1868
-
1869
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1870
-
1871
- value: string | Array<string>;
1872
- }
1873
-
1874
- export interface UnionMember1 {
1875
- abi: Array<UnionMember1.Abi>;
1876
-
1877
- field: string;
1878
-
1879
- field_source: 'ethereum_calldata';
1880
-
1881
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1882
-
1883
- value: string | Array<string>;
1884
- }
1885
-
1886
- export namespace UnionMember1 {
1887
- export interface Abi {
1888
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
1889
-
1890
- anonymous?: boolean;
1891
-
1892
- inputs?: Array<Abi.Input>;
1893
-
1894
- name?: string;
1895
-
1896
- outputs?: Array<Abi.Output>;
1897
-
1898
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
1899
- }
1900
-
1901
- export namespace Abi {
1902
- export interface Input {
1903
- type: string;
1904
-
1905
- components?: Array<unknown>;
1906
-
1907
- indexed?: boolean;
1908
-
1909
- internalType?: string;
1910
-
1911
- name?: string;
1912
- }
1913
-
1914
- export interface Output {
1915
- type: string;
1916
-
1917
- components?: Array<unknown>;
1918
-
1919
- indexed?: boolean;
1920
-
1921
- internalType?: string;
1922
-
1923
- name?: string;
1924
- }
1925
- }
1926
- }
1927
-
1928
- export interface UnionMember2 {
1929
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
1930
-
1931
- field_source: 'ethereum_typed_data_domain';
1932
-
1933
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1934
-
1935
- value: string | Array<string>;
1936
- }
1937
-
1938
- export interface UnionMember3 {
1939
- field: string;
1940
-
1941
- field_source: 'ethereum_typed_data_message';
1942
-
1943
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1944
-
1945
- typed_data: UnionMember3.TypedData;
1946
-
1947
- value: string | Array<string>;
1948
- }
1949
-
1950
- export namespace UnionMember3 {
1951
- export interface TypedData {
1952
- primary_type: string;
1953
-
1954
- types: { [key: string]: Array<TypedData.Type> };
1955
- }
1956
-
1957
- export namespace TypedData {
1958
- export interface Type {
1959
- name: string;
1960
-
1961
- type: string;
1962
- }
1963
- }
1964
- }
1965
-
1966
- export interface UnionMember4 {
1967
- field: 'contract';
1968
-
1969
- field_source: 'ethereum_7702_authorization';
1970
-
1971
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1972
-
1973
- value: string | Array<string>;
1974
- }
1975
-
1976
- export interface UnionMember5 {
1977
- field: 'programId';
1978
-
1979
- field_source: 'solana_program_instruction';
1980
-
1981
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1982
-
1983
- value: string | Array<string>;
1984
- }
1985
-
1986
- export interface UnionMember6 {
1987
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1988
-
1989
- field_source: 'solana_system_program_instruction';
1990
-
1991
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1992
-
1993
- value: string | Array<string>;
1994
- }
1995
-
1996
- export interface UnionMember7 {
1997
- field:
1998
- | 'instructionName'
1999
- | 'Transfer.source'
2000
- | 'Transfer.destination'
2001
- | 'Transfer.authority'
2002
- | 'Transfer.amount'
2003
- | 'TransferChecked.source'
2004
- | 'TransferChecked.destination'
2005
- | 'TransferChecked.authority'
2006
- | 'TransferChecked.amount'
2007
- | 'TransferChecked.mint'
2008
- | 'Burn.account'
2009
- | 'Burn.mint'
2010
- | 'Burn.authority'
2011
- | 'Burn.amount'
2012
- | 'MintTo.mint'
2013
- | 'MintTo.account'
2014
- | 'MintTo.authority'
2015
- | 'MintTo.amount'
2016
- | 'CloseAccount.account'
2017
- | 'CloseAccount.destination'
2018
- | 'CloseAccount.authority'
2019
- | 'InitializeAccount3.account'
2020
- | 'InitializeAccount3.mint'
2021
- | 'InitializeAccount3.owner';
2022
-
2023
- field_source: 'solana_token_program_instruction';
2024
-
2025
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2026
-
2027
- value: string | Array<string>;
2028
- }
2029
-
2030
- export interface UnionMember8 {
2031
- field:
2032
- | 'TransferContract.to_address'
2033
- | 'TransferContract.amount'
2034
- | 'TriggerSmartContract.contract_address'
2035
- | 'TriggerSmartContract.call_value'
2036
- | 'TriggerSmartContract.token_id'
2037
- | 'TriggerSmartContract.call_token_value';
2038
-
2039
- field_source: 'tron_transaction';
2040
-
2041
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2042
-
2043
- value: string | Array<string>;
2044
- }
2045
-
2046
- export interface UnionMember9 {
2047
- field: 'current_unix_timestamp';
2048
-
2049
- field_source: 'system';
2050
-
2051
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2052
-
2053
- value: string | Array<string>;
2054
- }
2055
-
2056
- export interface UnionMember10 {
2057
- field: string;
2058
-
2059
- field_source: 'reference';
2060
-
2061
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2062
-
2063
- value: string | Array<string>;
2064
- }
2065
-
2066
- export interface UnionMember11 {
2067
- abi: Array<UnionMember11.Abi>;
2068
-
2069
- field: string;
2070
-
2071
- field_source: 'tron_trigger_smart_contract_data';
2072
-
2073
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2074
-
2075
- value: string | Array<string>;
2076
- }
2077
-
2078
- export namespace UnionMember11 {
2079
- export interface Abi {
2080
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
2081
-
2082
- anonymous?: boolean;
2083
-
2084
- inputs?: Array<Abi.Input>;
2085
-
2086
- name?: string;
2087
-
2088
- outputs?: Array<Abi.Output>;
2089
-
2090
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
2091
- }
2092
-
2093
- export namespace Abi {
2094
- export interface Input {
2095
- type: string;
2096
-
2097
- components?: Array<unknown>;
2098
-
2099
- indexed?: boolean;
2100
-
2101
- internalType?: string;
2102
-
2103
- name?: string;
2104
- }
2105
-
2106
- export interface Output {
2107
- type: string;
2108
-
2109
- components?: Array<unknown>;
2110
-
2111
- indexed?: boolean;
2112
-
2113
- internalType?: string;
2114
-
2115
- name?: string;
2116
- }
2117
- }
2118
- }
2119
-
2120
- export interface UnionMember12 {
2121
- field: 'commandName';
2122
-
2123
- field_source: 'sui_transaction_command';
2124
-
2125
- operator: 'eq' | 'in';
2126
-
2127
- /**
2128
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
2129
- */
2130
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
2131
- }
2132
-
2133
- export interface UnionMember13 {
2134
- field: 'recipient' | 'amount';
2135
-
2136
- field_source: 'sui_transfer_objects_command';
2137
-
2138
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2139
-
2140
- value: string | Array<string>;
2141
- }
2142
- }
2143
- }
2144
- }
2145
-
2146
- /**
2147
- * Current state of the policy before any changes. If undefined, the resource was
2148
- * deleted and no longer exists
2149
- */
2150
- export interface CurrentResourceData {
2151
- id: string;
2152
-
2153
- /**
2154
- * The wallet chain types.
2155
- */
2156
- chain_type: WalletsAPI.WalletChainType;
2157
-
2158
- created_at: number;
2159
-
2160
- name: string;
2161
-
2162
- owner_id: string | null;
2163
-
2164
- rules: Array<CurrentResourceData.Rule>;
2165
-
2166
- version: '1.0';
2167
- }
2168
-
2169
- export namespace CurrentResourceData {
2170
- export interface Rule {
2171
- id: string;
2172
-
2173
- action: 'ALLOW' | 'DENY';
2174
-
2175
- conditions: Array<
2176
- | Rule.UnionMember0
2177
- | Rule.UnionMember1
2178
- | Rule.UnionMember2
2179
- | Rule.UnionMember3
2180
- | Rule.UnionMember4
2181
- | Rule.UnionMember5
2182
- | Rule.UnionMember6
2183
- | Rule.UnionMember7
2184
- | Rule.UnionMember8
2185
- | Rule.UnionMember9
2186
- | Rule.UnionMember10
2187
- | Rule.UnionMember11
2188
- | Rule.UnionMember12
2189
- | Rule.UnionMember13
2190
- >;
2191
-
2192
- method:
2193
- | 'eth_sendTransaction'
2194
- | 'eth_signTransaction'
2195
- | 'eth_signTypedData_v4'
2196
- | 'eth_signUserOperation'
2197
- | 'eth_sign7702Authorization'
2198
- | 'signTransaction'
2199
- | 'signAndSendTransaction'
2200
- | 'signTransactionBytes'
2201
- | 'exportPrivateKey'
2202
- | '*';
2203
-
2204
- name: string;
2205
- }
2206
-
2207
- export namespace Rule {
2208
- export interface UnionMember0 {
2209
- field: 'to' | 'value' | 'chain_id';
2210
-
2211
- field_source: 'ethereum_transaction';
2212
-
2213
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2214
-
2215
- value: string | Array<string>;
2216
- }
2217
-
2218
- export interface UnionMember1 {
2219
- abi: Array<UnionMember1.Abi>;
2220
-
2221
- field: string;
2222
-
2223
- field_source: 'ethereum_calldata';
2224
-
2225
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2226
-
2227
- value: string | Array<string>;
2228
- }
2229
-
2230
- export namespace UnionMember1 {
2231
- export interface Abi {
2232
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
2233
-
2234
- anonymous?: boolean;
2235
-
2236
- inputs?: Array<Abi.Input>;
2237
-
2238
- name?: string;
2239
-
2240
- outputs?: Array<Abi.Output>;
2241
-
2242
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
2243
- }
2244
-
2245
- export namespace Abi {
2246
- export interface Input {
2247
- type: string;
2248
-
2249
- components?: Array<unknown>;
2250
-
2251
- indexed?: boolean;
2252
-
2253
- internalType?: string;
2254
-
2255
- name?: string;
2256
- }
2257
-
2258
- export interface Output {
2259
- type: string;
2260
-
2261
- components?: Array<unknown>;
2262
-
2263
- indexed?: boolean;
2264
-
2265
- internalType?: string;
2266
-
2267
- name?: string;
2268
- }
2269
- }
2270
- }
2271
-
2272
- export interface UnionMember2 {
2273
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
2274
-
2275
- field_source: 'ethereum_typed_data_domain';
2276
-
2277
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2278
-
2279
- value: string | Array<string>;
2280
- }
2281
-
2282
- export interface UnionMember3 {
2283
- field: string;
2284
-
2285
- field_source: 'ethereum_typed_data_message';
2286
-
2287
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2288
-
2289
- typed_data: UnionMember3.TypedData;
2290
-
2291
- value: string | Array<string>;
2292
- }
2293
-
2294
- export namespace UnionMember3 {
2295
- export interface TypedData {
2296
- primary_type: string;
2297
-
2298
- types: { [key: string]: Array<TypedData.Type> };
2299
- }
2300
-
2301
- export namespace TypedData {
2302
- export interface Type {
2303
- name: string;
2304
-
2305
- type: string;
2306
- }
2307
- }
2308
- }
2309
-
2310
- export interface UnionMember4 {
2311
- field: 'contract';
2312
-
2313
- field_source: 'ethereum_7702_authorization';
2314
-
2315
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2316
-
2317
- value: string | Array<string>;
2318
- }
2319
-
2320
- export interface UnionMember5 {
2321
- field: 'programId';
2322
-
2323
- field_source: 'solana_program_instruction';
2324
-
2325
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2326
-
2327
- value: string | Array<string>;
2328
- }
2329
-
2330
- export interface UnionMember6 {
2331
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
2332
-
2333
- field_source: 'solana_system_program_instruction';
2334
-
2335
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2336
-
2337
- value: string | Array<string>;
2338
- }
2339
-
2340
- export interface UnionMember7 {
2341
- field:
2342
- | 'instructionName'
2343
- | 'Transfer.source'
2344
- | 'Transfer.destination'
2345
- | 'Transfer.authority'
2346
- | 'Transfer.amount'
2347
- | 'TransferChecked.source'
2348
- | 'TransferChecked.destination'
2349
- | 'TransferChecked.authority'
2350
- | 'TransferChecked.amount'
2351
- | 'TransferChecked.mint'
2352
- | 'Burn.account'
2353
- | 'Burn.mint'
2354
- | 'Burn.authority'
2355
- | 'Burn.amount'
2356
- | 'MintTo.mint'
2357
- | 'MintTo.account'
2358
- | 'MintTo.authority'
2359
- | 'MintTo.amount'
2360
- | 'CloseAccount.account'
2361
- | 'CloseAccount.destination'
2362
- | 'CloseAccount.authority'
2363
- | 'InitializeAccount3.account'
2364
- | 'InitializeAccount3.mint'
2365
- | 'InitializeAccount3.owner';
2366
-
2367
- field_source: 'solana_token_program_instruction';
2368
-
2369
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2370
-
2371
- value: string | Array<string>;
2372
- }
2373
-
2374
- export interface UnionMember8 {
2375
- field:
2376
- | 'TransferContract.to_address'
2377
- | 'TransferContract.amount'
2378
- | 'TriggerSmartContract.contract_address'
2379
- | 'TriggerSmartContract.call_value'
2380
- | 'TriggerSmartContract.token_id'
2381
- | 'TriggerSmartContract.call_token_value';
2382
-
2383
- field_source: 'tron_transaction';
2384
-
2385
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2386
-
2387
- value: string | Array<string>;
2388
- }
2389
-
2390
- export interface UnionMember9 {
2391
- field: 'current_unix_timestamp';
2392
-
2393
- field_source: 'system';
2394
-
2395
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2396
-
2397
- value: string | Array<string>;
2398
- }
2399
-
2400
- export interface UnionMember10 {
2401
- field: string;
2402
-
2403
- field_source: 'reference';
2404
-
2405
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2406
-
2407
- value: string | Array<string>;
2408
- }
2409
-
2410
- export interface UnionMember11 {
2411
- abi: Array<UnionMember11.Abi>;
2412
-
2413
- field: string;
2414
-
2415
- field_source: 'tron_trigger_smart_contract_data';
2416
-
2417
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2418
-
2419
- value: string | Array<string>;
2420
- }
2421
-
2422
- export namespace UnionMember11 {
2423
- export interface Abi {
2424
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
2425
-
2426
- anonymous?: boolean;
2427
-
2428
- inputs?: Array<Abi.Input>;
2429
-
2430
- name?: string;
2431
-
2432
- outputs?: Array<Abi.Output>;
2433
-
2434
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
2435
- }
2436
-
2437
- export namespace Abi {
2438
- export interface Input {
2439
- type: string;
2440
-
2441
- components?: Array<unknown>;
2442
-
2443
- indexed?: boolean;
2444
-
2445
- internalType?: string;
2446
-
2447
- name?: string;
2448
- }
2449
-
2450
- export interface Output {
2451
- type: string;
2452
-
2453
- components?: Array<unknown>;
2454
-
2455
- indexed?: boolean;
2456
-
2457
- internalType?: string;
2458
-
2459
- name?: string;
2460
- }
2461
- }
2462
- }
2463
-
2464
- export interface UnionMember12 {
2465
- field: 'commandName';
2466
-
2467
- field_source: 'sui_transaction_command';
2468
-
2469
- operator: 'eq' | 'in';
2470
-
2471
- /**
2472
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
2473
- */
2474
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
2475
- }
2476
-
2477
- export interface UnionMember13 {
2478
- field: 'recipient' | 'amount';
2479
-
2480
- field_source: 'sui_transfer_objects_command';
2481
-
2482
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2483
-
2484
- value: string | Array<string>;
2485
- }
2486
- }
2487
- }
2488
- }
2489
-
2490
- /**
2491
- * Response for a key quorum intent
2492
- */
2493
- export interface KeyQuorumIntentResponse {
2494
- /**
2495
- * Detailed authorization information including key quorum members, thresholds, and
2496
- * signature status
2497
- */
2498
- authorization_details: Array<IntentAuthorization>;
2499
-
2500
- /**
2501
- * Unix timestamp when the intent was created
2502
- */
2503
- created_at: number;
2504
-
2505
- /**
2506
- * Display name of the user who created the intent
2507
- */
2508
- created_by_display_name: string;
2509
-
2510
- /**
2511
- * Unix timestamp when the intent expires
2512
- */
2513
- expires_at: number;
2514
-
2515
- /**
2516
- * Unique ID for the intent
2517
- */
2518
- intent_id: string;
2519
-
2520
- intent_type: 'KEY_QUORUM';
2521
-
2522
- /**
2523
- * The original key quorum update request that would be sent to the key quorum
2524
- * endpoint
2525
- */
2526
- request_details: KeyQuorumIntentResponse.RequestDetails;
2527
-
2528
- /**
2529
- * ID of the resource being modified (wallet_id, policy_id, etc)
2530
- */
2531
- resource_id: string;
2532
-
2533
- /**
2534
- * Current status of an intent.
2535
- */
2536
- status: IntentStatus;
2537
-
2538
- /**
2539
- * Result of key quorum update execution (only present if status is 'executed' or
2540
- * 'failed')
2541
- */
2542
- action_result?: BaseActionResult;
2543
-
2544
- /**
2545
- * ID of the user who created the intent. If undefined, the intent was created
2546
- * using the app secret
2547
- */
2548
- created_by_id?: string;
2549
-
2550
- /**
2551
- * Current state of the key quorum before any changes. If undefined, the resource
2552
- * was deleted and no longer exists
2553
- */
2554
- current_resource_data?: KeyQuorumIntentResponse.CurrentResourceData;
2555
-
2556
- /**
2557
- * Human-readable reason for dismissal, present when status is 'dismissed'
2558
- */
2559
- dismissal_reason?: string;
2560
-
2561
- /**
2562
- * Unix timestamp when the intent was dismissed, present when status is 'dismissed'
2563
- */
2564
- dismissed_at?: number;
2565
-
2566
- /**
2567
- * Unix timestamp when the intent was rejected, present when status is 'rejected'
2568
- */
2569
- rejected_at?: number;
2570
- }
2571
-
2572
- export namespace KeyQuorumIntentResponse {
2573
- /**
2574
- * The original key quorum update request that would be sent to the key quorum
2575
- * endpoint
2576
- */
2577
- export interface RequestDetails {
2578
- body: RequestDetails.Body;
2579
-
2580
- method: 'PATCH';
2581
-
2582
- url: string;
2583
- }
2584
-
2585
- export namespace RequestDetails {
2586
- export interface Body {
2587
- authorization_threshold?: number;
2588
-
2589
- display_name?: string;
2590
-
2591
- key_quorum_ids?: Array<string>;
2592
-
2593
- public_keys?: Array<string>;
2594
-
2595
- user_ids?: Array<string>;
2596
- }
2597
- }
2598
-
2599
- /**
2600
- * Current state of the key quorum before any changes. If undefined, the resource
2601
- * was deleted and no longer exists
2602
- */
2603
- export interface CurrentResourceData {
2604
- id: string;
2605
-
2606
- authorization_keys: Array<CurrentResourceData.AuthorizationKey>;
2607
-
2608
- authorization_threshold: number | null;
2609
-
2610
- display_name: string | null;
2611
-
2612
- user_ids: Array<string> | null;
2613
-
2614
- key_quorum_ids?: Array<string>;
2615
- }
2616
-
2617
- export namespace CurrentResourceData {
2618
- export interface AuthorizationKey {
2619
- display_name: string | null;
2620
-
2621
- public_key: string;
2622
- }
2623
- }
2624
- }
2625
-
2626
- /**
2627
- * Response for a rule intent
2628
- */
2629
- export interface RuleIntentResponse {
2630
- /**
2631
- * Detailed authorization information including key quorum members, thresholds, and
2632
- * signature status
2633
- */
2634
- authorization_details: Array<IntentAuthorization>;
2635
-
2636
- /**
2637
- * Unix timestamp when the intent was created
2638
- */
2639
- created_at: number;
2640
-
2641
- /**
2642
- * Display name of the user who created the intent
2643
- */
2644
- created_by_display_name: string;
2645
-
2646
- /**
2647
- * Unix timestamp when the intent expires
2648
- */
2649
- expires_at: number;
2650
-
2651
- /**
2652
- * Unique ID for the intent
2653
- */
2654
- intent_id: string;
2655
-
2656
- intent_type: 'RULE';
2657
-
2658
- /**
2659
- * The original rule request. Method is POST (create), PATCH (update), or DELETE
2660
- * (delete)
2661
- */
2662
- request_details: RuleIntentRequestDetails;
2663
-
2664
- /**
2665
- * ID of the resource being modified (wallet_id, policy_id, etc)
2666
- */
2667
- resource_id: string;
2668
-
2669
- /**
2670
- * Current status of an intent.
2671
- */
2672
- status: IntentStatus;
2673
-
2674
- /**
2675
- * Result of rule execution (only present if status is 'executed' or 'failed')
2676
- */
2677
- action_result?: BaseActionResult;
2678
-
2679
- /**
2680
- * ID of the user who created the intent. If undefined, the intent was created
2681
- * using the app secret
2682
- */
2683
- created_by_id?: string;
635
+ /**
636
+ * Headers required to create an intent.
637
+ */
638
+ export interface IntentCreationHeaders {
639
+ /**
640
+ * ID of your Privy app.
641
+ */
642
+ 'privy-app-id': string;
2684
643
 
2685
644
  /**
2686
- * Current state of the rule before any changes. Undefined for create intents or if
2687
- * the rule was deleted
645
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
646
+ * deadline by which the request must be processed.
2688
647
  */
2689
- current_resource_data?: RuleIntentResponse.CurrentResourceData;
2690
-
2691
- /**
2692
- * Human-readable reason for dismissal, present when status is 'dismissed'
2693
- */
2694
- dismissal_reason?: string;
2695
-
2696
- /**
2697
- * Unix timestamp when the intent was dismissed, present when status is 'dismissed'
2698
- */
2699
- dismissed_at?: number;
2700
-
2701
- /**
2702
- * Parent policy containing this rule, including sibling rules for contextual
2703
- * display
2704
- */
2705
- policy?: RuleIntentResponse.Policy;
2706
-
2707
- /**
2708
- * Unix timestamp when the intent was rejected, present when status is 'rejected'
2709
- */
2710
- rejected_at?: number;
2711
- }
2712
-
2713
- export namespace RuleIntentResponse {
2714
- /**
2715
- * Current state of the rule before any changes. Undefined for create intents or if
2716
- * the rule was deleted
2717
- */
2718
- export interface CurrentResourceData {
2719
- id: string;
2720
-
2721
- action: 'ALLOW' | 'DENY';
2722
-
2723
- conditions: Array<
2724
- | CurrentResourceData.UnionMember0
2725
- | CurrentResourceData.UnionMember1
2726
- | CurrentResourceData.UnionMember2
2727
- | CurrentResourceData.UnionMember3
2728
- | CurrentResourceData.UnionMember4
2729
- | CurrentResourceData.UnionMember5
2730
- | CurrentResourceData.UnionMember6
2731
- | CurrentResourceData.UnionMember7
2732
- | CurrentResourceData.UnionMember8
2733
- | CurrentResourceData.UnionMember9
2734
- | CurrentResourceData.UnionMember10
2735
- | CurrentResourceData.UnionMember11
2736
- | CurrentResourceData.UnionMember12
2737
- | CurrentResourceData.UnionMember13
2738
- >;
2739
-
2740
- method:
2741
- | 'eth_sendTransaction'
2742
- | 'eth_signTransaction'
2743
- | 'eth_signTypedData_v4'
2744
- | 'eth_signUserOperation'
2745
- | 'eth_sign7702Authorization'
2746
- | 'signTransaction'
2747
- | 'signAndSendTransaction'
2748
- | 'signTransactionBytes'
2749
- | 'exportPrivateKey'
2750
- | '*';
2751
-
2752
- name: string;
2753
- }
2754
-
2755
- export namespace CurrentResourceData {
2756
- export interface UnionMember0 {
2757
- field: 'to' | 'value' | 'chain_id';
2758
-
2759
- field_source: 'ethereum_transaction';
2760
-
2761
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2762
-
2763
- value: string | Array<string>;
2764
- }
2765
-
2766
- export interface UnionMember1 {
2767
- abi: Array<UnionMember1.Abi>;
2768
-
2769
- field: string;
2770
-
2771
- field_source: 'ethereum_calldata';
2772
-
2773
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2774
-
2775
- value: string | Array<string>;
2776
- }
2777
-
2778
- export namespace UnionMember1 {
2779
- export interface Abi {
2780
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
2781
-
2782
- anonymous?: boolean;
2783
-
2784
- inputs?: Array<Abi.Input>;
2785
-
2786
- name?: string;
2787
-
2788
- outputs?: Array<Abi.Output>;
2789
-
2790
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
2791
- }
2792
-
2793
- export namespace Abi {
2794
- export interface Input {
2795
- type: string;
2796
-
2797
- components?: Array<unknown>;
2798
-
2799
- indexed?: boolean;
2800
-
2801
- internalType?: string;
2802
-
2803
- name?: string;
2804
- }
2805
-
2806
- export interface Output {
2807
- type: string;
2808
-
2809
- components?: Array<unknown>;
2810
-
2811
- indexed?: boolean;
2812
-
2813
- internalType?: string;
2814
-
2815
- name?: string;
2816
- }
2817
- }
2818
- }
2819
-
2820
- export interface UnionMember2 {
2821
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
2822
-
2823
- field_source: 'ethereum_typed_data_domain';
2824
-
2825
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2826
-
2827
- value: string | Array<string>;
2828
- }
2829
-
2830
- export interface UnionMember3 {
2831
- field: string;
2832
-
2833
- field_source: 'ethereum_typed_data_message';
2834
-
2835
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2836
-
2837
- typed_data: UnionMember3.TypedData;
2838
-
2839
- value: string | Array<string>;
2840
- }
2841
-
2842
- export namespace UnionMember3 {
2843
- export interface TypedData {
2844
- primary_type: string;
2845
-
2846
- types: { [key: string]: Array<TypedData.Type> };
2847
- }
2848
-
2849
- export namespace TypedData {
2850
- export interface Type {
2851
- name: string;
2852
-
2853
- type: string;
2854
- }
2855
- }
2856
- }
2857
-
2858
- export interface UnionMember4 {
2859
- field: 'contract';
2860
-
2861
- field_source: 'ethereum_7702_authorization';
2862
-
2863
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2864
-
2865
- value: string | Array<string>;
2866
- }
2867
-
2868
- export interface UnionMember5 {
2869
- field: 'programId';
2870
-
2871
- field_source: 'solana_program_instruction';
2872
-
2873
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2874
-
2875
- value: string | Array<string>;
2876
- }
2877
-
2878
- export interface UnionMember6 {
2879
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
2880
-
2881
- field_source: 'solana_system_program_instruction';
2882
-
2883
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2884
-
2885
- value: string | Array<string>;
2886
- }
2887
-
2888
- export interface UnionMember7 {
2889
- field:
2890
- | 'instructionName'
2891
- | 'Transfer.source'
2892
- | 'Transfer.destination'
2893
- | 'Transfer.authority'
2894
- | 'Transfer.amount'
2895
- | 'TransferChecked.source'
2896
- | 'TransferChecked.destination'
2897
- | 'TransferChecked.authority'
2898
- | 'TransferChecked.amount'
2899
- | 'TransferChecked.mint'
2900
- | 'Burn.account'
2901
- | 'Burn.mint'
2902
- | 'Burn.authority'
2903
- | 'Burn.amount'
2904
- | 'MintTo.mint'
2905
- | 'MintTo.account'
2906
- | 'MintTo.authority'
2907
- | 'MintTo.amount'
2908
- | 'CloseAccount.account'
2909
- | 'CloseAccount.destination'
2910
- | 'CloseAccount.authority'
2911
- | 'InitializeAccount3.account'
2912
- | 'InitializeAccount3.mint'
2913
- | 'InitializeAccount3.owner';
2914
-
2915
- field_source: 'solana_token_program_instruction';
2916
-
2917
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2918
-
2919
- value: string | Array<string>;
2920
- }
2921
-
2922
- export interface UnionMember8 {
2923
- field:
2924
- | 'TransferContract.to_address'
2925
- | 'TransferContract.amount'
2926
- | 'TriggerSmartContract.contract_address'
2927
- | 'TriggerSmartContract.call_value'
2928
- | 'TriggerSmartContract.token_id'
2929
- | 'TriggerSmartContract.call_token_value';
2930
-
2931
- field_source: 'tron_transaction';
2932
-
2933
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2934
-
2935
- value: string | Array<string>;
2936
- }
2937
-
2938
- export interface UnionMember9 {
2939
- field: 'current_unix_timestamp';
2940
-
2941
- field_source: 'system';
2942
-
2943
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2944
-
2945
- value: string | Array<string>;
2946
- }
2947
-
2948
- export interface UnionMember10 {
2949
- field: string;
2950
-
2951
- field_source: 'reference';
2952
-
2953
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2954
-
2955
- value: string | Array<string>;
2956
- }
2957
-
2958
- export interface UnionMember11 {
2959
- abi: Array<UnionMember11.Abi>;
2960
-
2961
- field: string;
2962
-
2963
- field_source: 'tron_trigger_smart_contract_data';
2964
-
2965
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
2966
-
2967
- value: string | Array<string>;
2968
- }
2969
-
2970
- export namespace UnionMember11 {
2971
- export interface Abi {
2972
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
2973
-
2974
- anonymous?: boolean;
2975
-
2976
- inputs?: Array<Abi.Input>;
2977
-
2978
- name?: string;
2979
-
2980
- outputs?: Array<Abi.Output>;
2981
-
2982
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
2983
- }
2984
-
2985
- export namespace Abi {
2986
- export interface Input {
2987
- type: string;
2988
-
2989
- components?: Array<unknown>;
2990
-
2991
- indexed?: boolean;
2992
-
2993
- internalType?: string;
2994
-
2995
- name?: string;
2996
- }
2997
-
2998
- export interface Output {
2999
- type: string;
3000
-
3001
- components?: Array<unknown>;
3002
-
3003
- indexed?: boolean;
3004
-
3005
- internalType?: string;
3006
-
3007
- name?: string;
3008
- }
3009
- }
3010
- }
3011
-
3012
- export interface UnionMember12 {
3013
- field: 'commandName';
3014
-
3015
- field_source: 'sui_transaction_command';
3016
-
3017
- operator: 'eq' | 'in';
3018
-
3019
- /**
3020
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
3021
- */
3022
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
3023
- }
3024
-
3025
- export interface UnionMember13 {
3026
- field: 'recipient' | 'amount';
3027
-
3028
- field_source: 'sui_transfer_objects_command';
3029
-
3030
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3031
-
3032
- value: string | Array<string>;
3033
- }
3034
- }
3035
-
3036
- /**
3037
- * Parent policy containing this rule, including sibling rules for contextual
3038
- * display
3039
- */
3040
- export interface Policy {
3041
- id: string;
3042
-
3043
- /**
3044
- * The wallet chain types.
3045
- */
3046
- chain_type: WalletsAPI.WalletChainType;
3047
-
3048
- created_at: number;
3049
-
3050
- name: string;
3051
-
3052
- owner_id: string | null;
3053
-
3054
- rules: Array<Policy.Rule>;
3055
-
3056
- version: '1.0';
3057
- }
3058
-
3059
- export namespace Policy {
3060
- export interface Rule {
3061
- id: string;
3062
-
3063
- action: 'ALLOW' | 'DENY';
3064
-
3065
- conditions: Array<
3066
- | Rule.UnionMember0
3067
- | Rule.UnionMember1
3068
- | Rule.UnionMember2
3069
- | Rule.UnionMember3
3070
- | Rule.UnionMember4
3071
- | Rule.UnionMember5
3072
- | Rule.UnionMember6
3073
- | Rule.UnionMember7
3074
- | Rule.UnionMember8
3075
- | Rule.UnionMember9
3076
- | Rule.UnionMember10
3077
- | Rule.UnionMember11
3078
- | Rule.UnionMember12
3079
- | Rule.UnionMember13
3080
- >;
3081
-
3082
- method:
3083
- | 'eth_sendTransaction'
3084
- | 'eth_signTransaction'
3085
- | 'eth_signTypedData_v4'
3086
- | 'eth_signUserOperation'
3087
- | 'eth_sign7702Authorization'
3088
- | 'signTransaction'
3089
- | 'signAndSendTransaction'
3090
- | 'signTransactionBytes'
3091
- | 'exportPrivateKey'
3092
- | '*';
3093
-
3094
- name: string;
3095
- }
3096
-
3097
- export namespace Rule {
3098
- export interface UnionMember0 {
3099
- field: 'to' | 'value' | 'chain_id';
3100
-
3101
- field_source: 'ethereum_transaction';
3102
-
3103
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3104
-
3105
- value: string | Array<string>;
3106
- }
3107
-
3108
- export interface UnionMember1 {
3109
- abi: Array<UnionMember1.Abi>;
3110
-
3111
- field: string;
3112
-
3113
- field_source: 'ethereum_calldata';
3114
-
3115
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3116
-
3117
- value: string | Array<string>;
3118
- }
3119
-
3120
- export namespace UnionMember1 {
3121
- export interface Abi {
3122
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
3123
-
3124
- anonymous?: boolean;
3125
-
3126
- inputs?: Array<Abi.Input>;
3127
-
3128
- name?: string;
3129
-
3130
- outputs?: Array<Abi.Output>;
3131
-
3132
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
3133
- }
3134
-
3135
- export namespace Abi {
3136
- export interface Input {
3137
- type: string;
3138
-
3139
- components?: Array<unknown>;
3140
-
3141
- indexed?: boolean;
3142
-
3143
- internalType?: string;
3144
-
3145
- name?: string;
3146
- }
3147
-
3148
- export interface Output {
3149
- type: string;
3150
-
3151
- components?: Array<unknown>;
3152
-
3153
- indexed?: boolean;
3154
-
3155
- internalType?: string;
3156
-
3157
- name?: string;
3158
- }
3159
- }
3160
- }
3161
-
3162
- export interface UnionMember2 {
3163
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
3164
-
3165
- field_source: 'ethereum_typed_data_domain';
3166
-
3167
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3168
-
3169
- value: string | Array<string>;
3170
- }
3171
-
3172
- export interface UnionMember3 {
3173
- field: string;
3174
-
3175
- field_source: 'ethereum_typed_data_message';
3176
-
3177
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3178
-
3179
- typed_data: UnionMember3.TypedData;
3180
-
3181
- value: string | Array<string>;
3182
- }
3183
-
3184
- export namespace UnionMember3 {
3185
- export interface TypedData {
3186
- primary_type: string;
3187
-
3188
- types: { [key: string]: Array<TypedData.Type> };
3189
- }
3190
-
3191
- export namespace TypedData {
3192
- export interface Type {
3193
- name: string;
3194
-
3195
- type: string;
3196
- }
3197
- }
3198
- }
3199
-
3200
- export interface UnionMember4 {
3201
- field: 'contract';
3202
-
3203
- field_source: 'ethereum_7702_authorization';
3204
-
3205
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3206
-
3207
- value: string | Array<string>;
3208
- }
3209
-
3210
- export interface UnionMember5 {
3211
- field: 'programId';
3212
-
3213
- field_source: 'solana_program_instruction';
3214
-
3215
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3216
-
3217
- value: string | Array<string>;
3218
- }
3219
-
3220
- export interface UnionMember6 {
3221
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
3222
-
3223
- field_source: 'solana_system_program_instruction';
3224
-
3225
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3226
-
3227
- value: string | Array<string>;
3228
- }
3229
-
3230
- export interface UnionMember7 {
3231
- field:
3232
- | 'instructionName'
3233
- | 'Transfer.source'
3234
- | 'Transfer.destination'
3235
- | 'Transfer.authority'
3236
- | 'Transfer.amount'
3237
- | 'TransferChecked.source'
3238
- | 'TransferChecked.destination'
3239
- | 'TransferChecked.authority'
3240
- | 'TransferChecked.amount'
3241
- | 'TransferChecked.mint'
3242
- | 'Burn.account'
3243
- | 'Burn.mint'
3244
- | 'Burn.authority'
3245
- | 'Burn.amount'
3246
- | 'MintTo.mint'
3247
- | 'MintTo.account'
3248
- | 'MintTo.authority'
3249
- | 'MintTo.amount'
3250
- | 'CloseAccount.account'
3251
- | 'CloseAccount.destination'
3252
- | 'CloseAccount.authority'
3253
- | 'InitializeAccount3.account'
3254
- | 'InitializeAccount3.mint'
3255
- | 'InitializeAccount3.owner';
3256
-
3257
- field_source: 'solana_token_program_instruction';
3258
-
3259
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3260
-
3261
- value: string | Array<string>;
3262
- }
3263
-
3264
- export interface UnionMember8 {
3265
- field:
3266
- | 'TransferContract.to_address'
3267
- | 'TransferContract.amount'
3268
- | 'TriggerSmartContract.contract_address'
3269
- | 'TriggerSmartContract.call_value'
3270
- | 'TriggerSmartContract.token_id'
3271
- | 'TriggerSmartContract.call_token_value';
3272
-
3273
- field_source: 'tron_transaction';
3274
-
3275
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3276
-
3277
- value: string | Array<string>;
3278
- }
3279
-
3280
- export interface UnionMember9 {
3281
- field: 'current_unix_timestamp';
3282
-
3283
- field_source: 'system';
3284
-
3285
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3286
-
3287
- value: string | Array<string>;
3288
- }
3289
-
3290
- export interface UnionMember10 {
3291
- field: string;
3292
-
3293
- field_source: 'reference';
3294
-
3295
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3296
-
3297
- value: string | Array<string>;
3298
- }
3299
-
3300
- export interface UnionMember11 {
3301
- abi: Array<UnionMember11.Abi>;
3302
-
3303
- field: string;
3304
-
3305
- field_source: 'tron_trigger_smart_contract_data';
3306
-
3307
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3308
-
3309
- value: string | Array<string>;
3310
- }
3311
-
3312
- export namespace UnionMember11 {
3313
- export interface Abi {
3314
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
3315
-
3316
- anonymous?: boolean;
3317
-
3318
- inputs?: Array<Abi.Input>;
3319
-
3320
- name?: string;
3321
-
3322
- outputs?: Array<Abi.Output>;
3323
-
3324
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
3325
- }
3326
-
3327
- export namespace Abi {
3328
- export interface Input {
3329
- type: string;
3330
-
3331
- components?: Array<unknown>;
3332
-
3333
- indexed?: boolean;
3334
-
3335
- internalType?: string;
3336
-
3337
- name?: string;
3338
- }
3339
-
3340
- export interface Output {
3341
- type: string;
3342
-
3343
- components?: Array<unknown>;
3344
-
3345
- indexed?: boolean;
3346
-
3347
- internalType?: string;
3348
-
3349
- name?: string;
3350
- }
3351
- }
3352
- }
3353
-
3354
- export interface UnionMember12 {
3355
- field: 'commandName';
3356
-
3357
- field_source: 'sui_transaction_command';
3358
-
3359
- operator: 'eq' | 'in';
3360
-
3361
- /**
3362
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
3363
- */
3364
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
3365
- }
3366
-
3367
- export interface UnionMember13 {
3368
- field: 'recipient' | 'amount';
3369
-
3370
- field_source: 'sui_transfer_objects_command';
3371
-
3372
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
3373
-
3374
- value: string | Array<string>;
3375
- }
3376
- }
3377
- }
648
+ 'privy-request-expiry'?: string;
3378
649
  }
3379
650
 
3380
- /**
3381
- * Response for an intent object
3382
- */
3383
- export type IntentResponse =
3384
- | RpcIntentResponse
3385
- | WalletIntentResponse
3386
- | PolicyIntentResponse
3387
- | RuleIntentResponse
3388
- | KeyQuorumIntentResponse;
3389
-
3390
651
  export declare namespace Intents {
3391
652
  export {
3392
653
  type IntentType as IntentType,
3393
654
  type IntentStatus as IntentStatus,
655
+ type RpcIntentRequestDetails as RpcIntentRequestDetails,
656
+ type TransferIntentRequestDetails as TransferIntentRequestDetails,
657
+ type PolicyIntentRequestDetails as PolicyIntentRequestDetails,
658
+ type RuleIntentCreateRequestDetails as RuleIntentCreateRequestDetails,
659
+ type RuleIntentUpdateRequestDetails as RuleIntentUpdateRequestDetails,
660
+ type RuleIntentDeleteRequestDetails as RuleIntentDeleteRequestDetails,
3394
661
  type RuleIntentRequestDetails as RuleIntentRequestDetails,
3395
662
  type IntentAuthorizationKeyQuorumMember as IntentAuthorizationKeyQuorumMember,
3396
663
  type IntentAuthorizationMember as IntentAuthorizationMember,
3397
664
  type IntentAuthorization as IntentAuthorization,
665
+ type BaseIntentResponse as BaseIntentResponse,
3398
666
  type BaseActionResult as BaseActionResult,
3399
667
  type RpcIntentResponse as RpcIntentResponse,
668
+ type TransferIntentResponse as TransferIntentResponse,
3400
669
  type WalletIntentResponse as WalletIntentResponse,
3401
670
  type PolicyIntentResponse as PolicyIntentResponse,
3402
671
  type KeyQuorumIntentResponse as KeyQuorumIntentResponse,
3403
672
  type RuleIntentResponse as RuleIntentResponse,
3404
673
  type IntentResponse as IntentResponse,
674
+ type IntentCreationHeaders as IntentCreationHeaders,
3405
675
  };
3406
676
  }