@privy-io/api-types 0.8.0 → 0.10.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 (167) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/client.d.mts +35 -32
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +35 -32
  5. package/client.d.ts.map +1 -1
  6. package/client.js +22 -8
  7. package/client.js.map +1 -1
  8. package/client.mjs +22 -8
  9. package/client.mjs.map +1 -1
  10. package/internal/types.d.mts +6 -6
  11. package/internal/types.d.mts.map +1 -1
  12. package/internal/types.d.ts +6 -6
  13. package/internal/types.d.ts.map +1 -1
  14. package/internal/utils/env.js +2 -2
  15. package/internal/utils/env.js.map +1 -1
  16. package/internal/utils/env.mjs +2 -2
  17. package/internal/utils/env.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/accounts.d.mts +128 -86
  20. package/resources/accounts.d.mts.map +1 -1
  21. package/resources/accounts.d.ts +128 -86
  22. package/resources/accounts.d.ts.map +1 -1
  23. package/resources/aggregations.d.mts +43 -43
  24. package/resources/aggregations.d.mts.map +1 -1
  25. package/resources/aggregations.d.ts +43 -43
  26. package/resources/aggregations.d.ts.map +1 -1
  27. package/resources/apps.d.mts +177 -129
  28. package/resources/apps.d.mts.map +1 -1
  29. package/resources/apps.d.ts +177 -129
  30. package/resources/apps.d.ts.map +1 -1
  31. package/resources/client-auth.d.mts +650 -648
  32. package/resources/client-auth.d.mts.map +1 -1
  33. package/resources/client-auth.d.ts +650 -648
  34. package/resources/client-auth.d.ts.map +1 -1
  35. package/resources/embedded-wallets.d.mts +84 -84
  36. package/resources/embedded-wallets.d.mts.map +1 -1
  37. package/resources/embedded-wallets.d.ts +84 -84
  38. package/resources/embedded-wallets.d.ts.map +1 -1
  39. package/resources/funding.d.mts +42 -42
  40. package/resources/funding.d.mts.map +1 -1
  41. package/resources/funding.d.ts +42 -42
  42. package/resources/funding.d.ts.map +1 -1
  43. package/resources/index.d.mts +19 -18
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +19 -18
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +3 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +2 -1
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/intents.d.mts +270 -266
  52. package/resources/intents.d.mts.map +1 -1
  53. package/resources/intents.d.ts +270 -266
  54. package/resources/intents.d.ts.map +1 -1
  55. package/resources/key-quorums.d.mts +20 -20
  56. package/resources/key-quorums.d.mts.map +1 -1
  57. package/resources/key-quorums.d.ts +20 -20
  58. package/resources/key-quorums.d.ts.map +1 -1
  59. package/resources/kraken-embed.d.mts +62 -19
  60. package/resources/kraken-embed.d.mts.map +1 -1
  61. package/resources/kraken-embed.d.ts +62 -19
  62. package/resources/kraken-embed.d.ts.map +1 -1
  63. package/resources/organizations.d.mts +65 -0
  64. package/resources/organizations.d.mts.map +1 -0
  65. package/resources/organizations.d.ts +65 -0
  66. package/resources/organizations.d.ts.map +1 -0
  67. package/resources/organizations.js +9 -0
  68. package/resources/organizations.js.map +1 -0
  69. package/resources/organizations.mjs +5 -0
  70. package/resources/organizations.mjs.map +1 -0
  71. package/resources/policies.d.mts +360 -231
  72. package/resources/policies.d.mts.map +1 -1
  73. package/resources/policies.d.ts +360 -231
  74. package/resources/policies.d.ts.map +1 -1
  75. package/resources/shared.d.mts +28 -28
  76. package/resources/shared.d.mts.map +1 -1
  77. package/resources/shared.d.ts +28 -28
  78. package/resources/shared.d.ts.map +1 -1
  79. package/resources/swaps.d.mts +8 -11
  80. package/resources/swaps.d.mts.map +1 -1
  81. package/resources/swaps.d.ts +8 -11
  82. package/resources/swaps.d.ts.map +1 -1
  83. package/resources/swaps.js.map +1 -1
  84. package/resources/swaps.mjs.map +1 -1
  85. package/resources/transactions.d.mts +56 -66
  86. package/resources/transactions.d.mts.map +1 -1
  87. package/resources/transactions.d.ts +56 -66
  88. package/resources/transactions.d.ts.map +1 -1
  89. package/resources/users.d.mts +457 -448
  90. package/resources/users.d.mts.map +1 -1
  91. package/resources/users.d.ts +457 -448
  92. package/resources/users.d.ts.map +1 -1
  93. package/resources/wallet-actions.d.mts +450 -41
  94. package/resources/wallet-actions.d.mts.map +1 -1
  95. package/resources/wallet-actions.d.ts +450 -41
  96. package/resources/wallet-actions.d.ts.map +1 -1
  97. package/resources/wallets/balance.d.mts +2 -1
  98. package/resources/wallets/balance.d.mts.map +1 -1
  99. package/resources/wallets/balance.d.ts +2 -1
  100. package/resources/wallets/balance.d.ts.map +1 -1
  101. package/resources/wallets/balance.js.map +1 -1
  102. package/resources/wallets/balance.mjs.map +1 -1
  103. package/resources/wallets/index.d.mts +1 -1
  104. package/resources/wallets/index.d.mts.map +1 -1
  105. package/resources/wallets/index.d.ts +1 -1
  106. package/resources/wallets/index.d.ts.map +1 -1
  107. package/resources/wallets/index.js.map +1 -1
  108. package/resources/wallets/index.mjs.map +1 -1
  109. package/resources/wallets/transactions.d.mts +16 -31
  110. package/resources/wallets/transactions.d.mts.map +1 -1
  111. package/resources/wallets/transactions.d.ts +16 -31
  112. package/resources/wallets/transactions.d.ts.map +1 -1
  113. package/resources/wallets/transactions.js +1 -1
  114. package/resources/wallets/transactions.js.map +1 -1
  115. package/resources/wallets/transactions.mjs +1 -1
  116. package/resources/wallets/transactions.mjs.map +1 -1
  117. package/resources/wallets/wallets.d.mts +1475 -1172
  118. package/resources/wallets/wallets.d.mts.map +1 -1
  119. package/resources/wallets/wallets.d.ts +1475 -1172
  120. package/resources/wallets/wallets.d.ts.map +1 -1
  121. package/resources/wallets/wallets.js +10 -6
  122. package/resources/wallets/wallets.js.map +1 -1
  123. package/resources/wallets/wallets.mjs +10 -6
  124. package/resources/wallets/wallets.mjs.map +1 -1
  125. package/resources/webhooks.d.mts +1345 -582
  126. package/resources/webhooks.d.mts.map +1 -1
  127. package/resources/webhooks.d.ts +1345 -582
  128. package/resources/webhooks.d.ts.map +1 -1
  129. package/resources/yield.d.mts +157 -157
  130. package/resources/yield.d.mts.map +1 -1
  131. package/resources/yield.d.ts +157 -157
  132. package/resources/yield.d.ts.map +1 -1
  133. package/src/client.ts +661 -455
  134. package/src/internal/types.ts +6 -8
  135. package/src/internal/utils/env.ts +2 -2
  136. package/src/resources/accounts.ts +157 -103
  137. package/src/resources/aggregations.ts +55 -55
  138. package/src/resources/apps.ts +232 -166
  139. package/src/resources/client-auth.ts +890 -890
  140. package/src/resources/embedded-wallets.ts +123 -123
  141. package/src/resources/funding.ts +66 -66
  142. package/src/resources/index.ts +521 -431
  143. package/src/resources/intents.ts +326 -322
  144. package/src/resources/key-quorums.ts +23 -23
  145. package/src/resources/kraken-embed.ts +116 -19
  146. package/src/resources/organizations.ts +82 -0
  147. package/src/resources/policies.ts +495 -339
  148. package/src/resources/shared.ts +34 -34
  149. package/src/resources/swaps.ts +9 -14
  150. package/src/resources/transactions.ts +88 -115
  151. package/src/resources/users.ts +664 -653
  152. package/src/resources/wallet-actions.ts +585 -56
  153. package/src/resources/wallets/balance.ts +2 -1
  154. package/src/resources/wallets/index.ts +158 -138
  155. package/src/resources/wallets/transactions.ts +20 -83
  156. package/src/resources/wallets/wallets.ts +1997 -1563
  157. package/src/resources/webhooks.ts +1652 -700
  158. package/src/resources/yield.ts +188 -188
  159. package/src/version.ts +1 -1
  160. package/version.d.mts +1 -1
  161. package/version.d.mts.map +1 -1
  162. package/version.d.ts +1 -1
  163. package/version.d.ts.map +1 -1
  164. package/version.js +1 -1
  165. package/version.js.map +1 -1
  166. package/version.mjs +1 -1
  167. package/version.mjs.map +1 -1
@@ -9,53 +9,272 @@ import * as WalletsAPI from './wallets/wallets';
9
9
  export class Webhooks extends APIResource {}
10
10
 
11
11
  /**
12
- * Payload for the intent.created webhook event.
12
+ * Bridge metadata for a crypto deposit via liquidation address.
13
13
  */
14
- export interface IntentCreatedWebhookPayload {
14
+ export interface BridgeCryptoDepositMetadata {
15
+ drain_id: string;
16
+
15
17
  /**
16
- * Unix timestamp when the intent was created.
18
+ * The crypto address of the liquidation address that received the deposit.
17
19
  */
18
- created_at: number;
20
+ liquidation_address: string;
21
+
22
+ liquidation_address_id: string;
23
+
24
+ method: 'liquidation_address';
19
25
 
20
26
  /**
21
- * Unix timestamp when the intent expires.
27
+ * The address that sent the deposit.
22
28
  */
23
- expires_at: number;
29
+ source_wallet_address: string;
30
+
31
+ type: 'crypto_deposit';
32
+ }
33
+
34
+ /**
35
+ * Bridge metadata for a crypto deposit via transfer.
36
+ */
37
+ export interface BridgeCryptoTransferMetadata {
38
+ method: 'transfer';
24
39
 
25
40
  /**
26
- * The unique ID of the intent.
41
+ * The wallet address that sent the transfer.
27
42
  */
28
- intent_id: string;
43
+ source_wallet_address: string;
44
+
45
+ transfer_id: string;
46
+
47
+ type: 'crypto_deposit';
48
+ }
49
+
50
+ /**
51
+ * Bridge metadata for a fiat deposit via virtual account.
52
+ */
53
+ export interface BridgeFiatDepositMetadata {
54
+ activity_id: string;
55
+
56
+ method: 'virtual_account';
57
+
58
+ type: 'fiat_deposit';
59
+
60
+ virtual_account_id: string;
61
+ }
62
+
63
+ /**
64
+ * Bridge metadata for a fiat deposit via transfer.
65
+ */
66
+ export interface BridgeFiatTransferMetadata {
67
+ method: 'transfer';
68
+
69
+ transfer_id: string;
70
+
71
+ type: 'fiat_deposit';
72
+ }
73
+
74
+ /**
75
+ * Metadata about a Bridge transaction associated with a wallet event.
76
+ */
77
+ export type BridgeMetadata =
78
+ | BridgeCryptoDepositMetadata
79
+ | BridgeRefundMetadata
80
+ | BridgeFiatDepositMetadata
81
+ | BridgeCryptoTransferMetadata
82
+ | BridgeFiatTransferMetadata
83
+ | BridgeTransferRefundMetadata
84
+ | BridgeStaticMemoDepositMetadata;
85
+
86
+ /**
87
+ * Bridge metadata for a refund via liquidation address.
88
+ */
89
+ export interface BridgeRefundMetadata {
90
+ drain_id: string;
91
+
92
+ liquidation_address_id: string;
93
+
94
+ method: 'liquidation_address';
29
95
 
30
96
  /**
31
- * Type of intent.
97
+ * The original deposit transaction hash that triggered the failed drain.
32
98
  */
33
- intent_type: IntentsAPI.IntentType;
99
+ original_transaction_hash: string;
100
+
101
+ type: 'refund';
102
+ }
103
+
104
+ /**
105
+ * Bridge metadata for a fiat deposit via static memo.
106
+ */
107
+ export interface BridgeStaticMemoDepositMetadata {
108
+ method: 'static_memo';
109
+
110
+ static_memo_event_id: string;
111
+
112
+ static_memo_id: string;
113
+
114
+ type: 'fiat_deposit';
115
+ }
116
+
117
+ /**
118
+ * Bridge metadata for a transfer refund.
119
+ */
120
+ export interface BridgeTransferRefundMetadata {
121
+ method: 'transfer';
122
+
123
+ transfer_id: string;
124
+
125
+ type: 'refund';
34
126
 
35
127
  /**
36
- * The current status of the intent.
128
+ * The original transfer transaction hash (if available).
37
129
  */
38
- status: string;
130
+ original_transaction_hash?: string;
131
+ }
132
+
133
+ /**
134
+ * Payload for the wallet.funds_deposited webhook event.
135
+ */
136
+ export interface FundsDepositedWebhookPayload {
137
+ /**
138
+ * The amount transferred, as a stringified bigint.
139
+ */
140
+ amount: string;
141
+
142
+ /**
143
+ * An asset involved in a wallet transfer.
144
+ */
145
+ asset: WalletFundsAsset;
146
+
147
+ block: FundsDepositedWebhookPayload.Block;
148
+
149
+ /**
150
+ * The CAIP-2 chain identifier.
151
+ */
152
+ caip2: string;
153
+
154
+ /**
155
+ * A unique key for this event.
156
+ */
157
+ idempotency_key: string;
158
+
159
+ /**
160
+ * The recipient address.
161
+ */
162
+ recipient: string;
163
+
164
+ /**
165
+ * The sender address.
166
+ */
167
+ sender: string;
168
+
169
+ /**
170
+ * The blockchain transaction hash.
171
+ */
172
+ transaction_hash: string;
39
173
 
40
174
  /**
41
175
  * The type of webhook event.
42
176
  */
43
- type: 'intent.created';
177
+ type: 'wallet.funds_deposited';
44
178
 
45
179
  /**
46
- * Key quorums that can authorize this intent.
180
+ * The ID of the wallet.
47
181
  */
48
- authorization_details?: Array<IntentsAPI.IntentAuthorization>;
182
+ wallet_id: string;
49
183
 
50
184
  /**
51
- * Display name of the user who created the intent.
185
+ * Metadata about a Bridge transaction associated with a wallet event.
52
186
  */
53
- created_by_display_name?: string;
187
+ bridge_metadata?: BridgeMetadata;
54
188
 
55
189
  /**
56
- * The ID of the user who created the intent.
190
+ * The transaction fee paid, as a stringified bigint in the chain's native token.
57
191
  */
58
- created_by_id?: string;
192
+ transaction_fee?: string;
193
+ }
194
+
195
+ export namespace FundsDepositedWebhookPayload {
196
+ export interface Block {
197
+ /**
198
+ * The block number.
199
+ */
200
+ number: number;
201
+
202
+ /**
203
+ * The block timestamp.
204
+ */
205
+ timestamp: number;
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Payload for the wallet.funds_withdrawn webhook event.
211
+ */
212
+ export interface FundsWithdrawnWebhookPayload {
213
+ /**
214
+ * The amount transferred, as a stringified bigint.
215
+ */
216
+ amount: string;
217
+
218
+ /**
219
+ * An asset involved in a wallet transfer.
220
+ */
221
+ asset: WalletFundsAsset;
222
+
223
+ block: FundsWithdrawnWebhookPayload.Block;
224
+
225
+ /**
226
+ * The CAIP-2 chain identifier.
227
+ */
228
+ caip2: string;
229
+
230
+ /**
231
+ * A unique key for this event.
232
+ */
233
+ idempotency_key: string;
234
+
235
+ /**
236
+ * The recipient address.
237
+ */
238
+ recipient: string;
239
+
240
+ /**
241
+ * The sender address.
242
+ */
243
+ sender: string;
244
+
245
+ /**
246
+ * The blockchain transaction hash.
247
+ */
248
+ transaction_hash: string;
249
+
250
+ /**
251
+ * The type of webhook event.
252
+ */
253
+ type: 'wallet.funds_withdrawn';
254
+
255
+ /**
256
+ * The ID of the wallet.
257
+ */
258
+ wallet_id: string;
259
+
260
+ /**
261
+ * The transaction fee paid, as a stringified bigint in the chain's native token.
262
+ */
263
+ transaction_fee?: string;
264
+ }
265
+
266
+ export namespace FundsWithdrawnWebhookPayload {
267
+ export interface Block {
268
+ /**
269
+ * The block number.
270
+ */
271
+ number: number;
272
+
273
+ /**
274
+ * The block timestamp.
275
+ */
276
+ timestamp: number;
277
+ }
59
278
  }
60
279
 
61
280
  /**
@@ -114,14 +333,9 @@ export interface IntentAuthorizedWebhookPayload {
114
333
  }
115
334
 
116
335
  /**
117
- * Payload for the intent.executed webhook event.
336
+ * Payload for the intent.created webhook event.
118
337
  */
119
- export interface IntentExecutedWebhookPayload {
120
- /**
121
- * Result of the successful intent execution.
122
- */
123
- action_result: IntentsAPI.BaseActionResult;
124
-
338
+ export interface IntentCreatedWebhookPayload {
125
339
  /**
126
340
  * Unix timestamp when the intent was created.
127
341
  */
@@ -150,7 +364,12 @@ export interface IntentExecutedWebhookPayload {
150
364
  /**
151
365
  * The type of webhook event.
152
366
  */
153
- type: 'intent.executed';
367
+ type: 'intent.created';
368
+
369
+ /**
370
+ * Key quorums that can authorize this intent.
371
+ */
372
+ authorization_details?: Array<IntentsAPI.IntentAuthorization>;
154
373
 
155
374
  /**
156
375
  * Display name of the user who created the intent.
@@ -164,11 +383,11 @@ export interface IntentExecutedWebhookPayload {
164
383
  }
165
384
 
166
385
  /**
167
- * Payload for the intent.failed webhook event.
386
+ * Payload for the intent.executed webhook event.
168
387
  */
169
- export interface IntentFailedWebhookPayload {
388
+ export interface IntentExecutedWebhookPayload {
170
389
  /**
171
- * Result of the failed intent execution.
390
+ * Result of the successful intent execution.
172
391
  */
173
392
  action_result: IntentsAPI.BaseActionResult;
174
393
 
@@ -200,7 +419,7 @@ export interface IntentFailedWebhookPayload {
200
419
  /**
201
420
  * The type of webhook event.
202
421
  */
203
- type: 'intent.failed';
422
+ type: 'intent.executed';
204
423
 
205
424
  /**
206
425
  * Display name of the user who created the intent.
@@ -214,198 +433,300 @@ export interface IntentFailedWebhookPayload {
214
433
  }
215
434
 
216
435
  /**
217
- * Payload for the mfa.enabled webhook event.
436
+ * Payload for the intent.failed webhook event.
218
437
  */
219
- export interface MfaEnabledWebhookPayload {
438
+ export interface IntentFailedWebhookPayload {
220
439
  /**
221
- * The MFA method that was enabled.
440
+ * Result of the failed intent execution.
222
441
  */
223
- method: 'sms' | 'totp' | 'passkey';
442
+ action_result: IntentsAPI.BaseActionResult;
224
443
 
225
444
  /**
226
- * The type of webhook event.
445
+ * Unix timestamp when the intent was created.
227
446
  */
228
- type: 'mfa.enabled';
447
+ created_at: number;
229
448
 
230
449
  /**
231
- * The ID of the user who enabled MFA.
450
+ * Unix timestamp when the intent expires.
232
451
  */
233
- user_id: string;
234
- }
452
+ expires_at: number;
235
453
 
236
- /**
237
- * Payload for the mfa.disabled webhook event.
238
- */
239
- export interface MfaDisabledWebhookPayload {
240
454
  /**
241
- * The MFA method that was disabled.
455
+ * The unique ID of the intent.
242
456
  */
243
- method: 'sms' | 'totp' | 'passkey';
457
+ intent_id: string;
244
458
 
245
459
  /**
246
- * The type of webhook event.
460
+ * Type of intent.
247
461
  */
248
- type: 'mfa.disabled';
462
+ intent_type: IntentsAPI.IntentType;
249
463
 
250
464
  /**
251
- * The ID of the user who disabled MFA.
465
+ * The current status of the intent.
252
466
  */
253
- user_id: string;
254
- }
467
+ status: string;
255
468
 
256
- /**
257
- * Payload for the transaction.broadcasted webhook event.
258
- */
259
- export interface TransactionBroadcastedWebhookPayload {
260
469
  /**
261
- * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
470
+ * The type of webhook event.
262
471
  */
263
- caip2: string;
472
+ type: 'intent.failed';
264
473
 
265
474
  /**
266
- * The blockchain transaction hash.
475
+ * Display name of the user who created the intent.
267
476
  */
268
- transaction_hash: string;
477
+ created_by_display_name?: string;
269
478
 
270
479
  /**
271
- * The Privy-assigned ID for this transaction.
480
+ * The ID of the user who created the intent.
272
481
  */
273
- transaction_id: string;
482
+ created_by_id?: string;
483
+ }
484
+
485
+ /**
486
+ * Payload for the kraken_embed.quote.cancelled webhook event.
487
+ */
488
+ export interface KrakenEmbedQuoteCancelledWebhookPayload {
489
+ /**
490
+ * ISO 8601 timestamp of when the quote was cancelled.
491
+ */
492
+ cancelled_at: string;
493
+
494
+ /**
495
+ * The ID of the cancelled quote.
496
+ */
497
+ quote_id: string;
498
+
499
+ /**
500
+ * A human-readable description of why the quote was cancelled. Intended for
501
+ * display and logging purposes only.
502
+ */
503
+ reason: string;
274
504
 
275
505
  /**
276
506
  * The type of webhook event.
277
507
  */
278
- type: 'transaction.broadcasted';
508
+ type: 'kraken_embed.quote.cancelled';
279
509
 
280
510
  /**
281
- * The ID of the wallet that initiated the transaction.
511
+ * The ID of the user.
282
512
  */
283
- wallet_id: string;
513
+ user_id: string;
514
+ }
284
515
 
516
+ /**
517
+ * Payload for the kraken_embed.quote_executed webhook event.
518
+ */
519
+ export interface KrakenEmbedQuoteExecutedWebhookPayload {
285
520
  /**
286
- * Developer-provided reference ID for transaction reconciliation, if one was
287
- * provided.
521
+ * ISO 8601 timestamp of when the quote was executed.
288
522
  */
289
- reference_id?: string | null;
523
+ executed_at: string;
524
+
525
+ /**
526
+ * The ID of the executed quote.
527
+ */
528
+ quote_id: string;
529
+
530
+ /**
531
+ * The type of webhook event.
532
+ */
533
+ type: 'kraken_embed.quote.executed';
534
+
535
+ /**
536
+ * The ID of the user.
537
+ */
538
+ user_id: string;
290
539
  }
291
540
 
292
541
  /**
293
- * Payload for the transaction.confirmed webhook event.
542
+ * Payload for the kraken_embed.quote.execution_failed webhook event.
294
543
  */
295
- export interface TransactionConfirmedWebhookPayload {
544
+ export interface KrakenEmbedQuoteExecutionFailedWebhookPayload {
296
545
  /**
297
- * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
546
+ * ISO 8601 timestamp of when the quote execution failed.
298
547
  */
299
- caip2: string;
548
+ failed_at: string;
300
549
 
301
550
  /**
302
- * The blockchain transaction hash.
551
+ * The ID of the quote that failed to execute.
303
552
  */
304
- transaction_hash: string;
553
+ quote_id: string;
305
554
 
306
555
  /**
307
- * The Privy-assigned ID for this transaction.
556
+ * A human-readable description of why the quote execution failed. Intended for
557
+ * display and logging purposes only.
308
558
  */
309
- transaction_id: string;
559
+ reason: string;
310
560
 
311
561
  /**
312
562
  * The type of webhook event.
313
563
  */
314
- type: 'transaction.confirmed';
564
+ type: 'kraken_embed.quote.execution_failed';
315
565
 
316
566
  /**
317
- * The ID of the wallet that initiated the transaction.
567
+ * The ID of the user.
318
568
  */
319
- wallet_id: string;
569
+ user_id: string;
570
+ }
320
571
 
572
+ /**
573
+ * Payload for the kraken_embed.user.closed webhook event.
574
+ */
575
+ export interface KrakenEmbedUserClosedWebhookPayload {
321
576
  /**
322
- * Developer-provided reference ID for transaction reconciliation, if one was
323
- * provided.
577
+ * ISO 8601 timestamp of when the user was closed.
324
578
  */
325
- reference_id?: string | null;
579
+ closed_at: string;
580
+
581
+ /**
582
+ * The type of webhook event.
583
+ */
584
+ type: 'kraken_embed.user.closed';
585
+
586
+ /**
587
+ * The ID of the user.
588
+ */
589
+ user_id: string;
326
590
  }
327
591
 
328
592
  /**
329
- * Payload for the transaction.execution_reverted webhook event.
593
+ * Payload for the kraken_embed.user.disabled webhook event.
330
594
  */
331
- export interface TransactionExecutionRevertedWebhookPayload {
595
+ export interface KrakenEmbedUserDisabledWebhookPayload {
332
596
  /**
333
- * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
597
+ * ISO 8601 timestamp of when the user was disabled.
334
598
  */
335
- caip2: string;
599
+ disabled_at: string;
336
600
 
337
601
  /**
338
- * The blockchain transaction hash.
602
+ * The type of webhook event.
339
603
  */
340
- transaction_hash: string;
604
+ type: 'kraken_embed.user.disabled';
341
605
 
342
606
  /**
343
- * The Privy-assigned ID for this transaction.
607
+ * The ID of the user.
344
608
  */
345
- transaction_id: string;
609
+ user_id: string;
610
+ }
346
611
 
612
+ /**
613
+ * Payload for the kraken_embed.user.verified webhook event.
614
+ */
615
+ export interface KrakenEmbedUserVerifiedWebhookPayload {
347
616
  /**
348
617
  * The type of webhook event.
349
618
  */
350
- type: 'transaction.execution_reverted';
619
+ type: 'kraken_embed.user.verified';
351
620
 
352
621
  /**
353
- * The ID of the wallet that initiated the transaction.
622
+ * The ID of the user.
354
623
  */
355
- wallet_id: string;
624
+ user_id: string;
356
625
 
357
626
  /**
358
- * Developer-provided reference ID for transaction reconciliation, if one was
359
- * provided.
627
+ * ISO 8601 timestamp of when the user was verified.
360
628
  */
361
- reference_id?: string | null;
629
+ verified_at: string;
362
630
  }
363
631
 
364
632
  /**
365
- * Payload for the transaction.still_pending webhook event.
633
+ * Payload for the mfa.disabled webhook event.
366
634
  */
367
- export interface TransactionStillPendingWebhookPayload {
635
+ export interface MfaDisabledWebhookPayload {
368
636
  /**
369
- * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
637
+ * The MFA method that was disabled.
370
638
  */
371
- caip2: string;
639
+ method: 'sms' | 'totp' | 'passkey';
372
640
 
373
641
  /**
374
- * The blockchain transaction hash.
642
+ * The type of webhook event.
375
643
  */
376
- transaction_hash: string;
644
+ type: 'mfa.disabled';
377
645
 
378
646
  /**
379
- * The Privy-assigned ID for this transaction.
647
+ * The ID of the user who disabled MFA.
380
648
  */
381
- transaction_id: string;
649
+ user_id: string;
650
+ }
651
+
652
+ /**
653
+ * Payload for the mfa.enabled webhook event.
654
+ */
655
+ export interface MfaEnabledWebhookPayload {
656
+ /**
657
+ * The MFA method that was enabled.
658
+ */
659
+ method: 'sms' | 'totp' | 'passkey';
660
+
661
+ /**
662
+ * The type of webhook event.
663
+ */
664
+ type: 'mfa.enabled';
382
665
 
383
666
  /**
384
- * An unsigned Ethereum transaction object.
667
+ * The ID of the user who enabled MFA.
385
668
  */
386
- transaction_request: WalletsAPI.UnsignedEthereumTransaction;
669
+ user_id: string;
670
+ }
387
671
 
672
+ /**
673
+ * Payload for the wallet.private_key_export webhook event.
674
+ */
675
+ export interface PrivateKeyExportWebhookPayload {
388
676
  /**
389
677
  * The type of webhook event.
390
678
  */
391
- type: 'transaction.still_pending';
679
+ type: 'wallet.private_key_export';
392
680
 
393
681
  /**
394
- * The ID of the wallet that initiated the transaction.
682
+ * The ID of the user who exported the key.
683
+ */
684
+ user_id: string;
685
+
686
+ /**
687
+ * The address of the wallet.
688
+ */
689
+ wallet_address: string;
690
+
691
+ /**
692
+ * The ID of the wallet.
395
693
  */
396
694
  wallet_id: string;
397
695
 
696
+ export_source?: 'display' | 'client';
697
+ }
698
+
699
+ /**
700
+ * Payload for the wallet.seed_phrase_export webhook event.
701
+ */
702
+ export interface SeedPhraseExportWebhookPayload {
398
703
  /**
399
- * Developer-provided reference ID for transaction reconciliation, if one was
400
- * provided.
704
+ * The type of webhook event.
401
705
  */
402
- reference_id?: string | null;
706
+ type: 'wallet.seed_phrase_export';
707
+
708
+ /**
709
+ * The ID of the user who exported the seed phrase.
710
+ */
711
+ user_id: string;
712
+
713
+ /**
714
+ * The address of the wallet.
715
+ */
716
+ wallet_address: string;
717
+
718
+ /**
719
+ * The ID of the wallet.
720
+ */
721
+ wallet_id: string;
722
+
723
+ export_source?: 'display' | 'client';
403
724
  }
404
725
 
405
726
  /**
406
- * Payload for the transaction.failed webhook event.
727
+ * Payload for the transaction.broadcasted webhook event.
407
728
  */
408
- export interface TransactionFailedWebhookPayload {
729
+ export interface TransactionBroadcastedWebhookPayload {
409
730
  /**
410
731
  * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
411
732
  */
@@ -424,7 +745,7 @@ export interface TransactionFailedWebhookPayload {
424
745
  /**
425
746
  * The type of webhook event.
426
747
  */
427
- type: 'transaction.failed';
748
+ type: 'transaction.broadcasted';
428
749
 
429
750
  /**
430
751
  * The ID of the wallet that initiated the transaction.
@@ -439,9 +760,9 @@ export interface TransactionFailedWebhookPayload {
439
760
  }
440
761
 
441
762
  /**
442
- * Payload for the transaction.replaced webhook event.
763
+ * Payload for the transaction.confirmed webhook event.
443
764
  */
444
- export interface TransactionReplacedWebhookPayload {
765
+ export interface TransactionConfirmedWebhookPayload {
445
766
  /**
446
767
  * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
447
768
  */
@@ -460,7 +781,7 @@ export interface TransactionReplacedWebhookPayload {
460
781
  /**
461
782
  * The type of webhook event.
462
783
  */
463
- type: 'transaction.replaced';
784
+ type: 'transaction.confirmed';
464
785
 
465
786
  /**
466
787
  * The ID of the wallet that initiated the transaction.
@@ -475,9 +796,9 @@ export interface TransactionReplacedWebhookPayload {
475
796
  }
476
797
 
477
798
  /**
478
- * Payload for the transaction.provider_error webhook event.
799
+ * Payload for the transaction.execution_reverted webhook event.
479
800
  */
480
- export interface TransactionProviderErrorWebhookPayload {
801
+ export interface TransactionExecutionRevertedWebhookPayload {
481
802
  /**
482
803
  * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
483
804
  */
@@ -496,7 +817,7 @@ export interface TransactionProviderErrorWebhookPayload {
496
817
  /**
497
818
  * The type of webhook event.
498
819
  */
499
- type: 'transaction.provider_error';
820
+ type: 'transaction.execution_reverted';
500
821
 
501
822
  /**
502
823
  * The ID of the wallet that initiated the transaction.
@@ -511,76 +832,159 @@ export interface TransactionProviderErrorWebhookPayload {
511
832
  }
512
833
 
513
834
  /**
514
- * Payload for the user_operation.completed webhook event.
835
+ * Payload for the transaction.failed webhook event.
515
836
  */
516
- export interface UserOperationCompletedWebhookPayload {
517
- actual_gas_cost: string;
518
-
519
- actual_gas_used: string;
520
-
521
- block_number: number;
522
-
837
+ export interface TransactionFailedWebhookPayload {
838
+ /**
839
+ * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
840
+ */
523
841
  caip2: string;
524
842
 
525
- log_index: number;
843
+ /**
844
+ * The blockchain transaction hash.
845
+ */
846
+ transaction_hash: string;
526
847
 
527
- nonce: string;
848
+ /**
849
+ * The Privy-assigned ID for this transaction.
850
+ */
851
+ transaction_id: string;
528
852
 
529
- paymaster: string | null;
853
+ /**
854
+ * The type of webhook event.
855
+ */
856
+ type: 'transaction.failed';
530
857
 
531
- sender: string;
858
+ /**
859
+ * The ID of the wallet that initiated the transaction.
860
+ */
861
+ wallet_id: string;
532
862
 
533
- success: boolean;
863
+ /**
864
+ * Developer-provided reference ID for transaction reconciliation, if one was
865
+ * provided.
866
+ */
867
+ reference_id?: string | null;
868
+ }
869
+
870
+ /**
871
+ * Payload for the transaction.provider_error webhook event.
872
+ */
873
+ export interface TransactionProviderErrorWebhookPayload {
874
+ /**
875
+ * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
876
+ */
877
+ caip2: string;
534
878
 
879
+ /**
880
+ * The blockchain transaction hash.
881
+ */
535
882
  transaction_hash: string;
536
883
 
884
+ /**
885
+ * The Privy-assigned ID for this transaction.
886
+ */
887
+ transaction_id: string;
888
+
537
889
  /**
538
890
  * The type of webhook event.
539
891
  */
540
- type: 'user_operation.completed';
892
+ type: 'transaction.provider_error';
541
893
 
542
- user_op_hash: string;
894
+ /**
895
+ * The ID of the wallet that initiated the transaction.
896
+ */
897
+ wallet_id: string;
898
+
899
+ /**
900
+ * Developer-provided reference ID for transaction reconciliation, if one was
901
+ * provided.
902
+ */
903
+ reference_id?: string | null;
543
904
  }
544
905
 
545
906
  /**
546
- * Payload for the user.created webhook event.
907
+ * Payload for the transaction.replaced webhook event.
547
908
  */
548
- export interface UserCreatedWebhookPayload {
909
+ export interface TransactionReplacedWebhookPayload {
910
+ /**
911
+ * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
912
+ */
913
+ caip2: string;
914
+
915
+ /**
916
+ * The blockchain transaction hash.
917
+ */
918
+ transaction_hash: string;
919
+
920
+ /**
921
+ * The Privy-assigned ID for this transaction.
922
+ */
923
+ transaction_id: string;
924
+
549
925
  /**
550
926
  * The type of webhook event.
551
927
  */
552
- type: 'user.created';
928
+ type: 'transaction.replaced';
553
929
 
554
930
  /**
555
- * A Privy user object.
931
+ * The ID of the wallet that initiated the transaction.
556
932
  */
557
- user: UsersAPI.User;
933
+ wallet_id: string;
934
+
935
+ /**
936
+ * Developer-provided reference ID for transaction reconciliation, if one was
937
+ * provided.
938
+ */
939
+ reference_id?: string | null;
558
940
  }
559
941
 
560
942
  /**
561
- * Payload for the user.authenticated webhook event.
943
+ * Payload for the transaction.still_pending webhook event.
562
944
  */
563
- export interface UserAuthenticatedWebhookPayload {
945
+ export interface TransactionStillPendingWebhookPayload {
564
946
  /**
565
- * A linked account for the user.
947
+ * The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
566
948
  */
567
- account: UsersAPI.LinkedAccount;
949
+ caip2: string;
950
+
951
+ /**
952
+ * The blockchain transaction hash.
953
+ */
954
+ transaction_hash: string;
955
+
956
+ /**
957
+ * The Privy-assigned ID for this transaction.
958
+ */
959
+ transaction_id: string;
960
+
961
+ /**
962
+ * An unsigned standard Ethereum transaction object. Supports EVM transaction types
963
+ * 0, 1, 2, and 4.
964
+ */
965
+ transaction_request: WalletsAPI.UnsignedStandardEthereumTransaction;
568
966
 
569
967
  /**
570
968
  * The type of webhook event.
571
969
  */
572
- type: 'user.authenticated';
970
+ type: 'transaction.still_pending';
573
971
 
574
972
  /**
575
- * A Privy user object.
973
+ * The ID of the wallet that initiated the transaction.
576
974
  */
577
- user: UsersAPI.User;
975
+ wallet_id: string;
976
+
977
+ /**
978
+ * Developer-provided reference ID for transaction reconciliation, if one was
979
+ * provided.
980
+ */
981
+ reference_id?: string | null;
578
982
  }
579
983
 
580
984
  /**
581
- * Payload for the user.linked_account webhook event.
985
+ * Payload for the user.authenticated webhook event.
582
986
  */
583
- export interface UserLinkedAccountWebhookPayload {
987
+ export interface UserAuthenticatedWebhookPayload {
584
988
  /**
585
989
  * A linked account for the user.
586
990
  */
@@ -589,7 +993,7 @@ export interface UserLinkedAccountWebhookPayload {
589
993
  /**
590
994
  * The type of webhook event.
591
995
  */
592
- type: 'user.linked_account';
996
+ type: 'user.authenticated';
593
997
 
594
998
  /**
595
999
  * A Privy user object.
@@ -598,18 +1002,13 @@ export interface UserLinkedAccountWebhookPayload {
598
1002
  }
599
1003
 
600
1004
  /**
601
- * Payload for the user.unlinked_account webhook event.
1005
+ * Payload for the user.created webhook event.
602
1006
  */
603
- export interface UserUnlinkedAccountWebhookPayload {
604
- /**
605
- * A linked account for the user.
606
- */
607
- account: UsersAPI.LinkedAccount;
608
-
1007
+ export interface UserCreatedWebhookPayload {
609
1008
  /**
610
1009
  * The type of webhook event.
611
1010
  */
612
- type: 'user.unlinked_account';
1011
+ type: 'user.created';
613
1012
 
614
1013
  /**
615
1014
  * A Privy user object.
@@ -618,9 +1017,9 @@ export interface UserUnlinkedAccountWebhookPayload {
618
1017
  }
619
1018
 
620
1019
  /**
621
- * Payload for the user.updated_account webhook event.
1020
+ * Payload for the user.linked_account webhook event.
622
1021
  */
623
- export interface UserUpdatedAccountWebhookPayload {
1022
+ export interface UserLinkedAccountWebhookPayload {
624
1023
  /**
625
1024
  * A linked account for the user.
626
1025
  */
@@ -629,7 +1028,7 @@ export interface UserUpdatedAccountWebhookPayload {
629
1028
  /**
630
1029
  * The type of webhook event.
631
1030
  */
632
- type: 'user.updated_account';
1031
+ type: 'user.linked_account';
633
1032
 
634
1033
  /**
635
1034
  * A Privy user object.
@@ -637,6 +1036,38 @@ export interface UserUpdatedAccountWebhookPayload {
637
1036
  user: UsersAPI.User;
638
1037
  }
639
1038
 
1039
+ /**
1040
+ * Payload for the user_operation.completed webhook event.
1041
+ */
1042
+ export interface UserOperationCompletedWebhookPayload {
1043
+ actual_gas_cost: string;
1044
+
1045
+ actual_gas_used: string;
1046
+
1047
+ block_number: number;
1048
+
1049
+ caip2: string;
1050
+
1051
+ log_index: number;
1052
+
1053
+ nonce: string;
1054
+
1055
+ paymaster: string | null;
1056
+
1057
+ sender: string;
1058
+
1059
+ success: boolean;
1060
+
1061
+ transaction_hash: string;
1062
+
1063
+ /**
1064
+ * The type of webhook event.
1065
+ */
1066
+ type: 'user_operation.completed';
1067
+
1068
+ user_op_hash: string;
1069
+ }
1070
+
640
1071
  /**
641
1072
  * Payload for the user.transferred_account webhook event.
642
1073
  */
@@ -667,6 +1098,46 @@ export namespace UserTransferredAccountWebhookPayload {
667
1098
  }
668
1099
  }
669
1100
 
1101
+ /**
1102
+ * Payload for the user.unlinked_account webhook event.
1103
+ */
1104
+ export interface UserUnlinkedAccountWebhookPayload {
1105
+ /**
1106
+ * A linked account for the user.
1107
+ */
1108
+ account: UsersAPI.LinkedAccount;
1109
+
1110
+ /**
1111
+ * The type of webhook event.
1112
+ */
1113
+ type: 'user.unlinked_account';
1114
+
1115
+ /**
1116
+ * A Privy user object.
1117
+ */
1118
+ user: UsersAPI.User;
1119
+ }
1120
+
1121
+ /**
1122
+ * Payload for the user.updated_account webhook event.
1123
+ */
1124
+ export interface UserUpdatedAccountWebhookPayload {
1125
+ /**
1126
+ * A linked account for the user.
1127
+ */
1128
+ account: UsersAPI.LinkedAccount;
1129
+
1130
+ /**
1131
+ * The type of webhook event.
1132
+ */
1133
+ type: 'user.updated_account';
1134
+
1135
+ /**
1136
+ * A Privy user object.
1137
+ */
1138
+ user: UsersAPI.User;
1139
+ }
1140
+
670
1141
  /**
671
1142
  * Payload for the user.wallet_created webhook event.
672
1143
  */
@@ -688,43 +1159,48 @@ export interface UserWalletCreatedWebhookPayload {
688
1159
  }
689
1160
 
690
1161
  /**
691
- * Payload for the wallet_action.swap.created webhook event.
1162
+ * Payload for the wallet_action.earn_deposit.created webhook event.
692
1163
  */
693
- export interface WalletActionSwapCreatedWebhookPayload {
1164
+ export interface WalletActionEarnDepositCreatedWebhookPayload {
694
1165
  /**
695
1166
  * Type of wallet action
696
1167
  */
697
1168
  action_type: WalletActionsAPI.WalletActionType;
698
1169
 
699
1170
  /**
700
- * Chain identifier.
1171
+ * Underlying asset token address.
1172
+ */
1173
+ asset_address: string;
1174
+
1175
+ /**
1176
+ * CAIP-2 chain identifier.
701
1177
  */
702
1178
  caip2: string;
703
1179
 
704
1180
  /**
705
- * Amount of input token in base units. Populated after on-chain confirmation.
1181
+ * Base-unit amount of asset deposited (e.g. "1500000").
706
1182
  */
707
- input_amount: string | null;
1183
+ raw_amount: string;
708
1184
 
709
1185
  /**
710
- * Token address being sold.
1186
+ * The status of the wallet action.
711
1187
  */
712
- input_token: string;
1188
+ status: 'pending';
713
1189
 
714
1190
  /**
715
- * Token address being bought.
1191
+ * The type of webhook event.
716
1192
  */
717
- output_token: string;
1193
+ type: 'wallet_action.earn_deposit.created';
718
1194
 
719
1195
  /**
720
- * Status of a wallet action.
1196
+ * ERC-4626 vault contract address.
721
1197
  */
722
- status: WalletActionsAPI.WalletActionStatus;
1198
+ vault_address: string;
723
1199
 
724
1200
  /**
725
- * The type of webhook event.
1201
+ * The vault ID.
726
1202
  */
727
- type: 'wallet_action.swap.created';
1203
+ vault_id: string;
728
1204
 
729
1205
  /**
730
1206
  * The ID of the wallet action.
@@ -735,57 +1211,80 @@ export interface WalletActionSwapCreatedWebhookPayload {
735
1211
  * The ID of the wallet involved in the action.
736
1212
  */
737
1213
  wallet_id: string;
738
- }
739
1214
 
740
- /**
741
- * Payload for the wallet_action.swap.succeeded webhook event.
742
- */
743
- export interface WalletActionSwapSucceededWebhookPayload {
744
1215
  /**
745
- * Type of wallet action
1216
+ * Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
1217
+ * the token is known in the asset registry.
746
1218
  */
747
- action_type: WalletActionsAPI.WalletActionType;
1219
+ amount?: string;
748
1220
 
749
1221
  /**
750
- * Chain identifier.
1222
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1223
+ * the asset registry.
751
1224
  */
752
- caip2: string;
1225
+ asset?: string;
753
1226
 
754
1227
  /**
755
- * Amount of input token in base units. Populated after on-chain confirmation.
1228
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1229
+ * present when the token is known in the asset registry.
756
1230
  */
757
- input_amount: string | null;
1231
+ decimals?: number;
1232
+ }
758
1233
 
1234
+ /**
1235
+ * Payload for the wallet_action.earn_deposit.failed webhook event.
1236
+ */
1237
+ export interface WalletActionEarnDepositFailedWebhookPayload {
759
1238
  /**
760
- * Token address being sold.
1239
+ * Type of wallet action
761
1240
  */
762
- input_token: string;
1241
+ action_type: WalletActionsAPI.WalletActionType;
763
1242
 
764
1243
  /**
765
- * Amount of output token received, in base units. Populated after on-chain
766
- * confirmation.
1244
+ * Underlying asset token address.
767
1245
  */
768
- output_amount: string | null;
1246
+ asset_address: string;
769
1247
 
770
1248
  /**
771
- * Token address being bought.
1249
+ * CAIP-2 chain identifier.
772
1250
  */
773
- output_token: string;
1251
+ caip2: string;
774
1252
 
775
1253
  /**
776
- * Status of a wallet action.
1254
+ * A description of why a wallet action (or a step within a wallet action) failed.
777
1255
  */
778
- status: WalletActionsAPI.WalletActionStatus;
1256
+ failure_reason: WalletActionsAPI.FailureReason;
779
1257
 
780
1258
  /**
781
- * The steps of the wallet action, including transaction hashes.
1259
+ * Base-unit amount of asset deposited (e.g. "1500000").
782
1260
  */
783
- steps: Array<WalletActionsAPI.WalletActionStep>;
1261
+ raw_amount: string;
784
1262
 
785
1263
  /**
786
- * The type of webhook event.
1264
+ * The status of the wallet action.
787
1265
  */
788
- type: 'wallet_action.swap.succeeded';
1266
+ status: 'failed';
1267
+
1268
+ /**
1269
+ * The steps of the wallet action. Completed steps will have transaction hashes;
1270
+ * the failing step will have a failure_reason.
1271
+ */
1272
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1273
+
1274
+ /**
1275
+ * The type of webhook event.
1276
+ */
1277
+ type: 'wallet_action.earn_deposit.failed';
1278
+
1279
+ /**
1280
+ * ERC-4626 vault contract address.
1281
+ */
1282
+ vault_address: string;
1283
+
1284
+ /**
1285
+ * The vault ID.
1286
+ */
1287
+ vault_id: string;
789
1288
 
790
1289
  /**
791
1290
  * The ID of the wallet action.
@@ -796,19 +1295,42 @@ export interface WalletActionSwapSucceededWebhookPayload {
796
1295
  * The ID of the wallet involved in the action.
797
1296
  */
798
1297
  wallet_id: string;
1298
+
1299
+ /**
1300
+ * Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
1301
+ * the token is known in the asset registry.
1302
+ */
1303
+ amount?: string;
1304
+
1305
+ /**
1306
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1307
+ * the asset registry.
1308
+ */
1309
+ asset?: string;
1310
+
1311
+ /**
1312
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1313
+ * present when the token is known in the asset registry.
1314
+ */
1315
+ decimals?: number;
799
1316
  }
800
1317
 
801
1318
  /**
802
- * Payload for the wallet_action.swap.rejected webhook event.
1319
+ * Payload for the wallet_action.earn_deposit.rejected webhook event.
803
1320
  */
804
- export interface WalletActionSwapRejectedWebhookPayload {
1321
+ export interface WalletActionEarnDepositRejectedWebhookPayload {
805
1322
  /**
806
1323
  * Type of wallet action
807
1324
  */
808
1325
  action_type: WalletActionsAPI.WalletActionType;
809
1326
 
810
1327
  /**
811
- * Chain identifier.
1328
+ * Underlying asset token address.
1329
+ */
1330
+ asset_address: string;
1331
+
1332
+ /**
1333
+ * CAIP-2 chain identifier.
812
1334
  */
813
1335
  caip2: string;
814
1336
 
@@ -818,34 +1340,34 @@ export interface WalletActionSwapRejectedWebhookPayload {
818
1340
  failure_reason: WalletActionsAPI.FailureReason;
819
1341
 
820
1342
  /**
821
- * Amount of input token in base units. Populated after on-chain confirmation.
1343
+ * Base-unit amount of asset deposited (e.g. "1500000").
822
1344
  */
823
- input_amount: string | null;
1345
+ raw_amount: string;
824
1346
 
825
1347
  /**
826
- * Token address being sold.
1348
+ * The status of the wallet action.
827
1349
  */
828
- input_token: string;
1350
+ status: 'rejected';
829
1351
 
830
1352
  /**
831
- * Token address being bought.
1353
+ * The steps of the wallet action at the time of rejection.
832
1354
  */
833
- output_token: string;
1355
+ steps: Array<WalletActionsAPI.WalletActionStep>;
834
1356
 
835
1357
  /**
836
- * Status of a wallet action.
1358
+ * The type of webhook event.
837
1359
  */
838
- status: WalletActionsAPI.WalletActionStatus;
1360
+ type: 'wallet_action.earn_deposit.rejected';
839
1361
 
840
1362
  /**
841
- * The steps of the wallet action at the time of rejection.
1363
+ * ERC-4626 vault contract address.
842
1364
  */
843
- steps: Array<WalletActionsAPI.WalletActionStep>;
1365
+ vault_address: string;
844
1366
 
845
1367
  /**
846
- * The type of webhook event.
1368
+ * The vault ID.
847
1369
  */
848
- type: 'wallet_action.swap.rejected';
1370
+ vault_id: string;
849
1371
 
850
1372
  /**
851
1373
  * The ID of the wallet action.
@@ -856,57 +1378,79 @@ export interface WalletActionSwapRejectedWebhookPayload {
856
1378
  * The ID of the wallet involved in the action.
857
1379
  */
858
1380
  wallet_id: string;
1381
+
1382
+ /**
1383
+ * Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
1384
+ * the token is known in the asset registry.
1385
+ */
1386
+ amount?: string;
1387
+
1388
+ /**
1389
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1390
+ * the asset registry.
1391
+ */
1392
+ asset?: string;
1393
+
1394
+ /**
1395
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1396
+ * present when the token is known in the asset registry.
1397
+ */
1398
+ decimals?: number;
859
1399
  }
860
1400
 
861
1401
  /**
862
- * Payload for the wallet_action.swap.failed webhook event.
1402
+ * Payload for the wallet_action.earn_deposit.succeeded webhook event.
863
1403
  */
864
- export interface WalletActionSwapFailedWebhookPayload {
1404
+ export interface WalletActionEarnDepositSucceededWebhookPayload {
865
1405
  /**
866
1406
  * Type of wallet action
867
1407
  */
868
1408
  action_type: WalletActionsAPI.WalletActionType;
869
1409
 
870
1410
  /**
871
- * Chain identifier.
1411
+ * Underlying asset token address.
1412
+ */
1413
+ asset_address: string;
1414
+
1415
+ /**
1416
+ * CAIP-2 chain identifier.
872
1417
  */
873
1418
  caip2: string;
874
1419
 
875
1420
  /**
876
- * A description of why a wallet action (or a step within a wallet action) failed.
1421
+ * Base-unit amount of asset deposited (e.g. "1500000").
877
1422
  */
878
- failure_reason: WalletActionsAPI.FailureReason;
1423
+ raw_amount: string;
879
1424
 
880
1425
  /**
881
- * Amount of input token in base units. Populated after on-chain confirmation.
1426
+ * Vault shares received in base units.
882
1427
  */
883
- input_amount: string | null;
1428
+ share_amount: string;
884
1429
 
885
1430
  /**
886
- * Token address being sold.
1431
+ * The status of the wallet action.
887
1432
  */
888
- input_token: string;
1433
+ status: 'succeeded';
889
1434
 
890
1435
  /**
891
- * Token address being bought.
1436
+ * The steps of the wallet action, including transaction hashes.
892
1437
  */
893
- output_token: string;
1438
+ steps: Array<WalletActionsAPI.WalletActionStep>;
894
1439
 
895
1440
  /**
896
- * Status of a wallet action.
1441
+ * The type of webhook event.
897
1442
  */
898
- status: WalletActionsAPI.WalletActionStatus;
1443
+ type: 'wallet_action.earn_deposit.succeeded';
899
1444
 
900
1445
  /**
901
- * The steps of the wallet action. Completed steps will have transaction hashes;
902
- * the failing step will have a failure_reason.
1446
+ * ERC-4626 vault contract address.
903
1447
  */
904
- steps: Array<WalletActionsAPI.WalletActionStep>;
1448
+ vault_address: string;
905
1449
 
906
1450
  /**
907
- * The type of webhook event.
1451
+ * The vault ID.
908
1452
  */
909
- type: 'wallet_action.swap.failed';
1453
+ vault_id: string;
910
1454
 
911
1455
  /**
912
1456
  * The ID of the wallet action.
@@ -917,46 +1461,54 @@ export interface WalletActionSwapFailedWebhookPayload {
917
1461
  * The ID of the wallet involved in the action.
918
1462
  */
919
1463
  wallet_id: string;
920
- }
921
1464
 
922
- /**
923
- * Payload for the wallet_action.transfer.created webhook event.
924
- */
925
- export interface WalletActionTransferCreatedWebhookPayload {
926
1465
  /**
927
- * Type of wallet action
1466
+ * Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
1467
+ * the token is known in the asset registry.
928
1468
  */
929
- action_type: WalletActionsAPI.WalletActionType;
1469
+ amount?: string;
930
1470
 
931
1471
  /**
932
- * Recipient address.
1472
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1473
+ * the asset registry.
933
1474
  */
934
- destination_address: string;
1475
+ asset?: string;
935
1476
 
936
1477
  /**
937
- * Decimal amount as provided by the user (e.g. "1.5").
1478
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1479
+ * present when the token is known in the asset registry.
938
1480
  */
939
- source_amount: string;
1481
+ decimals?: number;
1482
+ }
940
1483
 
1484
+ /**
1485
+ * Payload for the wallet_action.earn_incentive_claim.created webhook event.
1486
+ */
1487
+ export interface WalletActionEarnIncentiveClaimCreatedWebhookPayload {
941
1488
  /**
942
- * Asset identifier (e.g. "usdc", "eth").
1489
+ * Type of wallet action
943
1490
  */
944
- source_asset: string;
1491
+ action_type: WalletActionsAPI.WalletActionType;
945
1492
 
946
1493
  /**
947
- * Chain name (e.g. "base", "ethereum").
1494
+ * EVM chain name (e.g. "base", "ethereum").
948
1495
  */
949
- source_chain: string;
1496
+ chain: string;
1497
+
1498
+ /**
1499
+ * Claimed reward tokens. Populated after the preparation step fetches from Merkl.
1500
+ */
1501
+ rewards: Array<WalletActionsAPI.EarnIncetiveClaimRewardEntry> | null;
950
1502
 
951
1503
  /**
952
- * Status of a wallet action.
1504
+ * The status of the wallet action.
953
1505
  */
954
- status: WalletActionsAPI.WalletActionStatus;
1506
+ status: 'pending';
955
1507
 
956
1508
  /**
957
1509
  * The type of webhook event.
958
1510
  */
959
- type: 'wallet_action.transfer.created';
1511
+ type: 'wallet_action.earn_incentive_claim.created';
960
1512
 
961
1513
  /**
962
1514
  * The ID of the wallet action.
@@ -970,48 +1522,44 @@ export interface WalletActionTransferCreatedWebhookPayload {
970
1522
  }
971
1523
 
972
1524
  /**
973
- * Payload for the wallet_action.transfer.succeeded webhook event.
1525
+ * Payload for the wallet_action.earn_incentive_claim.failed webhook event.
974
1526
  */
975
- export interface WalletActionTransferSucceededWebhookPayload {
1527
+ export interface WalletActionEarnIncentiveClaimFailedWebhookPayload {
976
1528
  /**
977
1529
  * Type of wallet action
978
1530
  */
979
1531
  action_type: WalletActionsAPI.WalletActionType;
980
1532
 
981
1533
  /**
982
- * Recipient address.
983
- */
984
- destination_address: string;
985
-
986
- /**
987
- * Decimal amount as provided by the user (e.g. "1.5").
1534
+ * EVM chain name (e.g. "base", "ethereum").
988
1535
  */
989
- source_amount: string;
1536
+ chain: string;
990
1537
 
991
1538
  /**
992
- * Asset identifier (e.g. "usdc", "eth").
1539
+ * A description of why a wallet action (or a step within a wallet action) failed.
993
1540
  */
994
- source_asset: string;
1541
+ failure_reason: WalletActionsAPI.FailureReason;
995
1542
 
996
1543
  /**
997
- * Chain name (e.g. "base", "ethereum").
1544
+ * Claimed reward tokens. Populated after the preparation step fetches from Merkl.
998
1545
  */
999
- source_chain: string;
1546
+ rewards: Array<WalletActionsAPI.EarnIncetiveClaimRewardEntry> | null;
1000
1547
 
1001
1548
  /**
1002
- * Status of a wallet action.
1549
+ * The status of the wallet action.
1003
1550
  */
1004
- status: WalletActionsAPI.WalletActionStatus;
1551
+ status: 'failed';
1005
1552
 
1006
1553
  /**
1007
- * The steps of the wallet action, including transaction hashes.
1554
+ * The steps of the wallet action. Completed steps will have transaction hashes;
1555
+ * the failing step will have a failure_reason.
1008
1556
  */
1009
1557
  steps: Array<WalletActionsAPI.WalletActionStep>;
1010
1558
 
1011
1559
  /**
1012
1560
  * The type of webhook event.
1013
1561
  */
1014
- type: 'wallet_action.transfer.succeeded';
1562
+ type: 'wallet_action.earn_incentive_claim.failed';
1015
1563
 
1016
1564
  /**
1017
1565
  * The ID of the wallet action.
@@ -1025,18 +1573,18 @@ export interface WalletActionTransferSucceededWebhookPayload {
1025
1573
  }
1026
1574
 
1027
1575
  /**
1028
- * Payload for the wallet_action.transfer.rejected webhook event.
1576
+ * Payload for the wallet_action.earn_incentive_claim.rejected webhook event.
1029
1577
  */
1030
- export interface WalletActionTransferRejectedWebhookPayload {
1578
+ export interface WalletActionEarnIncentiveClaimRejectedWebhookPayload {
1031
1579
  /**
1032
1580
  * Type of wallet action
1033
1581
  */
1034
1582
  action_type: WalletActionsAPI.WalletActionType;
1035
1583
 
1036
1584
  /**
1037
- * Recipient address.
1585
+ * EVM chain name (e.g. "base", "ethereum").
1038
1586
  */
1039
- destination_address: string;
1587
+ chain: string;
1040
1588
 
1041
1589
  /**
1042
1590
  * A description of why a wallet action (or a step within a wallet action) failed.
@@ -1044,34 +1592,69 @@ export interface WalletActionTransferRejectedWebhookPayload {
1044
1592
  failure_reason: WalletActionsAPI.FailureReason;
1045
1593
 
1046
1594
  /**
1047
- * Decimal amount as provided by the user (e.g. "1.5").
1595
+ * Claimed reward tokens. Populated after the preparation step fetches from Merkl.
1048
1596
  */
1049
- source_amount: string;
1597
+ rewards: Array<WalletActionsAPI.EarnIncetiveClaimRewardEntry> | null;
1050
1598
 
1051
1599
  /**
1052
- * Asset identifier (e.g. "usdc", "eth").
1600
+ * The status of the wallet action.
1053
1601
  */
1054
- source_asset: string;
1602
+ status: 'rejected';
1055
1603
 
1056
1604
  /**
1057
- * Chain name (e.g. "base", "ethereum").
1605
+ * The steps of the wallet action at the time of rejection.
1058
1606
  */
1059
- source_chain: string;
1607
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1060
1608
 
1061
1609
  /**
1062
- * Status of a wallet action.
1610
+ * The type of webhook event.
1063
1611
  */
1064
- status: WalletActionsAPI.WalletActionStatus;
1612
+ type: 'wallet_action.earn_incentive_claim.rejected';
1065
1613
 
1066
1614
  /**
1067
- * The steps of the wallet action at the time of rejection.
1615
+ * The ID of the wallet action.
1616
+ */
1617
+ wallet_action_id: string;
1618
+
1619
+ /**
1620
+ * The ID of the wallet involved in the action.
1621
+ */
1622
+ wallet_id: string;
1623
+ }
1624
+
1625
+ /**
1626
+ * Payload for the wallet_action.earn_incentive_claim.succeeded webhook event.
1627
+ */
1628
+ export interface WalletActionEarnIncentiveClaimSucceededWebhookPayload {
1629
+ /**
1630
+ * Type of wallet action
1631
+ */
1632
+ action_type: WalletActionsAPI.WalletActionType;
1633
+
1634
+ /**
1635
+ * EVM chain name (e.g. "base", "ethereum").
1636
+ */
1637
+ chain: string;
1638
+
1639
+ /**
1640
+ * Claimed reward tokens. Populated after the preparation step fetches from Merkl.
1641
+ */
1642
+ rewards: Array<WalletActionsAPI.EarnIncetiveClaimRewardEntry> | null;
1643
+
1644
+ /**
1645
+ * The status of the wallet action.
1646
+ */
1647
+ status: 'succeeded';
1648
+
1649
+ /**
1650
+ * The steps of the wallet action, including transaction hashes.
1068
1651
  */
1069
1652
  steps: Array<WalletActionsAPI.WalletActionStep>;
1070
1653
 
1071
1654
  /**
1072
1655
  * The type of webhook event.
1073
1656
  */
1074
- type: 'wallet_action.transfer.rejected';
1657
+ type: 'wallet_action.earn_incentive_claim.succeeded';
1075
1658
 
1076
1659
  /**
1077
1660
  * The ID of the wallet action.
@@ -1085,54 +1668,48 @@ export interface WalletActionTransferRejectedWebhookPayload {
1085
1668
  }
1086
1669
 
1087
1670
  /**
1088
- * Payload for the wallet_action.transfer.failed webhook event.
1671
+ * Payload for the wallet_action.earn_withdraw.created webhook event.
1089
1672
  */
1090
- export interface WalletActionTransferFailedWebhookPayload {
1673
+ export interface WalletActionEarnWithdrawCreatedWebhookPayload {
1091
1674
  /**
1092
1675
  * Type of wallet action
1093
1676
  */
1094
1677
  action_type: WalletActionsAPI.WalletActionType;
1095
1678
 
1096
1679
  /**
1097
- * Recipient address.
1098
- */
1099
- destination_address: string;
1100
-
1101
- /**
1102
- * A description of why a wallet action (or a step within a wallet action) failed.
1680
+ * Underlying asset token address.
1103
1681
  */
1104
- failure_reason: WalletActionsAPI.FailureReason;
1682
+ asset_address: string;
1105
1683
 
1106
1684
  /**
1107
- * Decimal amount as provided by the user (e.g. "1.5").
1685
+ * CAIP-2 chain identifier.
1108
1686
  */
1109
- source_amount: string;
1687
+ caip2: string;
1110
1688
 
1111
1689
  /**
1112
- * Asset identifier (e.g. "usdc", "eth").
1690
+ * Base-unit amount of asset withdrawn (e.g. "1500000").
1113
1691
  */
1114
- source_asset: string;
1692
+ raw_amount: string;
1115
1693
 
1116
1694
  /**
1117
- * Chain name (e.g. "base", "ethereum").
1695
+ * The status of the wallet action.
1118
1696
  */
1119
- source_chain: string;
1697
+ status: 'pending';
1120
1698
 
1121
1699
  /**
1122
- * Status of a wallet action.
1700
+ * The type of webhook event.
1123
1701
  */
1124
- status: WalletActionsAPI.WalletActionStatus;
1702
+ type: 'wallet_action.earn_withdraw.created';
1125
1703
 
1126
1704
  /**
1127
- * The steps of the wallet action. Completed steps will have transaction hashes;
1128
- * the failing step will have a failure_reason.
1705
+ * ERC-4626 vault contract address.
1129
1706
  */
1130
- steps: Array<WalletActionsAPI.WalletActionStep>;
1707
+ vault_address: string;
1131
1708
 
1132
1709
  /**
1133
- * The type of webhook event.
1710
+ * The vault ID.
1134
1711
  */
1135
- type: 'wallet_action.transfer.failed';
1712
+ vault_id: string;
1136
1713
 
1137
1714
  /**
1138
1715
  * The ID of the wallet action.
@@ -1143,483 +1720,894 @@ export interface WalletActionTransferFailedWebhookPayload {
1143
1720
  * The ID of the wallet involved in the action.
1144
1721
  */
1145
1722
  wallet_id: string;
1723
+
1724
+ /**
1725
+ * Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
1726
+ * the token is known in the asset registry.
1727
+ */
1728
+ amount?: string;
1729
+
1730
+ /**
1731
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1732
+ * the asset registry.
1733
+ */
1734
+ asset?: string;
1735
+
1736
+ /**
1737
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1738
+ * present when the token is known in the asset registry.
1739
+ */
1740
+ decimals?: number;
1146
1741
  }
1147
1742
 
1148
1743
  /**
1149
- * Payload for the wallet.funds_deposited webhook event.
1744
+ * Payload for the wallet_action.earn_withdraw.failed webhook event.
1150
1745
  */
1151
- export interface FundsDepositedWebhookPayload {
1746
+ export interface WalletActionEarnWithdrawFailedWebhookPayload {
1152
1747
  /**
1153
- * The amount transferred, as a stringified bigint.
1748
+ * Type of wallet action
1154
1749
  */
1155
- amount: string;
1750
+ action_type: WalletActionsAPI.WalletActionType;
1156
1751
 
1157
1752
  /**
1158
- * The asset type being transferred.
1753
+ * Underlying asset token address.
1159
1754
  */
1160
- asset:
1161
- | FundsDepositedWebhookPayload.UnionMember0
1162
- | FundsDepositedWebhookPayload.UnionMember1
1163
- | FundsDepositedWebhookPayload.UnionMember2
1164
- | FundsDepositedWebhookPayload.UnionMember3;
1165
-
1166
- block: FundsDepositedWebhookPayload.Block;
1755
+ asset_address: string;
1167
1756
 
1168
1757
  /**
1169
- * The CAIP-2 chain identifier.
1758
+ * CAIP-2 chain identifier.
1170
1759
  */
1171
1760
  caip2: string;
1172
1761
 
1173
1762
  /**
1174
- * A unique key for this event.
1763
+ * A description of why a wallet action (or a step within a wallet action) failed.
1175
1764
  */
1176
- idempotency_key: string;
1765
+ failure_reason: WalletActionsAPI.FailureReason;
1177
1766
 
1178
1767
  /**
1179
- * The recipient address.
1768
+ * Base-unit amount of asset withdrawn (e.g. "1500000").
1180
1769
  */
1181
- recipient: string;
1770
+ raw_amount: string;
1182
1771
 
1183
1772
  /**
1184
- * The sender address.
1773
+ * The status of the wallet action.
1185
1774
  */
1186
- sender: string;
1775
+ status: 'failed';
1187
1776
 
1188
1777
  /**
1189
- * The blockchain transaction hash.
1778
+ * The steps of the wallet action. Completed steps will have transaction hashes;
1779
+ * the failing step will have a failure_reason.
1190
1780
  */
1191
- transaction_hash: string;
1781
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1192
1782
 
1193
1783
  /**
1194
1784
  * The type of webhook event.
1195
1785
  */
1196
- type: 'wallet.funds_deposited';
1786
+ type: 'wallet_action.earn_withdraw.failed';
1197
1787
 
1198
1788
  /**
1199
- * The ID of the wallet.
1789
+ * ERC-4626 vault contract address.
1200
1790
  */
1201
- wallet_id: string;
1791
+ vault_address: string;
1202
1792
 
1203
1793
  /**
1204
- * Optional Bridge metadata for custodial wallet deposits.
1794
+ * The vault ID.
1205
1795
  */
1206
- bridge_metadata?:
1207
- | FundsDepositedWebhookPayload.BridgeMetadataUnionMember0
1208
- | FundsDepositedWebhookPayload.BridgeMetadataUnionMember1
1209
- | FundsDepositedWebhookPayload.BridgeMetadataUnionMember2
1210
- | FundsDepositedWebhookPayload.BridgeMetadataUnionMember3
1211
- | FundsDepositedWebhookPayload.BridgeMetadataUnionMember4
1212
- | FundsDepositedWebhookPayload.BridgeMetadataUnionMember5;
1796
+ vault_id: string;
1213
1797
 
1214
1798
  /**
1215
- * The transaction fee paid, as a stringified bigint in the chain's native token.
1799
+ * The ID of the wallet action.
1216
1800
  */
1217
- transaction_fee?: string;
1218
- }
1801
+ wallet_action_id: string;
1219
1802
 
1220
- export namespace FundsDepositedWebhookPayload {
1221
- export interface UnionMember0 {
1222
- address: null;
1803
+ /**
1804
+ * The ID of the wallet involved in the action.
1805
+ */
1806
+ wallet_id: string;
1223
1807
 
1224
- type: 'native-token';
1225
- }
1808
+ /**
1809
+ * Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
1810
+ * the token is known in the asset registry.
1811
+ */
1812
+ amount?: string;
1226
1813
 
1227
- export interface UnionMember1 {
1228
- address: string;
1814
+ /**
1815
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1816
+ * the asset registry.
1817
+ */
1818
+ asset?: string;
1229
1819
 
1230
- type: 'erc20';
1231
- }
1820
+ /**
1821
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1822
+ * present when the token is known in the asset registry.
1823
+ */
1824
+ decimals?: number;
1825
+ }
1232
1826
 
1233
- export interface UnionMember2 {
1234
- mint: string;
1827
+ /**
1828
+ * Payload for the wallet_action.earn_withdraw.rejected webhook event.
1829
+ */
1830
+ export interface WalletActionEarnWithdrawRejectedWebhookPayload {
1831
+ /**
1832
+ * Type of wallet action
1833
+ */
1834
+ action_type: WalletActionsAPI.WalletActionType;
1235
1835
 
1236
- type: 'spl';
1237
- }
1836
+ /**
1837
+ * Underlying asset token address.
1838
+ */
1839
+ asset_address: string;
1238
1840
 
1239
- export interface UnionMember3 {
1240
- address: string;
1841
+ /**
1842
+ * CAIP-2 chain identifier.
1843
+ */
1844
+ caip2: string;
1241
1845
 
1242
- type: 'sac';
1243
- }
1846
+ /**
1847
+ * A description of why a wallet action (or a step within a wallet action) failed.
1848
+ */
1849
+ failure_reason: WalletActionsAPI.FailureReason;
1244
1850
 
1245
- export interface Block {
1246
- /**
1247
- * The block number.
1248
- */
1249
- number: number;
1851
+ /**
1852
+ * Base-unit amount of asset withdrawn (e.g. "1500000").
1853
+ */
1854
+ raw_amount: string;
1250
1855
 
1251
- /**
1252
- * The block timestamp.
1253
- */
1254
- timestamp: number;
1255
- }
1856
+ /**
1857
+ * The status of the wallet action.
1858
+ */
1859
+ status: 'rejected';
1256
1860
 
1257
- export interface BridgeMetadataUnionMember0 {
1258
- drain_id: string;
1861
+ /**
1862
+ * The steps of the wallet action at the time of rejection.
1863
+ */
1864
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1259
1865
 
1260
- /**
1261
- * The crypto address of the liquidation address that received the deposit.
1262
- */
1263
- liquidation_address: string;
1866
+ /**
1867
+ * The type of webhook event.
1868
+ */
1869
+ type: 'wallet_action.earn_withdraw.rejected';
1264
1870
 
1265
- liquidation_address_id: string;
1871
+ /**
1872
+ * ERC-4626 vault contract address.
1873
+ */
1874
+ vault_address: string;
1266
1875
 
1267
- method: 'liquidation_address';
1876
+ /**
1877
+ * The vault ID.
1878
+ */
1879
+ vault_id: string;
1268
1880
 
1269
- /**
1270
- * The address that sent the deposit.
1271
- */
1272
- source_wallet_address: string;
1881
+ /**
1882
+ * The ID of the wallet action.
1883
+ */
1884
+ wallet_action_id: string;
1273
1885
 
1274
- type: 'crypto_deposit';
1275
- }
1886
+ /**
1887
+ * The ID of the wallet involved in the action.
1888
+ */
1889
+ wallet_id: string;
1276
1890
 
1277
- export interface BridgeMetadataUnionMember1 {
1278
- drain_id: string;
1891
+ /**
1892
+ * Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
1893
+ * the token is known in the asset registry.
1894
+ */
1895
+ amount?: string;
1279
1896
 
1280
- liquidation_address_id: string;
1897
+ /**
1898
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1899
+ * the asset registry.
1900
+ */
1901
+ asset?: string;
1281
1902
 
1282
- method: 'liquidation_address';
1903
+ /**
1904
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1905
+ * present when the token is known in the asset registry.
1906
+ */
1907
+ decimals?: number;
1908
+ }
1283
1909
 
1284
- /**
1285
- * The original deposit transaction hash that triggered the failed drain.
1286
- */
1287
- original_transaction_hash: string;
1910
+ /**
1911
+ * Payload for the wallet_action.earn_withdraw.succeeded webhook event.
1912
+ */
1913
+ export interface WalletActionEarnWithdrawSucceededWebhookPayload {
1914
+ /**
1915
+ * Type of wallet action
1916
+ */
1917
+ action_type: WalletActionsAPI.WalletActionType;
1288
1918
 
1289
- type: 'refund';
1290
- }
1919
+ /**
1920
+ * Underlying asset token address.
1921
+ */
1922
+ asset_address: string;
1291
1923
 
1292
- export interface BridgeMetadataUnionMember2 {
1293
- activity_id: string;
1924
+ /**
1925
+ * CAIP-2 chain identifier.
1926
+ */
1927
+ caip2: string;
1294
1928
 
1295
- method: 'virtual_account';
1929
+ /**
1930
+ * Base-unit amount of asset withdrawn (e.g. "1500000").
1931
+ */
1932
+ raw_amount: string;
1296
1933
 
1297
- type: 'fiat_deposit';
1934
+ /**
1935
+ * Vault shares burned in base units.
1936
+ */
1937
+ share_amount: string;
1298
1938
 
1299
- virtual_account_id: string;
1300
- }
1939
+ /**
1940
+ * The status of the wallet action.
1941
+ */
1942
+ status: 'succeeded';
1301
1943
 
1302
- export interface BridgeMetadataUnionMember3 {
1303
- method: 'transfer';
1944
+ /**
1945
+ * The steps of the wallet action, including transaction hashes.
1946
+ */
1947
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1304
1948
 
1305
- /**
1306
- * The wallet address that sent the transfer.
1307
- */
1308
- source_wallet_address: string;
1949
+ /**
1950
+ * The type of webhook event.
1951
+ */
1952
+ type: 'wallet_action.earn_withdraw.succeeded';
1309
1953
 
1310
- transfer_id: string;
1954
+ /**
1955
+ * ERC-4626 vault contract address.
1956
+ */
1957
+ vault_address: string;
1311
1958
 
1312
- type: 'crypto_deposit';
1313
- }
1959
+ /**
1960
+ * The vault ID.
1961
+ */
1962
+ vault_id: string;
1314
1963
 
1315
- export interface BridgeMetadataUnionMember4 {
1316
- method: 'transfer';
1964
+ /**
1965
+ * The ID of the wallet action.
1966
+ */
1967
+ wallet_action_id: string;
1317
1968
 
1318
- transfer_id: string;
1969
+ /**
1970
+ * The ID of the wallet involved in the action.
1971
+ */
1972
+ wallet_id: string;
1319
1973
 
1320
- type: 'fiat_deposit';
1321
- }
1974
+ /**
1975
+ * Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
1976
+ * the token is known in the asset registry.
1977
+ */
1978
+ amount?: string;
1322
1979
 
1323
- export interface BridgeMetadataUnionMember5 {
1324
- method: 'transfer';
1980
+ /**
1981
+ * Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
1982
+ * the asset registry.
1983
+ */
1984
+ asset?: string;
1985
+
1986
+ /**
1987
+ * Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
1988
+ * present when the token is known in the asset registry.
1989
+ */
1990
+ decimals?: number;
1991
+ }
1992
+
1993
+ /**
1994
+ * Payload for the wallet_action.swap.created webhook event.
1995
+ */
1996
+ export interface WalletActionSwapCreatedWebhookPayload {
1997
+ /**
1998
+ * Type of wallet action
1999
+ */
2000
+ action_type: WalletActionsAPI.WalletActionType;
2001
+
2002
+ /**
2003
+ * Chain identifier.
2004
+ */
2005
+ caip2: string;
2006
+
2007
+ /**
2008
+ * Amount of input token in base units. Populated after on-chain confirmation.
2009
+ */
2010
+ input_amount: string | null;
2011
+
2012
+ /**
2013
+ * Token address being sold.
2014
+ */
2015
+ input_token: string;
2016
+
2017
+ /**
2018
+ * Token address being bought.
2019
+ */
2020
+ output_token: string;
2021
+
2022
+ /**
2023
+ * The status of the wallet action.
2024
+ */
2025
+ status: 'pending';
2026
+
2027
+ /**
2028
+ * The type of webhook event.
2029
+ */
2030
+ type: 'wallet_action.swap.created';
2031
+
2032
+ /**
2033
+ * The ID of the wallet action.
2034
+ */
2035
+ wallet_action_id: string;
2036
+
2037
+ /**
2038
+ * The ID of the wallet involved in the action.
2039
+ */
2040
+ wallet_id: string;
2041
+ }
2042
+
2043
+ /**
2044
+ * Payload for the wallet_action.swap.failed webhook event.
2045
+ */
2046
+ export interface WalletActionSwapFailedWebhookPayload {
2047
+ /**
2048
+ * Type of wallet action
2049
+ */
2050
+ action_type: WalletActionsAPI.WalletActionType;
2051
+
2052
+ /**
2053
+ * Chain identifier.
2054
+ */
2055
+ caip2: string;
2056
+
2057
+ /**
2058
+ * A description of why a wallet action (or a step within a wallet action) failed.
2059
+ */
2060
+ failure_reason: WalletActionsAPI.FailureReason;
2061
+
2062
+ /**
2063
+ * Amount of input token in base units. Populated after on-chain confirmation.
2064
+ */
2065
+ input_amount: string | null;
2066
+
2067
+ /**
2068
+ * Token address being sold.
2069
+ */
2070
+ input_token: string;
2071
+
2072
+ /**
2073
+ * Token address being bought.
2074
+ */
2075
+ output_token: string;
2076
+
2077
+ /**
2078
+ * The status of the wallet action.
2079
+ */
2080
+ status: 'failed';
2081
+
2082
+ /**
2083
+ * The steps of the wallet action. Completed steps will have transaction hashes;
2084
+ * the failing step will have a failure_reason.
2085
+ */
2086
+ steps: Array<WalletActionsAPI.WalletActionStep>;
2087
+
2088
+ /**
2089
+ * The type of webhook event.
2090
+ */
2091
+ type: 'wallet_action.swap.failed';
2092
+
2093
+ /**
2094
+ * The ID of the wallet action.
2095
+ */
2096
+ wallet_action_id: string;
2097
+
2098
+ /**
2099
+ * The ID of the wallet involved in the action.
2100
+ */
2101
+ wallet_id: string;
2102
+ }
2103
+
2104
+ /**
2105
+ * Payload for the wallet_action.swap.rejected webhook event.
2106
+ */
2107
+ export interface WalletActionSwapRejectedWebhookPayload {
2108
+ /**
2109
+ * Type of wallet action
2110
+ */
2111
+ action_type: WalletActionsAPI.WalletActionType;
2112
+
2113
+ /**
2114
+ * Chain identifier.
2115
+ */
2116
+ caip2: string;
2117
+
2118
+ /**
2119
+ * A description of why a wallet action (or a step within a wallet action) failed.
2120
+ */
2121
+ failure_reason: WalletActionsAPI.FailureReason;
2122
+
2123
+ /**
2124
+ * Amount of input token in base units. Populated after on-chain confirmation.
2125
+ */
2126
+ input_amount: string | null;
2127
+
2128
+ /**
2129
+ * Token address being sold.
2130
+ */
2131
+ input_token: string;
2132
+
2133
+ /**
2134
+ * Token address being bought.
2135
+ */
2136
+ output_token: string;
2137
+
2138
+ /**
2139
+ * The status of the wallet action.
2140
+ */
2141
+ status: 'rejected';
2142
+
2143
+ /**
2144
+ * The steps of the wallet action at the time of rejection.
2145
+ */
2146
+ steps: Array<WalletActionsAPI.WalletActionStep>;
2147
+
2148
+ /**
2149
+ * The type of webhook event.
2150
+ */
2151
+ type: 'wallet_action.swap.rejected';
2152
+
2153
+ /**
2154
+ * The ID of the wallet action.
2155
+ */
2156
+ wallet_action_id: string;
2157
+
2158
+ /**
2159
+ * The ID of the wallet involved in the action.
2160
+ */
2161
+ wallet_id: string;
2162
+ }
2163
+
2164
+ /**
2165
+ * Payload for the wallet_action.swap.succeeded webhook event.
2166
+ */
2167
+ export interface WalletActionSwapSucceededWebhookPayload {
2168
+ /**
2169
+ * Type of wallet action
2170
+ */
2171
+ action_type: WalletActionsAPI.WalletActionType;
2172
+
2173
+ /**
2174
+ * Chain identifier.
2175
+ */
2176
+ caip2: string;
2177
+
2178
+ /**
2179
+ * Amount of input token in base units. Populated after on-chain confirmation.
2180
+ */
2181
+ input_amount: string | null;
2182
+
2183
+ /**
2184
+ * Token address being sold.
2185
+ */
2186
+ input_token: string;
2187
+
2188
+ /**
2189
+ * Amount of output token received, in base units. Populated after on-chain
2190
+ * confirmation.
2191
+ */
2192
+ output_amount: string | null;
2193
+
2194
+ /**
2195
+ * Token address being bought.
2196
+ */
2197
+ output_token: string;
2198
+
2199
+ /**
2200
+ * The status of the wallet action.
2201
+ */
2202
+ status: 'succeeded';
2203
+
2204
+ /**
2205
+ * The steps of the wallet action, including transaction hashes.
2206
+ */
2207
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1325
2208
 
1326
- transfer_id: string;
2209
+ /**
2210
+ * The type of webhook event.
2211
+ */
2212
+ type: 'wallet_action.swap.succeeded';
1327
2213
 
1328
- type: 'refund';
2214
+ /**
2215
+ * The ID of the wallet action.
2216
+ */
2217
+ wallet_action_id: string;
1329
2218
 
1330
- /**
1331
- * The original transfer transaction hash (if available).
1332
- */
1333
- original_transaction_hash?: string;
1334
- }
2219
+ /**
2220
+ * The ID of the wallet involved in the action.
2221
+ */
2222
+ wallet_id: string;
1335
2223
  }
1336
2224
 
1337
2225
  /**
1338
- * Payload for the wallet.funds_withdrawn webhook event.
2226
+ * Payload for the wallet_action.transfer.created webhook event.
1339
2227
  */
1340
- export interface FundsWithdrawnWebhookPayload {
2228
+ export interface WalletActionTransferCreatedWebhookPayload {
1341
2229
  /**
1342
- * The amount transferred, as a stringified bigint.
2230
+ * Type of wallet action
1343
2231
  */
1344
- amount: string;
2232
+ action_type: WalletActionsAPI.WalletActionType;
1345
2233
 
1346
2234
  /**
1347
- * The asset type being transferred.
2235
+ * Recipient address.
1348
2236
  */
1349
- asset:
1350
- | FundsWithdrawnWebhookPayload.UnionMember0
1351
- | FundsWithdrawnWebhookPayload.UnionMember1
1352
- | FundsWithdrawnWebhookPayload.UnionMember2
1353
- | FundsWithdrawnWebhookPayload.UnionMember3;
2237
+ destination_address: string;
1354
2238
 
1355
- block: FundsWithdrawnWebhookPayload.Block;
2239
+ /**
2240
+ * Chain name (e.g. "base", "ethereum").
2241
+ */
2242
+ source_chain: string;
1356
2243
 
1357
2244
  /**
1358
- * The CAIP-2 chain identifier.
2245
+ * The status of the wallet action.
1359
2246
  */
1360
- caip2: string;
2247
+ status: 'pending';
1361
2248
 
1362
2249
  /**
1363
- * A unique key for this event.
2250
+ * The type of webhook event.
1364
2251
  */
1365
- idempotency_key: string;
2252
+ type: 'wallet_action.transfer.created';
1366
2253
 
1367
2254
  /**
1368
- * The recipient address.
2255
+ * The ID of the wallet action.
1369
2256
  */
1370
- recipient: string;
2257
+ wallet_action_id: string;
1371
2258
 
1372
2259
  /**
1373
- * The sender address.
2260
+ * The ID of the wallet involved in the action.
1374
2261
  */
1375
- sender: string;
2262
+ wallet_id: string;
1376
2263
 
1377
2264
  /**
1378
- * The blockchain transaction hash.
2265
+ * Decimal amount sent on the source chain (e.g. "1.5"). Omitted for exact_output
2266
+ * cross-chain transfers until the source amount is determined.
1379
2267
  */
1380
- transaction_hash: string;
2268
+ source_amount?: string;
1381
2269
 
1382
2270
  /**
1383
- * The type of webhook event.
2271
+ * Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
2272
+ * with a named asset; omitted for custom-token transfers.
1384
2273
  */
1385
- type: 'wallet.funds_withdrawn';
2274
+ source_asset?: string;
1386
2275
 
1387
2276
  /**
1388
- * The ID of the wallet.
2277
+ * Token contract address (EVM) or mint address (Solana). Present when the transfer
2278
+ * was initiated with `asset_address`.
1389
2279
  */
1390
- wallet_id: string;
2280
+ source_asset_address?: string;
1391
2281
 
1392
2282
  /**
1393
- * The transaction fee paid, as a stringified bigint in the chain's native token.
2283
+ * Number of decimals for the transferred token. Present when the transfer was
2284
+ * initiated with `asset_address` and the decimals were resolved on-chain.
1394
2285
  */
1395
- transaction_fee?: string;
2286
+ source_asset_decimals?: number;
1396
2287
  }
1397
2288
 
1398
- export namespace FundsWithdrawnWebhookPayload {
1399
- export interface UnionMember0 {
1400
- address: null;
1401
-
1402
- type: 'native-token';
1403
- }
1404
-
1405
- export interface UnionMember1 {
1406
- address: string;
2289
+ /**
2290
+ * Payload for the wallet_action.transfer.failed webhook event.
2291
+ */
2292
+ export interface WalletActionTransferFailedWebhookPayload {
2293
+ /**
2294
+ * Type of wallet action
2295
+ */
2296
+ action_type: WalletActionsAPI.WalletActionType;
1407
2297
 
1408
- type: 'erc20';
1409
- }
2298
+ /**
2299
+ * Recipient address.
2300
+ */
2301
+ destination_address: string;
1410
2302
 
1411
- export interface UnionMember2 {
1412
- mint: string;
2303
+ /**
2304
+ * A description of why a wallet action (or a step within a wallet action) failed.
2305
+ */
2306
+ failure_reason: WalletActionsAPI.FailureReason;
1413
2307
 
1414
- type: 'spl';
1415
- }
2308
+ /**
2309
+ * Chain name (e.g. "base", "ethereum").
2310
+ */
2311
+ source_chain: string;
1416
2312
 
1417
- export interface UnionMember3 {
1418
- address: string;
2313
+ /**
2314
+ * The status of the wallet action.
2315
+ */
2316
+ status: 'failed';
1419
2317
 
1420
- type: 'sac';
1421
- }
2318
+ /**
2319
+ * The steps of the wallet action. Completed steps will have transaction hashes;
2320
+ * the failing step will have a failure_reason.
2321
+ */
2322
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1422
2323
 
1423
- export interface Block {
1424
- /**
1425
- * The block number.
1426
- */
1427
- number: number;
2324
+ /**
2325
+ * The type of webhook event.
2326
+ */
2327
+ type: 'wallet_action.transfer.failed';
1428
2328
 
1429
- /**
1430
- * The block timestamp.
1431
- */
1432
- timestamp: number;
1433
- }
1434
- }
2329
+ /**
2330
+ * The ID of the wallet action.
2331
+ */
2332
+ wallet_action_id: string;
1435
2333
 
1436
- /**
1437
- * Payload for the wallet.private_key_export webhook event.
1438
- */
1439
- export interface PrivateKeyExportWebhookPayload {
1440
2334
  /**
1441
- * The type of webhook event.
2335
+ * The ID of the wallet involved in the action.
1442
2336
  */
1443
- type: 'wallet.private_key_export';
2337
+ wallet_id: string;
1444
2338
 
1445
2339
  /**
1446
- * The ID of the user who exported the key.
2340
+ * Decimal amount sent on the source chain (e.g. "1.5"). Omitted for exact_output
2341
+ * cross-chain transfers until the source amount is determined.
1447
2342
  */
1448
- user_id: string;
2343
+ source_amount?: string;
1449
2344
 
1450
2345
  /**
1451
- * The address of the wallet.
2346
+ * Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
2347
+ * with a named asset; omitted for custom-token transfers.
1452
2348
  */
1453
- wallet_address: string;
2349
+ source_asset?: string;
1454
2350
 
1455
2351
  /**
1456
- * The ID of the wallet.
2352
+ * Token contract address (EVM) or mint address (Solana). Present when the transfer
2353
+ * was initiated with `asset_address`.
1457
2354
  */
1458
- wallet_id: string;
2355
+ source_asset_address?: string;
1459
2356
 
1460
- export_source?: 'display' | 'client';
2357
+ /**
2358
+ * Number of decimals for the transferred token. Present when the transfer was
2359
+ * initiated with `asset_address` and the decimals were resolved on-chain.
2360
+ */
2361
+ source_asset_decimals?: number;
1461
2362
  }
1462
2363
 
1463
2364
  /**
1464
- * Payload for the wallet.seed_phrase_export webhook event.
2365
+ * Payload for the wallet_action.transfer.rejected webhook event.
1465
2366
  */
1466
- export interface SeedPhraseExportWebhookPayload {
2367
+ export interface WalletActionTransferRejectedWebhookPayload {
1467
2368
  /**
1468
- * The type of webhook event.
2369
+ * Type of wallet action
1469
2370
  */
1470
- type: 'wallet.seed_phrase_export';
2371
+ action_type: WalletActionsAPI.WalletActionType;
1471
2372
 
1472
2373
  /**
1473
- * The ID of the user who exported the seed phrase.
2374
+ * Recipient address.
1474
2375
  */
1475
- user_id: string;
2376
+ destination_address: string;
1476
2377
 
1477
2378
  /**
1478
- * The address of the wallet.
2379
+ * A description of why a wallet action (or a step within a wallet action) failed.
1479
2380
  */
1480
- wallet_address: string;
2381
+ failure_reason: WalletActionsAPI.FailureReason;
1481
2382
 
1482
2383
  /**
1483
- * The ID of the wallet.
2384
+ * Chain name (e.g. "base", "ethereum").
1484
2385
  */
1485
- wallet_id: string;
1486
-
1487
- export_source?: 'display' | 'client';
1488
- }
2386
+ source_chain: string;
1489
2387
 
1490
- /**
1491
- * Payload for the wallet.recovery_setup webhook event.
1492
- */
1493
- export interface WalletRecoverySetupWebhookPayload {
1494
2388
  /**
1495
- * The recovery method that was set up.
2389
+ * The status of the wallet action.
1496
2390
  */
1497
- method:
1498
- | 'user_passcode_derived_recovery_key'
1499
- | 'privy_passcode_derived_recovery_key'
1500
- | 'privy_generated_recovery_key'
1501
- | 'google_drive_recovery_secret'
1502
- | 'icloud_recovery_secret'
1503
- | 'recovery_encryption_key';
2391
+ status: 'rejected';
1504
2392
 
1505
2393
  /**
1506
- * The type of webhook event.
2394
+ * The steps of the wallet action at the time of rejection.
1507
2395
  */
1508
- type: 'wallet.recovery_setup';
2396
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1509
2397
 
1510
2398
  /**
1511
- * The ID of the user.
2399
+ * The type of webhook event.
1512
2400
  */
1513
- user_id: string;
2401
+ type: 'wallet_action.transfer.rejected';
1514
2402
 
1515
2403
  /**
1516
- * The address of the wallet.
2404
+ * The ID of the wallet action.
1517
2405
  */
1518
- wallet_address: string;
2406
+ wallet_action_id: string;
1519
2407
 
1520
2408
  /**
1521
- * The ID of the wallet.
2409
+ * The ID of the wallet involved in the action.
1522
2410
  */
1523
2411
  wallet_id: string;
1524
- }
1525
2412
 
1526
- /**
1527
- * Payload for the wallet.recovered webhook event.
1528
- */
1529
- export interface WalletRecoveredWebhookPayload {
1530
2413
  /**
1531
- * The type of webhook event.
2414
+ * Decimal amount sent on the source chain (e.g. "1.5"). Omitted for exact_output
2415
+ * cross-chain transfers until the source amount is determined.
1532
2416
  */
1533
- type: 'wallet.recovered';
2417
+ source_amount?: string;
1534
2418
 
1535
2419
  /**
1536
- * The ID of the user.
2420
+ * Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
2421
+ * with a named asset; omitted for custom-token transfers.
1537
2422
  */
1538
- user_id: string;
2423
+ source_asset?: string;
1539
2424
 
1540
2425
  /**
1541
- * The address of the wallet.
2426
+ * Token contract address (EVM) or mint address (Solana). Present when the transfer
2427
+ * was initiated with `asset_address`.
1542
2428
  */
1543
- wallet_address: string;
2429
+ source_asset_address?: string;
1544
2430
 
1545
2431
  /**
1546
- * The ID of the wallet.
2432
+ * Number of decimals for the transferred token. Present when the transfer was
2433
+ * initiated with `asset_address` and the decimals were resolved on-chain.
1547
2434
  */
1548
- wallet_id: string;
2435
+ source_asset_decimals?: number;
1549
2436
  }
1550
2437
 
1551
2438
  /**
1552
- * Payload for the yield.deposit.confirmed webhook event.
2439
+ * Payload for the wallet_action.transfer.succeeded webhook event.
1553
2440
  */
1554
- export interface YieldDepositConfirmedWebhookPayload {
1555
- assets: string;
2441
+ export interface WalletActionTransferSucceededWebhookPayload {
2442
+ /**
2443
+ * Type of wallet action
2444
+ */
2445
+ action_type: WalletActionsAPI.WalletActionType;
1556
2446
 
1557
- caip2: string;
2447
+ /**
2448
+ * Recipient address.
2449
+ */
2450
+ destination_address: string;
1558
2451
 
1559
- owner: string;
2452
+ /**
2453
+ * Chain name (e.g. "base", "ethereum").
2454
+ */
2455
+ source_chain: string;
1560
2456
 
1561
- sender: string;
2457
+ /**
2458
+ * The status of the wallet action.
2459
+ */
2460
+ status: 'succeeded';
1562
2461
 
1563
- shares: string;
2462
+ /**
2463
+ * The steps of the wallet action, including transaction hashes.
2464
+ */
2465
+ steps: Array<WalletActionsAPI.WalletActionStep>;
1564
2466
 
1565
2467
  /**
1566
2468
  * The type of webhook event.
1567
2469
  */
1568
- type: 'yield.deposit.confirmed';
2470
+ type: 'wallet_action.transfer.succeeded';
1569
2471
 
1570
- vault_address: string;
2472
+ /**
2473
+ * The ID of the wallet action.
2474
+ */
2475
+ wallet_action_id: string;
2476
+
2477
+ /**
2478
+ * The ID of the wallet involved in the action.
2479
+ */
2480
+ wallet_id: string;
2481
+
2482
+ /**
2483
+ * Decimal amount sent on the source chain (e.g. "1.5"). Omitted for exact_output
2484
+ * cross-chain transfers until the source amount is determined.
2485
+ */
2486
+ source_amount?: string;
2487
+
2488
+ /**
2489
+ * Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
2490
+ * with a named asset; omitted for custom-token transfers.
2491
+ */
2492
+ source_asset?: string;
2493
+
2494
+ /**
2495
+ * Token contract address (EVM) or mint address (Solana). Present when the transfer
2496
+ * was initiated with `asset_address`.
2497
+ */
2498
+ source_asset_address?: string;
2499
+
2500
+ /**
2501
+ * Number of decimals for the transferred token. Present when the transfer was
2502
+ * initiated with `asset_address` and the decimals were resolved on-chain.
2503
+ */
2504
+ source_asset_decimals?: number;
1571
2505
  }
1572
2506
 
1573
2507
  /**
1574
- * Payload for the yield.withdraw.confirmed webhook event.
2508
+ * An asset involved in a wallet transfer.
1575
2509
  */
1576
- export interface YieldWithdrawConfirmedWebhookPayload {
1577
- assets: string;
2510
+ export type WalletFundsAsset =
2511
+ | WalletFundsNativeTokenAsset
2512
+ | WalletFundsErc20Asset
2513
+ | WalletFundsSplAsset
2514
+ | WalletFundsSacAsset;
1578
2515
 
1579
- caip2: string;
2516
+ /**
2517
+ * An ERC-20 token asset.
2518
+ */
2519
+ export interface WalletFundsErc20Asset {
2520
+ address: string;
1580
2521
 
1581
- owner: string;
2522
+ type: 'erc20';
2523
+ }
1582
2524
 
1583
- receiver: string;
2525
+ /**
2526
+ * A native token asset (e.g. ETH, SOL).
2527
+ */
2528
+ export interface WalletFundsNativeTokenAsset {
2529
+ address: null;
1584
2530
 
1585
- sender: string;
2531
+ type: 'native-token';
2532
+ }
2533
+
2534
+ /**
2535
+ * A Stellar Asset Contract (SAC) asset.
2536
+ */
2537
+ export interface WalletFundsSacAsset {
2538
+ address: string;
2539
+
2540
+ type: 'sac';
2541
+ }
2542
+
2543
+ /**
2544
+ * A Solana SPL token asset.
2545
+ */
2546
+ export interface WalletFundsSplAsset {
2547
+ mint: string;
1586
2548
 
1587
- shares: string;
2549
+ type: 'spl';
2550
+ }
1588
2551
 
2552
+ /**
2553
+ * Payload for the wallet.recovered webhook event.
2554
+ */
2555
+ export interface WalletRecoveredWebhookPayload {
1589
2556
  /**
1590
2557
  * The type of webhook event.
1591
2558
  */
1592
- type: 'yield.withdraw.confirmed';
2559
+ type: 'wallet.recovered';
1593
2560
 
1594
- vault_address: string;
2561
+ /**
2562
+ * The ID of the user.
2563
+ */
2564
+ user_id: string;
2565
+
2566
+ /**
2567
+ * The address of the wallet.
2568
+ */
2569
+ wallet_address: string;
2570
+
2571
+ /**
2572
+ * The ID of the wallet.
2573
+ */
2574
+ wallet_id: string;
1595
2575
  }
1596
2576
 
1597
2577
  /**
1598
- * Payload for the yield.claim.confirmed webhook event.
2578
+ * Payload for the wallet.recovery_setup webhook event.
1599
2579
  */
1600
- export interface YieldClaimConfirmedWebhookPayload {
1601
- caip2: string;
1602
-
1603
- rewards: Array<YieldClaimConfirmedWebhookPayload.Reward>;
1604
-
1605
- transaction_id: string;
2580
+ export interface WalletRecoverySetupWebhookPayload {
2581
+ /**
2582
+ * The recovery method that was set up.
2583
+ */
2584
+ method:
2585
+ | 'user_passcode_derived_recovery_key'
2586
+ | 'privy_passcode_derived_recovery_key'
2587
+ | 'privy_generated_recovery_key'
2588
+ | 'google_drive_recovery_secret'
2589
+ | 'icloud_recovery_secret'
2590
+ | 'recovery_encryption_key';
1606
2591
 
1607
2592
  /**
1608
2593
  * The type of webhook event.
1609
2594
  */
1610
- type: 'yield.claim.confirmed';
1611
-
1612
- wallet_id: string;
1613
- }
2595
+ type: 'wallet.recovery_setup';
1614
2596
 
1615
- export namespace YieldClaimConfirmedWebhookPayload {
1616
- export interface Reward {
1617
- amount: string;
2597
+ /**
2598
+ * The ID of the user.
2599
+ */
2600
+ user_id: string;
1618
2601
 
1619
- token_address: string;
2602
+ /**
2603
+ * The address of the wallet.
2604
+ */
2605
+ wallet_address: string;
1620
2606
 
1621
- token_symbol: string;
1622
- }
2607
+ /**
2608
+ * The ID of the wallet.
2609
+ */
2610
+ wallet_id: string;
1623
2611
  }
1624
2612
 
1625
2613
  /**
@@ -1663,201 +2651,165 @@ export type WebhookPayload =
1663
2651
  | WalletActionTransferCreatedWebhookPayload
1664
2652
  | WalletActionTransferSucceededWebhookPayload
1665
2653
  | WalletActionTransferRejectedWebhookPayload
1666
- | WalletActionTransferFailedWebhookPayload;
2654
+ | WalletActionTransferFailedWebhookPayload
2655
+ | WalletActionEarnDepositCreatedWebhookPayload
2656
+ | WalletActionEarnDepositSucceededWebhookPayload
2657
+ | WalletActionEarnDepositRejectedWebhookPayload
2658
+ | WalletActionEarnDepositFailedWebhookPayload
2659
+ | WalletActionEarnWithdrawCreatedWebhookPayload
2660
+ | WalletActionEarnWithdrawSucceededWebhookPayload
2661
+ | WalletActionEarnWithdrawRejectedWebhookPayload
2662
+ | WalletActionEarnWithdrawFailedWebhookPayload
2663
+ | WalletActionEarnIncentiveClaimCreatedWebhookPayload
2664
+ | WalletActionEarnIncentiveClaimSucceededWebhookPayload
2665
+ | WalletActionEarnIncentiveClaimRejectedWebhookPayload
2666
+ | WalletActionEarnIncentiveClaimFailedWebhookPayload;
1667
2667
 
1668
2668
  /**
1669
- * Payload for the kraken_embed.quote_executed webhook event.
2669
+ * Payload for the yield.claim.confirmed webhook event.
1670
2670
  */
1671
- export interface KrakenEmbedQuoteExecutedWebhookPayload {
1672
- /**
1673
- * ISO 8601 timestamp of when the quote was executed.
1674
- */
1675
- executed_at: string;
2671
+ export interface YieldClaimConfirmedWebhookPayload {
2672
+ caip2: string;
1676
2673
 
1677
- /**
1678
- * The ID of the executed quote.
1679
- */
1680
- quote_id: string;
2674
+ rewards: Array<YieldClaimConfirmedWebhookPayload.Reward>;
2675
+
2676
+ transaction_id: string;
1681
2677
 
1682
2678
  /**
1683
2679
  * The type of webhook event.
1684
2680
  */
1685
- type: 'kraken_embed.quote.executed';
2681
+ type: 'yield.claim.confirmed';
1686
2682
 
1687
- /**
1688
- * The ID of the user.
1689
- */
1690
- user_id: string;
2683
+ wallet_id: string;
1691
2684
  }
1692
2685
 
1693
- /**
1694
- * Payload for the kraken_embed.quote.execution_failed webhook event.
1695
- */
1696
- export interface KrakenEmbedQuoteExecutionFailedWebhookPayload {
1697
- /**
1698
- * ISO 8601 timestamp of when the quote execution failed.
1699
- */
1700
- failed_at: string;
1701
-
1702
- /**
1703
- * The ID of the quote that failed to execute.
1704
- */
1705
- quote_id: string;
1706
-
1707
- /**
1708
- * A human-readable description of why the quote execution failed. Intended for
1709
- * display and logging purposes only.
1710
- */
1711
- reason: string;
2686
+ export namespace YieldClaimConfirmedWebhookPayload {
2687
+ export interface Reward {
2688
+ amount: string;
1712
2689
 
1713
- /**
1714
- * The type of webhook event.
1715
- */
1716
- type: 'kraken_embed.quote.execution_failed';
2690
+ token_address: string;
1717
2691
 
1718
- /**
1719
- * The ID of the user.
1720
- */
1721
- user_id: string;
2692
+ token_symbol: string;
2693
+ }
1722
2694
  }
1723
2695
 
1724
2696
  /**
1725
- * Payload for the kraken_embed.quote.cancelled webhook event.
2697
+ * Payload for the yield.deposit.confirmed webhook event.
1726
2698
  */
1727
- export interface KrakenEmbedQuoteCancelledWebhookPayload {
1728
- /**
1729
- * ISO 8601 timestamp of when the quote was cancelled.
1730
- */
1731
- cancelled_at: string;
2699
+ export interface YieldDepositConfirmedWebhookPayload {
2700
+ assets: string;
1732
2701
 
1733
- /**
1734
- * The ID of the cancelled quote.
1735
- */
1736
- quote_id: string;
2702
+ caip2: string;
1737
2703
 
1738
- /**
1739
- * A human-readable description of why the quote was cancelled. Intended for
1740
- * display and logging purposes only.
1741
- */
1742
- reason: string;
2704
+ owner: string;
1743
2705
 
1744
- /**
1745
- * The type of webhook event.
1746
- */
1747
- type: 'kraken_embed.quote.cancelled';
2706
+ sender: string;
1748
2707
 
1749
- /**
1750
- * The ID of the user.
1751
- */
1752
- user_id: string;
1753
- }
2708
+ shares: string;
1754
2709
 
1755
- /**
1756
- * Payload for the kraken_embed.user.verified webhook event.
1757
- */
1758
- export interface KrakenEmbedUserVerifiedWebhookPayload {
1759
2710
  /**
1760
2711
  * The type of webhook event.
1761
2712
  */
1762
- type: 'kraken_embed.user.verified';
1763
-
1764
- /**
1765
- * The ID of the user.
1766
- */
1767
- user_id: string;
2713
+ type: 'yield.deposit.confirmed';
1768
2714
 
1769
- /**
1770
- * ISO 8601 timestamp of when the user was verified.
1771
- */
1772
- verified_at: string;
2715
+ vault_address: string;
1773
2716
  }
1774
2717
 
1775
2718
  /**
1776
- * Payload for the kraken_embed.user.disabled webhook event.
2719
+ * Payload for the yield.withdraw.confirmed webhook event.
1777
2720
  */
1778
- export interface KrakenEmbedUserDisabledWebhookPayload {
1779
- /**
1780
- * ISO 8601 timestamp of when the user was disabled.
1781
- */
1782
- disabled_at: string;
2721
+ export interface YieldWithdrawConfirmedWebhookPayload {
2722
+ assets: string;
1783
2723
 
1784
- /**
1785
- * The type of webhook event.
1786
- */
1787
- type: 'kraken_embed.user.disabled';
2724
+ caip2: string;
1788
2725
 
1789
- /**
1790
- * The ID of the user.
1791
- */
1792
- user_id: string;
1793
- }
2726
+ owner: string;
1794
2727
 
1795
- /**
1796
- * Payload for the kraken_embed.user.closed webhook event.
1797
- */
1798
- export interface KrakenEmbedUserClosedWebhookPayload {
1799
- /**
1800
- * ISO 8601 timestamp of when the user was closed.
1801
- */
1802
- closed_at: string;
2728
+ receiver: string;
2729
+
2730
+ sender: string;
2731
+
2732
+ shares: string;
1803
2733
 
1804
2734
  /**
1805
2735
  * The type of webhook event.
1806
2736
  */
1807
- type: 'kraken_embed.user.closed';
2737
+ type: 'yield.withdraw.confirmed';
1808
2738
 
1809
- /**
1810
- * The ID of the user.
1811
- */
1812
- user_id: string;
2739
+ vault_address: string;
1813
2740
  }
1814
2741
 
1815
2742
  export declare namespace Webhooks {
1816
2743
  export {
1817
- type IntentCreatedWebhookPayload as IntentCreatedWebhookPayload,
2744
+ type BridgeCryptoDepositMetadata as BridgeCryptoDepositMetadata,
2745
+ type BridgeCryptoTransferMetadata as BridgeCryptoTransferMetadata,
2746
+ type BridgeFiatDepositMetadata as BridgeFiatDepositMetadata,
2747
+ type BridgeFiatTransferMetadata as BridgeFiatTransferMetadata,
2748
+ type BridgeMetadata as BridgeMetadata,
2749
+ type BridgeRefundMetadata as BridgeRefundMetadata,
2750
+ type BridgeStaticMemoDepositMetadata as BridgeStaticMemoDepositMetadata,
2751
+ type BridgeTransferRefundMetadata as BridgeTransferRefundMetadata,
2752
+ type FundsDepositedWebhookPayload as FundsDepositedWebhookPayload,
2753
+ type FundsWithdrawnWebhookPayload as FundsWithdrawnWebhookPayload,
1818
2754
  type IntentAuthorizedWebhookPayload as IntentAuthorizedWebhookPayload,
2755
+ type IntentCreatedWebhookPayload as IntentCreatedWebhookPayload,
1819
2756
  type IntentExecutedWebhookPayload as IntentExecutedWebhookPayload,
1820
2757
  type IntentFailedWebhookPayload as IntentFailedWebhookPayload,
1821
- type MfaEnabledWebhookPayload as MfaEnabledWebhookPayload,
2758
+ type KrakenEmbedQuoteCancelledWebhookPayload as KrakenEmbedQuoteCancelledWebhookPayload,
2759
+ type KrakenEmbedQuoteExecutedWebhookPayload as KrakenEmbedQuoteExecutedWebhookPayload,
2760
+ type KrakenEmbedQuoteExecutionFailedWebhookPayload as KrakenEmbedQuoteExecutionFailedWebhookPayload,
2761
+ type KrakenEmbedUserClosedWebhookPayload as KrakenEmbedUserClosedWebhookPayload,
2762
+ type KrakenEmbedUserDisabledWebhookPayload as KrakenEmbedUserDisabledWebhookPayload,
2763
+ type KrakenEmbedUserVerifiedWebhookPayload as KrakenEmbedUserVerifiedWebhookPayload,
1822
2764
  type MfaDisabledWebhookPayload as MfaDisabledWebhookPayload,
2765
+ type MfaEnabledWebhookPayload as MfaEnabledWebhookPayload,
2766
+ type PrivateKeyExportWebhookPayload as PrivateKeyExportWebhookPayload,
2767
+ type SeedPhraseExportWebhookPayload as SeedPhraseExportWebhookPayload,
1823
2768
  type TransactionBroadcastedWebhookPayload as TransactionBroadcastedWebhookPayload,
1824
2769
  type TransactionConfirmedWebhookPayload as TransactionConfirmedWebhookPayload,
1825
2770
  type TransactionExecutionRevertedWebhookPayload as TransactionExecutionRevertedWebhookPayload,
1826
- type TransactionStillPendingWebhookPayload as TransactionStillPendingWebhookPayload,
1827
2771
  type TransactionFailedWebhookPayload as TransactionFailedWebhookPayload,
1828
- type TransactionReplacedWebhookPayload as TransactionReplacedWebhookPayload,
1829
2772
  type TransactionProviderErrorWebhookPayload as TransactionProviderErrorWebhookPayload,
1830
- type UserOperationCompletedWebhookPayload as UserOperationCompletedWebhookPayload,
1831
- type UserCreatedWebhookPayload as UserCreatedWebhookPayload,
2773
+ type TransactionReplacedWebhookPayload as TransactionReplacedWebhookPayload,
2774
+ type TransactionStillPendingWebhookPayload as TransactionStillPendingWebhookPayload,
1832
2775
  type UserAuthenticatedWebhookPayload as UserAuthenticatedWebhookPayload,
2776
+ type UserCreatedWebhookPayload as UserCreatedWebhookPayload,
1833
2777
  type UserLinkedAccountWebhookPayload as UserLinkedAccountWebhookPayload,
2778
+ type UserOperationCompletedWebhookPayload as UserOperationCompletedWebhookPayload,
2779
+ type UserTransferredAccountWebhookPayload as UserTransferredAccountWebhookPayload,
1834
2780
  type UserUnlinkedAccountWebhookPayload as UserUnlinkedAccountWebhookPayload,
1835
2781
  type UserUpdatedAccountWebhookPayload as UserUpdatedAccountWebhookPayload,
1836
- type UserTransferredAccountWebhookPayload as UserTransferredAccountWebhookPayload,
1837
2782
  type UserWalletCreatedWebhookPayload as UserWalletCreatedWebhookPayload,
2783
+ type WalletActionEarnDepositCreatedWebhookPayload as WalletActionEarnDepositCreatedWebhookPayload,
2784
+ type WalletActionEarnDepositFailedWebhookPayload as WalletActionEarnDepositFailedWebhookPayload,
2785
+ type WalletActionEarnDepositRejectedWebhookPayload as WalletActionEarnDepositRejectedWebhookPayload,
2786
+ type WalletActionEarnDepositSucceededWebhookPayload as WalletActionEarnDepositSucceededWebhookPayload,
2787
+ type WalletActionEarnIncentiveClaimCreatedWebhookPayload as WalletActionEarnIncentiveClaimCreatedWebhookPayload,
2788
+ type WalletActionEarnIncentiveClaimFailedWebhookPayload as WalletActionEarnIncentiveClaimFailedWebhookPayload,
2789
+ type WalletActionEarnIncentiveClaimRejectedWebhookPayload as WalletActionEarnIncentiveClaimRejectedWebhookPayload,
2790
+ type WalletActionEarnIncentiveClaimSucceededWebhookPayload as WalletActionEarnIncentiveClaimSucceededWebhookPayload,
2791
+ type WalletActionEarnWithdrawCreatedWebhookPayload as WalletActionEarnWithdrawCreatedWebhookPayload,
2792
+ type WalletActionEarnWithdrawFailedWebhookPayload as WalletActionEarnWithdrawFailedWebhookPayload,
2793
+ type WalletActionEarnWithdrawRejectedWebhookPayload as WalletActionEarnWithdrawRejectedWebhookPayload,
2794
+ type WalletActionEarnWithdrawSucceededWebhookPayload as WalletActionEarnWithdrawSucceededWebhookPayload,
1838
2795
  type WalletActionSwapCreatedWebhookPayload as WalletActionSwapCreatedWebhookPayload,
1839
- type WalletActionSwapSucceededWebhookPayload as WalletActionSwapSucceededWebhookPayload,
1840
- type WalletActionSwapRejectedWebhookPayload as WalletActionSwapRejectedWebhookPayload,
1841
2796
  type WalletActionSwapFailedWebhookPayload as WalletActionSwapFailedWebhookPayload,
2797
+ type WalletActionSwapRejectedWebhookPayload as WalletActionSwapRejectedWebhookPayload,
2798
+ type WalletActionSwapSucceededWebhookPayload as WalletActionSwapSucceededWebhookPayload,
1842
2799
  type WalletActionTransferCreatedWebhookPayload as WalletActionTransferCreatedWebhookPayload,
1843
- type WalletActionTransferSucceededWebhookPayload as WalletActionTransferSucceededWebhookPayload,
1844
- type WalletActionTransferRejectedWebhookPayload as WalletActionTransferRejectedWebhookPayload,
1845
2800
  type WalletActionTransferFailedWebhookPayload as WalletActionTransferFailedWebhookPayload,
1846
- type FundsDepositedWebhookPayload as FundsDepositedWebhookPayload,
1847
- type FundsWithdrawnWebhookPayload as FundsWithdrawnWebhookPayload,
1848
- type PrivateKeyExportWebhookPayload as PrivateKeyExportWebhookPayload,
1849
- type SeedPhraseExportWebhookPayload as SeedPhraseExportWebhookPayload,
1850
- type WalletRecoverySetupWebhookPayload as WalletRecoverySetupWebhookPayload,
2801
+ type WalletActionTransferRejectedWebhookPayload as WalletActionTransferRejectedWebhookPayload,
2802
+ type WalletActionTransferSucceededWebhookPayload as WalletActionTransferSucceededWebhookPayload,
2803
+ type WalletFundsAsset as WalletFundsAsset,
2804
+ type WalletFundsErc20Asset as WalletFundsErc20Asset,
2805
+ type WalletFundsNativeTokenAsset as WalletFundsNativeTokenAsset,
2806
+ type WalletFundsSacAsset as WalletFundsSacAsset,
2807
+ type WalletFundsSplAsset as WalletFundsSplAsset,
1851
2808
  type WalletRecoveredWebhookPayload as WalletRecoveredWebhookPayload,
2809
+ type WalletRecoverySetupWebhookPayload as WalletRecoverySetupWebhookPayload,
2810
+ type WebhookPayload as WebhookPayload,
2811
+ type YieldClaimConfirmedWebhookPayload as YieldClaimConfirmedWebhookPayload,
1852
2812
  type YieldDepositConfirmedWebhookPayload as YieldDepositConfirmedWebhookPayload,
1853
2813
  type YieldWithdrawConfirmedWebhookPayload as YieldWithdrawConfirmedWebhookPayload,
1854
- type YieldClaimConfirmedWebhookPayload as YieldClaimConfirmedWebhookPayload,
1855
- type WebhookPayload as WebhookPayload,
1856
- type KrakenEmbedQuoteExecutedWebhookPayload as KrakenEmbedQuoteExecutedWebhookPayload,
1857
- type KrakenEmbedQuoteExecutionFailedWebhookPayload as KrakenEmbedQuoteExecutionFailedWebhookPayload,
1858
- type KrakenEmbedQuoteCancelledWebhookPayload as KrakenEmbedQuoteCancelledWebhookPayload,
1859
- type KrakenEmbedUserVerifiedWebhookPayload as KrakenEmbedUserVerifiedWebhookPayload,
1860
- type KrakenEmbedUserDisabledWebhookPayload as KrakenEmbedUserDisabledWebhookPayload,
1861
- type KrakenEmbedUserClosedWebhookPayload as KrakenEmbedUserClosedWebhookPayload,
1862
2814
  };
1863
2815
  }