@privy-io/api-types 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/client.d.mts +53 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -29
- package/client.d.ts.map +1 -1
- package/client.js +32 -7
- package/client.js.map +1 -1
- package/client.mjs +34 -9
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/accounts.d.mts +146 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +146 -4
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs.map +1 -1
- package/resources/aggregations.d.mts +18 -392
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +18 -392
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/aggregations.js.map +1 -1
- package/resources/aggregations.mjs.map +1 -1
- package/resources/apps.d.mts +197 -70
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +197 -70
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +975 -463
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +975 -463
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/cross-app.d.mts +14 -13
- package/resources/cross-app.d.mts.map +1 -1
- package/resources/cross-app.d.ts +14 -13
- package/resources/cross-app.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +165 -81
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +165 -81
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/embedded-wallets.js.map +1 -1
- package/resources/embedded-wallets.mjs.map +1 -1
- package/resources/funding.d.mts +150 -64
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +150 -64
- package/resources/funding.d.ts.map +1 -1
- package/resources/funding.js.map +1 -1
- package/resources/funding.mjs.map +1 -1
- package/resources/index.d.mts +18 -14
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +446 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +446 -31
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +108 -17
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +108 -17
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +26 -9
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +26 -9
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +62 -0
- package/resources/kraken-embed.d.mts.map +1 -0
- package/resources/kraken-embed.d.ts +62 -0
- package/resources/kraken-embed.d.ts.map +1 -0
- package/resources/kraken-embed.js +9 -0
- package/resources/kraken-embed.js.map +1 -0
- package/resources/kraken-embed.mjs +5 -0
- package/resources/kraken-embed.mjs.map +1 -0
- package/resources/policies.d.mts +342 -926
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +342 -926
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +51 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +51 -41
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +59 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +59 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/swaps.d.mts +108 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +108 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +9 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +5 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transactions.d.mts +158 -93
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +158 -93
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +3 -0
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +3 -0
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +64 -94
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +64 -94
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +187 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +187 -0
- package/resources/wallet-actions.d.ts.map +1 -0
- package/resources/wallet-actions.js +9 -0
- package/resources/wallet-actions.js.map +1 -0
- package/resources/wallet-actions.mjs +5 -0
- package/resources/wallet-actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +7 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +7 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +3 -0
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +3 -0
- package/resources/wallets/balance.mjs.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +10 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +10 -6
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +3 -0
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs +3 -0
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2399 -936
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2399 -936
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +28 -10
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +28 -10
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +780 -339
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +780 -339
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/yield.d.mts +50 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +50 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +884 -99
- package/src/resources/accounts.ts +179 -3
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +250 -85
- package/src/resources/client-auth.ts +1453 -786
- package/src/resources/cross-app.ts +19 -15
- package/src/resources/embedded-wallets.ts +219 -123
- package/src/resources/funding.ts +263 -173
- package/src/resources/index.ts +444 -61
- package/src/resources/intents.ts +575 -37
- package/src/resources/key-quorums.ts +137 -21
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +582 -1550
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +188 -91
- package/src/resources/users.ts +82 -132
- package/src/resources/wallet-actions.ts +251 -0
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +146 -16
- package/src/resources/wallets/transactions.ts +12 -4
- package/src/resources/wallets/wallets.ts +2922 -974
- package/src/resources/webhooks.ts +970 -454
- package/src/resources/yield.ts +68 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/webhooks.d.mts
CHANGED
|
@@ -1,7 +1,446 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as IntentsAPI from "./intents.mjs";
|
|
2
3
|
import * as UsersAPI from "./users.mjs";
|
|
4
|
+
import * as WalletActionsAPI from "./wallet-actions.mjs";
|
|
5
|
+
import * as WalletsAPI from "./wallets/wallets.mjs";
|
|
3
6
|
export declare class Webhooks extends APIResource {
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Payload for the intent.created webhook event.
|
|
10
|
+
*/
|
|
11
|
+
export interface IntentCreatedWebhookPayload {
|
|
12
|
+
/**
|
|
13
|
+
* Unix timestamp when the intent was created.
|
|
14
|
+
*/
|
|
15
|
+
created_at: number;
|
|
16
|
+
/**
|
|
17
|
+
* Unix timestamp when the intent expires.
|
|
18
|
+
*/
|
|
19
|
+
expires_at: number;
|
|
20
|
+
/**
|
|
21
|
+
* The unique ID of the intent.
|
|
22
|
+
*/
|
|
23
|
+
intent_id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Type of intent.
|
|
26
|
+
*/
|
|
27
|
+
intent_type: IntentsAPI.IntentType;
|
|
28
|
+
/**
|
|
29
|
+
* The current status of the intent.
|
|
30
|
+
*/
|
|
31
|
+
status: string;
|
|
32
|
+
/**
|
|
33
|
+
* The type of webhook event.
|
|
34
|
+
*/
|
|
35
|
+
type: 'intent.created';
|
|
36
|
+
/**
|
|
37
|
+
* Key quorums that can authorize this intent.
|
|
38
|
+
*/
|
|
39
|
+
authorization_details?: Array<IntentsAPI.IntentAuthorization>;
|
|
40
|
+
/**
|
|
41
|
+
* Display name of the user who created the intent.
|
|
42
|
+
*/
|
|
43
|
+
created_by_display_name?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The ID of the user who created the intent.
|
|
46
|
+
*/
|
|
47
|
+
created_by_id?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Payload for the intent.authorized webhook event.
|
|
51
|
+
*/
|
|
52
|
+
export interface IntentAuthorizedWebhookPayload {
|
|
53
|
+
/**
|
|
54
|
+
* Unix timestamp when the authorization was recorded.
|
|
55
|
+
*/
|
|
56
|
+
authorized_at: number;
|
|
57
|
+
/**
|
|
58
|
+
* Unix timestamp when the intent was created.
|
|
59
|
+
*/
|
|
60
|
+
created_at: number;
|
|
61
|
+
/**
|
|
62
|
+
* Unix timestamp when the intent expires.
|
|
63
|
+
*/
|
|
64
|
+
expires_at: number;
|
|
65
|
+
/**
|
|
66
|
+
* The unique ID of the intent.
|
|
67
|
+
*/
|
|
68
|
+
intent_id: string;
|
|
69
|
+
/**
|
|
70
|
+
* Type of intent.
|
|
71
|
+
*/
|
|
72
|
+
intent_type: IntentsAPI.IntentType;
|
|
73
|
+
/**
|
|
74
|
+
* A leaf member (user or key) of a nested key quorum in an intent authorization.
|
|
75
|
+
*/
|
|
76
|
+
member: IntentsAPI.IntentAuthorizationKeyQuorumMember;
|
|
77
|
+
/**
|
|
78
|
+
* The current status of the intent.
|
|
79
|
+
*/
|
|
80
|
+
status: string;
|
|
81
|
+
/**
|
|
82
|
+
* The type of webhook event.
|
|
83
|
+
*/
|
|
84
|
+
type: 'intent.authorized';
|
|
85
|
+
/**
|
|
86
|
+
* Display name of the user who created the intent.
|
|
87
|
+
*/
|
|
88
|
+
created_by_display_name?: string;
|
|
89
|
+
/**
|
|
90
|
+
* The ID of the user who created the intent.
|
|
91
|
+
*/
|
|
92
|
+
created_by_id?: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Payload for the intent.executed webhook event.
|
|
96
|
+
*/
|
|
97
|
+
export interface IntentExecutedWebhookPayload {
|
|
98
|
+
/**
|
|
99
|
+
* Result of the successful intent execution.
|
|
100
|
+
*/
|
|
101
|
+
action_result: IntentsAPI.BaseActionResult;
|
|
102
|
+
/**
|
|
103
|
+
* Unix timestamp when the intent was created.
|
|
104
|
+
*/
|
|
105
|
+
created_at: number;
|
|
106
|
+
/**
|
|
107
|
+
* Unix timestamp when the intent expires.
|
|
108
|
+
*/
|
|
109
|
+
expires_at: number;
|
|
110
|
+
/**
|
|
111
|
+
* The unique ID of the intent.
|
|
112
|
+
*/
|
|
113
|
+
intent_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* Type of intent.
|
|
116
|
+
*/
|
|
117
|
+
intent_type: IntentsAPI.IntentType;
|
|
118
|
+
/**
|
|
119
|
+
* The current status of the intent.
|
|
120
|
+
*/
|
|
121
|
+
status: string;
|
|
122
|
+
/**
|
|
123
|
+
* The type of webhook event.
|
|
124
|
+
*/
|
|
125
|
+
type: 'intent.executed';
|
|
126
|
+
/**
|
|
127
|
+
* Display name of the user who created the intent.
|
|
128
|
+
*/
|
|
129
|
+
created_by_display_name?: string;
|
|
130
|
+
/**
|
|
131
|
+
* The ID of the user who created the intent.
|
|
132
|
+
*/
|
|
133
|
+
created_by_id?: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Payload for the intent.failed webhook event.
|
|
137
|
+
*/
|
|
138
|
+
export interface IntentFailedWebhookPayload {
|
|
139
|
+
/**
|
|
140
|
+
* Result of the failed intent execution.
|
|
141
|
+
*/
|
|
142
|
+
action_result: IntentsAPI.BaseActionResult;
|
|
143
|
+
/**
|
|
144
|
+
* Unix timestamp when the intent was created.
|
|
145
|
+
*/
|
|
146
|
+
created_at: number;
|
|
147
|
+
/**
|
|
148
|
+
* Unix timestamp when the intent expires.
|
|
149
|
+
*/
|
|
150
|
+
expires_at: number;
|
|
151
|
+
/**
|
|
152
|
+
* The unique ID of the intent.
|
|
153
|
+
*/
|
|
154
|
+
intent_id: string;
|
|
155
|
+
/**
|
|
156
|
+
* Type of intent.
|
|
157
|
+
*/
|
|
158
|
+
intent_type: IntentsAPI.IntentType;
|
|
159
|
+
/**
|
|
160
|
+
* The current status of the intent.
|
|
161
|
+
*/
|
|
162
|
+
status: string;
|
|
163
|
+
/**
|
|
164
|
+
* The type of webhook event.
|
|
165
|
+
*/
|
|
166
|
+
type: 'intent.failed';
|
|
167
|
+
/**
|
|
168
|
+
* Display name of the user who created the intent.
|
|
169
|
+
*/
|
|
170
|
+
created_by_display_name?: string;
|
|
171
|
+
/**
|
|
172
|
+
* The ID of the user who created the intent.
|
|
173
|
+
*/
|
|
174
|
+
created_by_id?: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Payload for the mfa.enabled webhook event.
|
|
178
|
+
*/
|
|
179
|
+
export interface MfaEnabledWebhookPayload {
|
|
180
|
+
/**
|
|
181
|
+
* The MFA method that was enabled.
|
|
182
|
+
*/
|
|
183
|
+
method: 'sms' | 'totp' | 'passkey';
|
|
184
|
+
/**
|
|
185
|
+
* The type of webhook event.
|
|
186
|
+
*/
|
|
187
|
+
type: 'mfa.enabled';
|
|
188
|
+
/**
|
|
189
|
+
* The ID of the user who enabled MFA.
|
|
190
|
+
*/
|
|
191
|
+
user_id: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Payload for the mfa.disabled webhook event.
|
|
195
|
+
*/
|
|
196
|
+
export interface MfaDisabledWebhookPayload {
|
|
197
|
+
/**
|
|
198
|
+
* The MFA method that was disabled.
|
|
199
|
+
*/
|
|
200
|
+
method: 'sms' | 'totp' | 'passkey';
|
|
201
|
+
/**
|
|
202
|
+
* The type of webhook event.
|
|
203
|
+
*/
|
|
204
|
+
type: 'mfa.disabled';
|
|
205
|
+
/**
|
|
206
|
+
* The ID of the user who disabled MFA.
|
|
207
|
+
*/
|
|
208
|
+
user_id: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Payload for the transaction.broadcasted webhook event.
|
|
212
|
+
*/
|
|
213
|
+
export interface TransactionBroadcastedWebhookPayload {
|
|
214
|
+
/**
|
|
215
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
216
|
+
*/
|
|
217
|
+
caip2: string;
|
|
218
|
+
/**
|
|
219
|
+
* The blockchain transaction hash.
|
|
220
|
+
*/
|
|
221
|
+
transaction_hash: string;
|
|
222
|
+
/**
|
|
223
|
+
* The Privy-assigned ID for this transaction.
|
|
224
|
+
*/
|
|
225
|
+
transaction_id: string;
|
|
226
|
+
/**
|
|
227
|
+
* The type of webhook event.
|
|
228
|
+
*/
|
|
229
|
+
type: 'transaction.broadcasted';
|
|
230
|
+
/**
|
|
231
|
+
* The ID of the wallet that initiated the transaction.
|
|
232
|
+
*/
|
|
233
|
+
wallet_id: string;
|
|
234
|
+
/**
|
|
235
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
236
|
+
* provided.
|
|
237
|
+
*/
|
|
238
|
+
reference_id?: string | null;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Payload for the transaction.confirmed webhook event.
|
|
242
|
+
*/
|
|
243
|
+
export interface TransactionConfirmedWebhookPayload {
|
|
244
|
+
/**
|
|
245
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
246
|
+
*/
|
|
247
|
+
caip2: string;
|
|
248
|
+
/**
|
|
249
|
+
* The blockchain transaction hash.
|
|
250
|
+
*/
|
|
251
|
+
transaction_hash: string;
|
|
252
|
+
/**
|
|
253
|
+
* The Privy-assigned ID for this transaction.
|
|
254
|
+
*/
|
|
255
|
+
transaction_id: string;
|
|
256
|
+
/**
|
|
257
|
+
* The type of webhook event.
|
|
258
|
+
*/
|
|
259
|
+
type: 'transaction.confirmed';
|
|
260
|
+
/**
|
|
261
|
+
* The ID of the wallet that initiated the transaction.
|
|
262
|
+
*/
|
|
263
|
+
wallet_id: string;
|
|
264
|
+
/**
|
|
265
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
266
|
+
* provided.
|
|
267
|
+
*/
|
|
268
|
+
reference_id?: string | null;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Payload for the transaction.execution_reverted webhook event.
|
|
272
|
+
*/
|
|
273
|
+
export interface TransactionExecutionRevertedWebhookPayload {
|
|
274
|
+
/**
|
|
275
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
276
|
+
*/
|
|
277
|
+
caip2: string;
|
|
278
|
+
/**
|
|
279
|
+
* The blockchain transaction hash.
|
|
280
|
+
*/
|
|
281
|
+
transaction_hash: string;
|
|
282
|
+
/**
|
|
283
|
+
* The Privy-assigned ID for this transaction.
|
|
284
|
+
*/
|
|
285
|
+
transaction_id: string;
|
|
286
|
+
/**
|
|
287
|
+
* The type of webhook event.
|
|
288
|
+
*/
|
|
289
|
+
type: 'transaction.execution_reverted';
|
|
290
|
+
/**
|
|
291
|
+
* The ID of the wallet that initiated the transaction.
|
|
292
|
+
*/
|
|
293
|
+
wallet_id: string;
|
|
294
|
+
/**
|
|
295
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
296
|
+
* provided.
|
|
297
|
+
*/
|
|
298
|
+
reference_id?: string | null;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Payload for the transaction.still_pending webhook event.
|
|
302
|
+
*/
|
|
303
|
+
export interface TransactionStillPendingWebhookPayload {
|
|
304
|
+
/**
|
|
305
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
306
|
+
*/
|
|
307
|
+
caip2: string;
|
|
308
|
+
/**
|
|
309
|
+
* The blockchain transaction hash.
|
|
310
|
+
*/
|
|
311
|
+
transaction_hash: string;
|
|
312
|
+
/**
|
|
313
|
+
* The Privy-assigned ID for this transaction.
|
|
314
|
+
*/
|
|
315
|
+
transaction_id: string;
|
|
316
|
+
/**
|
|
317
|
+
* An unsigned Ethereum transaction object.
|
|
318
|
+
*/
|
|
319
|
+
transaction_request: WalletsAPI.UnsignedEthereumTransaction;
|
|
320
|
+
/**
|
|
321
|
+
* The type of webhook event.
|
|
322
|
+
*/
|
|
323
|
+
type: 'transaction.still_pending';
|
|
324
|
+
/**
|
|
325
|
+
* The ID of the wallet that initiated the transaction.
|
|
326
|
+
*/
|
|
327
|
+
wallet_id: string;
|
|
328
|
+
/**
|
|
329
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
330
|
+
* provided.
|
|
331
|
+
*/
|
|
332
|
+
reference_id?: string | null;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Payload for the transaction.failed webhook event.
|
|
336
|
+
*/
|
|
337
|
+
export interface TransactionFailedWebhookPayload {
|
|
338
|
+
/**
|
|
339
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
340
|
+
*/
|
|
341
|
+
caip2: string;
|
|
342
|
+
/**
|
|
343
|
+
* The blockchain transaction hash.
|
|
344
|
+
*/
|
|
345
|
+
transaction_hash: string;
|
|
346
|
+
/**
|
|
347
|
+
* The Privy-assigned ID for this transaction.
|
|
348
|
+
*/
|
|
349
|
+
transaction_id: string;
|
|
350
|
+
/**
|
|
351
|
+
* The type of webhook event.
|
|
352
|
+
*/
|
|
353
|
+
type: 'transaction.failed';
|
|
354
|
+
/**
|
|
355
|
+
* The ID of the wallet that initiated the transaction.
|
|
356
|
+
*/
|
|
357
|
+
wallet_id: string;
|
|
358
|
+
/**
|
|
359
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
360
|
+
* provided.
|
|
361
|
+
*/
|
|
362
|
+
reference_id?: string | null;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Payload for the transaction.replaced webhook event.
|
|
366
|
+
*/
|
|
367
|
+
export interface TransactionReplacedWebhookPayload {
|
|
368
|
+
/**
|
|
369
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
370
|
+
*/
|
|
371
|
+
caip2: string;
|
|
372
|
+
/**
|
|
373
|
+
* The blockchain transaction hash.
|
|
374
|
+
*/
|
|
375
|
+
transaction_hash: string;
|
|
376
|
+
/**
|
|
377
|
+
* The Privy-assigned ID for this transaction.
|
|
378
|
+
*/
|
|
379
|
+
transaction_id: string;
|
|
380
|
+
/**
|
|
381
|
+
* The type of webhook event.
|
|
382
|
+
*/
|
|
383
|
+
type: 'transaction.replaced';
|
|
384
|
+
/**
|
|
385
|
+
* The ID of the wallet that initiated the transaction.
|
|
386
|
+
*/
|
|
387
|
+
wallet_id: string;
|
|
388
|
+
/**
|
|
389
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
390
|
+
* provided.
|
|
391
|
+
*/
|
|
392
|
+
reference_id?: string | null;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Payload for the transaction.provider_error webhook event.
|
|
396
|
+
*/
|
|
397
|
+
export interface TransactionProviderErrorWebhookPayload {
|
|
398
|
+
/**
|
|
399
|
+
* The CAIP-2 chain identifier (e.g., eip155:1 for Ethereum mainnet).
|
|
400
|
+
*/
|
|
401
|
+
caip2: string;
|
|
402
|
+
/**
|
|
403
|
+
* The blockchain transaction hash.
|
|
404
|
+
*/
|
|
405
|
+
transaction_hash: string;
|
|
406
|
+
/**
|
|
407
|
+
* The Privy-assigned ID for this transaction.
|
|
408
|
+
*/
|
|
409
|
+
transaction_id: string;
|
|
410
|
+
/**
|
|
411
|
+
* The type of webhook event.
|
|
412
|
+
*/
|
|
413
|
+
type: 'transaction.provider_error';
|
|
414
|
+
/**
|
|
415
|
+
* The ID of the wallet that initiated the transaction.
|
|
416
|
+
*/
|
|
417
|
+
wallet_id: string;
|
|
418
|
+
/**
|
|
419
|
+
* Developer-provided reference ID for transaction reconciliation, if one was
|
|
420
|
+
* provided.
|
|
421
|
+
*/
|
|
422
|
+
reference_id?: string | null;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Payload for the user_operation.completed webhook event.
|
|
426
|
+
*/
|
|
427
|
+
export interface UserOperationCompletedWebhookPayload {
|
|
428
|
+
actual_gas_cost: string;
|
|
429
|
+
actual_gas_used: string;
|
|
430
|
+
block_number: number;
|
|
431
|
+
caip2: string;
|
|
432
|
+
log_index: number;
|
|
433
|
+
nonce: string;
|
|
434
|
+
paymaster: string | null;
|
|
435
|
+
sender: string;
|
|
436
|
+
success: boolean;
|
|
437
|
+
transaction_hash: string;
|
|
438
|
+
/**
|
|
439
|
+
* The type of webhook event.
|
|
440
|
+
*/
|
|
441
|
+
type: 'user_operation.completed';
|
|
442
|
+
user_op_hash: string;
|
|
443
|
+
}
|
|
5
444
|
/**
|
|
6
445
|
* Payload for the user.created webhook event.
|
|
7
446
|
*/
|
|
@@ -114,221 +553,388 @@ export interface UserWalletCreatedWebhookPayload {
|
|
|
114
553
|
/**
|
|
115
554
|
* The type of webhook event.
|
|
116
555
|
*/
|
|
117
|
-
type: 'user.wallet_created';
|
|
556
|
+
type: 'user.wallet_created';
|
|
557
|
+
/**
|
|
558
|
+
* A Privy user object.
|
|
559
|
+
*/
|
|
560
|
+
user: UsersAPI.User;
|
|
561
|
+
/**
|
|
562
|
+
* Base schema for wallet accounts linked to the user.
|
|
563
|
+
*/
|
|
564
|
+
wallet: UsersAPI.LinkedAccountBaseWallet;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Payload for the wallet_action.swap.created webhook event.
|
|
568
|
+
*/
|
|
569
|
+
export interface WalletActionSwapCreatedWebhookPayload {
|
|
570
|
+
/**
|
|
571
|
+
* Type of wallet action
|
|
572
|
+
*/
|
|
573
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
574
|
+
/**
|
|
575
|
+
* Chain identifier.
|
|
576
|
+
*/
|
|
577
|
+
caip2: string;
|
|
578
|
+
/**
|
|
579
|
+
* Amount of input token in base units. Populated after on-chain confirmation.
|
|
580
|
+
*/
|
|
581
|
+
input_amount: string | null;
|
|
582
|
+
/**
|
|
583
|
+
* Token address being sold.
|
|
584
|
+
*/
|
|
585
|
+
input_token: string;
|
|
586
|
+
/**
|
|
587
|
+
* Token address being bought.
|
|
588
|
+
*/
|
|
589
|
+
output_token: string;
|
|
590
|
+
/**
|
|
591
|
+
* Status of a wallet action.
|
|
592
|
+
*/
|
|
593
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
594
|
+
/**
|
|
595
|
+
* The type of webhook event.
|
|
596
|
+
*/
|
|
597
|
+
type: 'wallet_action.swap.created';
|
|
598
|
+
/**
|
|
599
|
+
* The ID of the wallet action.
|
|
600
|
+
*/
|
|
601
|
+
wallet_action_id: string;
|
|
602
|
+
/**
|
|
603
|
+
* The ID of the wallet involved in the action.
|
|
604
|
+
*/
|
|
605
|
+
wallet_id: string;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Payload for the wallet_action.swap.succeeded webhook event.
|
|
609
|
+
*/
|
|
610
|
+
export interface WalletActionSwapSucceededWebhookPayload {
|
|
611
|
+
/**
|
|
612
|
+
* Type of wallet action
|
|
613
|
+
*/
|
|
614
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
615
|
+
/**
|
|
616
|
+
* Chain identifier.
|
|
617
|
+
*/
|
|
618
|
+
caip2: string;
|
|
619
|
+
/**
|
|
620
|
+
* Amount of input token in base units. Populated after on-chain confirmation.
|
|
621
|
+
*/
|
|
622
|
+
input_amount: string | null;
|
|
623
|
+
/**
|
|
624
|
+
* Token address being sold.
|
|
625
|
+
*/
|
|
626
|
+
input_token: string;
|
|
627
|
+
/**
|
|
628
|
+
* Amount of output token received, in base units. Populated after on-chain
|
|
629
|
+
* confirmation.
|
|
630
|
+
*/
|
|
631
|
+
output_amount: string | null;
|
|
632
|
+
/**
|
|
633
|
+
* Token address being bought.
|
|
634
|
+
*/
|
|
635
|
+
output_token: string;
|
|
636
|
+
/**
|
|
637
|
+
* Status of a wallet action.
|
|
638
|
+
*/
|
|
639
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
640
|
+
/**
|
|
641
|
+
* The steps of the wallet action, including transaction hashes.
|
|
642
|
+
*/
|
|
643
|
+
steps: Array<WalletActionsAPI.WalletActionStep>;
|
|
644
|
+
/**
|
|
645
|
+
* The type of webhook event.
|
|
646
|
+
*/
|
|
647
|
+
type: 'wallet_action.swap.succeeded';
|
|
648
|
+
/**
|
|
649
|
+
* The ID of the wallet action.
|
|
650
|
+
*/
|
|
651
|
+
wallet_action_id: string;
|
|
652
|
+
/**
|
|
653
|
+
* The ID of the wallet involved in the action.
|
|
654
|
+
*/
|
|
655
|
+
wallet_id: string;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Payload for the wallet_action.swap.rejected webhook event.
|
|
659
|
+
*/
|
|
660
|
+
export interface WalletActionSwapRejectedWebhookPayload {
|
|
661
|
+
/**
|
|
662
|
+
* Type of wallet action
|
|
663
|
+
*/
|
|
664
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
665
|
+
/**
|
|
666
|
+
* Chain identifier.
|
|
667
|
+
*/
|
|
668
|
+
caip2: string;
|
|
669
|
+
/**
|
|
670
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
671
|
+
*/
|
|
672
|
+
failure_reason: WalletActionsAPI.FailureReason;
|
|
673
|
+
/**
|
|
674
|
+
* Amount of input token in base units. Populated after on-chain confirmation.
|
|
675
|
+
*/
|
|
676
|
+
input_amount: string | null;
|
|
677
|
+
/**
|
|
678
|
+
* Token address being sold.
|
|
679
|
+
*/
|
|
680
|
+
input_token: string;
|
|
681
|
+
/**
|
|
682
|
+
* Token address being bought.
|
|
683
|
+
*/
|
|
684
|
+
output_token: string;
|
|
685
|
+
/**
|
|
686
|
+
* Status of a wallet action.
|
|
687
|
+
*/
|
|
688
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
689
|
+
/**
|
|
690
|
+
* The steps of the wallet action at the time of rejection.
|
|
691
|
+
*/
|
|
692
|
+
steps: Array<WalletActionsAPI.WalletActionStep>;
|
|
693
|
+
/**
|
|
694
|
+
* The type of webhook event.
|
|
695
|
+
*/
|
|
696
|
+
type: 'wallet_action.swap.rejected';
|
|
118
697
|
/**
|
|
119
|
-
*
|
|
698
|
+
* The ID of the wallet action.
|
|
120
699
|
*/
|
|
121
|
-
|
|
700
|
+
wallet_action_id: string;
|
|
122
701
|
/**
|
|
123
|
-
*
|
|
702
|
+
* The ID of the wallet involved in the action.
|
|
124
703
|
*/
|
|
125
|
-
|
|
704
|
+
wallet_id: string;
|
|
126
705
|
}
|
|
127
706
|
/**
|
|
128
|
-
* Payload for the
|
|
707
|
+
* Payload for the wallet_action.swap.failed webhook event.
|
|
129
708
|
*/
|
|
130
|
-
export interface
|
|
709
|
+
export interface WalletActionSwapFailedWebhookPayload {
|
|
131
710
|
/**
|
|
132
|
-
*
|
|
711
|
+
* Type of wallet action
|
|
133
712
|
*/
|
|
134
|
-
|
|
713
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
135
714
|
/**
|
|
136
|
-
*
|
|
715
|
+
* Chain identifier.
|
|
137
716
|
*/
|
|
138
|
-
|
|
717
|
+
caip2: string;
|
|
139
718
|
/**
|
|
140
|
-
*
|
|
719
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
141
720
|
*/
|
|
142
|
-
|
|
721
|
+
failure_reason: WalletActionsAPI.FailureReason;
|
|
143
722
|
/**
|
|
144
|
-
*
|
|
723
|
+
* Amount of input token in base units. Populated after on-chain confirmation.
|
|
145
724
|
*/
|
|
146
|
-
|
|
725
|
+
input_amount: string | null;
|
|
147
726
|
/**
|
|
148
|
-
*
|
|
727
|
+
* Token address being sold.
|
|
149
728
|
*/
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Payload for the transaction.confirmed webhook event.
|
|
154
|
-
*/
|
|
155
|
-
export interface TransactionConfirmedWebhookPayload {
|
|
729
|
+
input_token: string;
|
|
156
730
|
/**
|
|
157
|
-
*
|
|
731
|
+
* Token address being bought.
|
|
158
732
|
*/
|
|
159
|
-
|
|
733
|
+
output_token: string;
|
|
160
734
|
/**
|
|
161
|
-
*
|
|
735
|
+
* Status of a wallet action.
|
|
162
736
|
*/
|
|
163
|
-
|
|
737
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
164
738
|
/**
|
|
165
|
-
* The
|
|
739
|
+
* The steps of the wallet action. Completed steps will have transaction hashes;
|
|
740
|
+
* the failing step will have a failure_reason.
|
|
166
741
|
*/
|
|
167
|
-
|
|
742
|
+
steps: Array<WalletActionsAPI.WalletActionStep>;
|
|
168
743
|
/**
|
|
169
744
|
* The type of webhook event.
|
|
170
745
|
*/
|
|
171
|
-
type: '
|
|
746
|
+
type: 'wallet_action.swap.failed';
|
|
172
747
|
/**
|
|
173
|
-
* The ID of the wallet
|
|
748
|
+
* The ID of the wallet action.
|
|
749
|
+
*/
|
|
750
|
+
wallet_action_id: string;
|
|
751
|
+
/**
|
|
752
|
+
* The ID of the wallet involved in the action.
|
|
174
753
|
*/
|
|
175
754
|
wallet_id: string;
|
|
176
755
|
}
|
|
177
756
|
/**
|
|
178
|
-
* Payload for the
|
|
757
|
+
* Payload for the wallet_action.transfer.created webhook event.
|
|
179
758
|
*/
|
|
180
|
-
export interface
|
|
759
|
+
export interface WalletActionTransferCreatedWebhookPayload {
|
|
181
760
|
/**
|
|
182
|
-
*
|
|
761
|
+
* Type of wallet action
|
|
183
762
|
*/
|
|
184
|
-
|
|
763
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
185
764
|
/**
|
|
186
|
-
*
|
|
765
|
+
* Recipient address.
|
|
187
766
|
*/
|
|
188
|
-
|
|
767
|
+
destination_address: string;
|
|
189
768
|
/**
|
|
190
|
-
*
|
|
769
|
+
* Decimal amount as provided by the user (e.g. "1.5").
|
|
191
770
|
*/
|
|
192
|
-
|
|
771
|
+
source_amount: string;
|
|
772
|
+
/**
|
|
773
|
+
* Asset identifier (e.g. "usdc", "eth").
|
|
774
|
+
*/
|
|
775
|
+
source_asset: string;
|
|
776
|
+
/**
|
|
777
|
+
* Chain name (e.g. "base", "ethereum").
|
|
778
|
+
*/
|
|
779
|
+
source_chain: string;
|
|
780
|
+
/**
|
|
781
|
+
* Status of a wallet action.
|
|
782
|
+
*/
|
|
783
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
193
784
|
/**
|
|
194
785
|
* The type of webhook event.
|
|
195
786
|
*/
|
|
196
|
-
type: '
|
|
787
|
+
type: 'wallet_action.transfer.created';
|
|
197
788
|
/**
|
|
198
|
-
* The ID of the wallet
|
|
789
|
+
* The ID of the wallet action.
|
|
790
|
+
*/
|
|
791
|
+
wallet_action_id: string;
|
|
792
|
+
/**
|
|
793
|
+
* The ID of the wallet involved in the action.
|
|
199
794
|
*/
|
|
200
795
|
wallet_id: string;
|
|
201
796
|
}
|
|
202
797
|
/**
|
|
203
|
-
* Payload for the
|
|
798
|
+
* Payload for the wallet_action.transfer.succeeded webhook event.
|
|
204
799
|
*/
|
|
205
|
-
export interface
|
|
800
|
+
export interface WalletActionTransferSucceededWebhookPayload {
|
|
206
801
|
/**
|
|
207
|
-
*
|
|
802
|
+
* Type of wallet action
|
|
208
803
|
*/
|
|
209
|
-
|
|
804
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
210
805
|
/**
|
|
211
|
-
*
|
|
806
|
+
* Recipient address.
|
|
212
807
|
*/
|
|
213
|
-
|
|
808
|
+
destination_address: string;
|
|
214
809
|
/**
|
|
215
|
-
*
|
|
810
|
+
* Decimal amount as provided by the user (e.g. "1.5").
|
|
216
811
|
*/
|
|
217
|
-
|
|
812
|
+
source_amount: string;
|
|
813
|
+
/**
|
|
814
|
+
* Asset identifier (e.g. "usdc", "eth").
|
|
815
|
+
*/
|
|
816
|
+
source_asset: string;
|
|
817
|
+
/**
|
|
818
|
+
* Chain name (e.g. "base", "ethereum").
|
|
819
|
+
*/
|
|
820
|
+
source_chain: string;
|
|
821
|
+
/**
|
|
822
|
+
* Status of a wallet action.
|
|
823
|
+
*/
|
|
824
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
218
825
|
/**
|
|
219
|
-
* The
|
|
826
|
+
* The steps of the wallet action, including transaction hashes.
|
|
220
827
|
*/
|
|
221
|
-
|
|
828
|
+
steps: Array<WalletActionsAPI.WalletActionStep>;
|
|
222
829
|
/**
|
|
223
830
|
* The type of webhook event.
|
|
224
831
|
*/
|
|
225
|
-
type: '
|
|
832
|
+
type: 'wallet_action.transfer.succeeded';
|
|
226
833
|
/**
|
|
227
|
-
* The ID of the wallet
|
|
834
|
+
* The ID of the wallet action.
|
|
835
|
+
*/
|
|
836
|
+
wallet_action_id: string;
|
|
837
|
+
/**
|
|
838
|
+
* The ID of the wallet involved in the action.
|
|
228
839
|
*/
|
|
229
840
|
wallet_id: string;
|
|
230
841
|
}
|
|
231
|
-
export declare namespace TransactionStillPendingWebhookPayload {
|
|
232
|
-
/**
|
|
233
|
-
* The original transaction request that is still pending.
|
|
234
|
-
*/
|
|
235
|
-
interface TransactionRequest {
|
|
236
|
-
authorization_list?: Array<TransactionRequest.AuthorizationList>;
|
|
237
|
-
chain_id?: string | number;
|
|
238
|
-
data?: string;
|
|
239
|
-
from?: string;
|
|
240
|
-
gas_limit?: string | number;
|
|
241
|
-
gas_price?: string | number;
|
|
242
|
-
max_fee_per_gas?: string | number;
|
|
243
|
-
max_priority_fee_per_gas?: string | number;
|
|
244
|
-
nonce?: string | number;
|
|
245
|
-
to?: string;
|
|
246
|
-
type?: 0 | 1 | 2 | 4;
|
|
247
|
-
value?: string | number;
|
|
248
|
-
}
|
|
249
|
-
namespace TransactionRequest {
|
|
250
|
-
interface AuthorizationList {
|
|
251
|
-
chain_id: string | number;
|
|
252
|
-
contract: string;
|
|
253
|
-
nonce: string | number;
|
|
254
|
-
r: string;
|
|
255
|
-
s: string;
|
|
256
|
-
y_parity: number;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
842
|
/**
|
|
261
|
-
* Payload for the
|
|
843
|
+
* Payload for the wallet_action.transfer.rejected webhook event.
|
|
262
844
|
*/
|
|
263
|
-
export interface
|
|
845
|
+
export interface WalletActionTransferRejectedWebhookPayload {
|
|
264
846
|
/**
|
|
265
|
-
*
|
|
847
|
+
* Type of wallet action
|
|
266
848
|
*/
|
|
267
|
-
|
|
849
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
268
850
|
/**
|
|
269
|
-
*
|
|
851
|
+
* Recipient address.
|
|
270
852
|
*/
|
|
271
|
-
|
|
853
|
+
destination_address: string;
|
|
272
854
|
/**
|
|
273
|
-
*
|
|
855
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
274
856
|
*/
|
|
275
|
-
|
|
857
|
+
failure_reason: WalletActionsAPI.FailureReason;
|
|
276
858
|
/**
|
|
277
|
-
*
|
|
859
|
+
* Decimal amount as provided by the user (e.g. "1.5").
|
|
278
860
|
*/
|
|
279
|
-
|
|
861
|
+
source_amount: string;
|
|
280
862
|
/**
|
|
281
|
-
*
|
|
863
|
+
* Asset identifier (e.g. "usdc", "eth").
|
|
282
864
|
*/
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Payload for the transaction.replaced webhook event.
|
|
287
|
-
*/
|
|
288
|
-
export interface TransactionReplacedWebhookPayload {
|
|
865
|
+
source_asset: string;
|
|
289
866
|
/**
|
|
290
|
-
*
|
|
867
|
+
* Chain name (e.g. "base", "ethereum").
|
|
291
868
|
*/
|
|
292
|
-
|
|
869
|
+
source_chain: string;
|
|
293
870
|
/**
|
|
294
|
-
*
|
|
871
|
+
* Status of a wallet action.
|
|
295
872
|
*/
|
|
296
|
-
|
|
873
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
297
874
|
/**
|
|
298
|
-
* The
|
|
875
|
+
* The steps of the wallet action at the time of rejection.
|
|
299
876
|
*/
|
|
300
|
-
|
|
877
|
+
steps: Array<WalletActionsAPI.WalletActionStep>;
|
|
301
878
|
/**
|
|
302
879
|
* The type of webhook event.
|
|
303
880
|
*/
|
|
304
|
-
type: '
|
|
881
|
+
type: 'wallet_action.transfer.rejected';
|
|
305
882
|
/**
|
|
306
|
-
* The ID of the wallet
|
|
883
|
+
* The ID of the wallet action.
|
|
884
|
+
*/
|
|
885
|
+
wallet_action_id: string;
|
|
886
|
+
/**
|
|
887
|
+
* The ID of the wallet involved in the action.
|
|
307
888
|
*/
|
|
308
889
|
wallet_id: string;
|
|
309
890
|
}
|
|
310
891
|
/**
|
|
311
|
-
* Payload for the
|
|
892
|
+
* Payload for the wallet_action.transfer.failed webhook event.
|
|
312
893
|
*/
|
|
313
|
-
export interface
|
|
894
|
+
export interface WalletActionTransferFailedWebhookPayload {
|
|
314
895
|
/**
|
|
315
|
-
*
|
|
896
|
+
* Type of wallet action
|
|
316
897
|
*/
|
|
317
|
-
|
|
898
|
+
action_type: WalletActionsAPI.WalletActionType;
|
|
318
899
|
/**
|
|
319
|
-
*
|
|
900
|
+
* Recipient address.
|
|
320
901
|
*/
|
|
321
|
-
|
|
902
|
+
destination_address: string;
|
|
322
903
|
/**
|
|
323
|
-
*
|
|
904
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
324
905
|
*/
|
|
325
|
-
|
|
906
|
+
failure_reason: WalletActionsAPI.FailureReason;
|
|
907
|
+
/**
|
|
908
|
+
* Decimal amount as provided by the user (e.g. "1.5").
|
|
909
|
+
*/
|
|
910
|
+
source_amount: string;
|
|
911
|
+
/**
|
|
912
|
+
* Asset identifier (e.g. "usdc", "eth").
|
|
913
|
+
*/
|
|
914
|
+
source_asset: string;
|
|
915
|
+
/**
|
|
916
|
+
* Chain name (e.g. "base", "ethereum").
|
|
917
|
+
*/
|
|
918
|
+
source_chain: string;
|
|
919
|
+
/**
|
|
920
|
+
* Status of a wallet action.
|
|
921
|
+
*/
|
|
922
|
+
status: WalletActionsAPI.WalletActionStatus;
|
|
923
|
+
/**
|
|
924
|
+
* The steps of the wallet action. Completed steps will have transaction hashes;
|
|
925
|
+
* the failing step will have a failure_reason.
|
|
926
|
+
*/
|
|
927
|
+
steps: Array<WalletActionsAPI.WalletActionStep>;
|
|
326
928
|
/**
|
|
327
929
|
* The type of webhook event.
|
|
328
930
|
*/
|
|
329
|
-
type: '
|
|
931
|
+
type: 'wallet_action.transfer.failed';
|
|
330
932
|
/**
|
|
331
|
-
* The ID of the wallet
|
|
933
|
+
* The ID of the wallet action.
|
|
934
|
+
*/
|
|
935
|
+
wallet_action_id: string;
|
|
936
|
+
/**
|
|
937
|
+
* The ID of the wallet involved in the action.
|
|
332
938
|
*/
|
|
333
939
|
wallet_id: string;
|
|
334
940
|
}
|
|
@@ -559,6 +1165,28 @@ export interface PrivateKeyExportWebhookPayload {
|
|
|
559
1165
|
wallet_id: string;
|
|
560
1166
|
export_source?: 'display' | 'client';
|
|
561
1167
|
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Payload for the wallet.seed_phrase_export webhook event.
|
|
1170
|
+
*/
|
|
1171
|
+
export interface SeedPhraseExportWebhookPayload {
|
|
1172
|
+
/**
|
|
1173
|
+
* The type of webhook event.
|
|
1174
|
+
*/
|
|
1175
|
+
type: 'wallet.seed_phrase_export';
|
|
1176
|
+
/**
|
|
1177
|
+
* The ID of the user who exported the seed phrase.
|
|
1178
|
+
*/
|
|
1179
|
+
user_id: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* The address of the wallet.
|
|
1182
|
+
*/
|
|
1183
|
+
wallet_address: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* The ID of the wallet.
|
|
1186
|
+
*/
|
|
1187
|
+
wallet_id: string;
|
|
1188
|
+
export_source?: 'display' | 'client';
|
|
1189
|
+
}
|
|
562
1190
|
/**
|
|
563
1191
|
* Payload for the wallet.recovery_setup webhook event.
|
|
564
1192
|
*/
|
|
@@ -606,210 +1234,60 @@ export interface WalletRecoveredWebhookPayload {
|
|
|
606
1234
|
wallet_id: string;
|
|
607
1235
|
}
|
|
608
1236
|
/**
|
|
609
|
-
* Payload for the
|
|
610
|
-
*/
|
|
611
|
-
export interface MfaEnabledWebhookPayload {
|
|
612
|
-
/**
|
|
613
|
-
* The MFA method that was enabled.
|
|
614
|
-
*/
|
|
615
|
-
method: 'sms' | 'totp' | 'passkey';
|
|
616
|
-
/**
|
|
617
|
-
* The type of webhook event.
|
|
618
|
-
*/
|
|
619
|
-
type: 'mfa.enabled';
|
|
620
|
-
/**
|
|
621
|
-
* The ID of the user who enabled MFA.
|
|
622
|
-
*/
|
|
623
|
-
user_id: string;
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* Payload for the mfa.disabled webhook event.
|
|
1237
|
+
* Payload for the yield.deposit.confirmed webhook event.
|
|
627
1238
|
*/
|
|
628
|
-
export interface
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
1239
|
+
export interface YieldDepositConfirmedWebhookPayload {
|
|
1240
|
+
assets: string;
|
|
1241
|
+
caip2: string;
|
|
1242
|
+
owner: string;
|
|
1243
|
+
sender: string;
|
|
1244
|
+
shares: string;
|
|
633
1245
|
/**
|
|
634
1246
|
* The type of webhook event.
|
|
635
1247
|
*/
|
|
636
|
-
type: '
|
|
637
|
-
|
|
638
|
-
* The ID of the user who disabled MFA.
|
|
639
|
-
*/
|
|
640
|
-
user_id: string;
|
|
1248
|
+
type: 'yield.deposit.confirmed';
|
|
1249
|
+
vault_address: string;
|
|
641
1250
|
}
|
|
642
1251
|
/**
|
|
643
|
-
* Payload for the
|
|
1252
|
+
* Payload for the yield.withdraw.confirmed webhook event.
|
|
644
1253
|
*/
|
|
645
|
-
export interface
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
1254
|
+
export interface YieldWithdrawConfirmedWebhookPayload {
|
|
1255
|
+
assets: string;
|
|
1256
|
+
caip2: string;
|
|
1257
|
+
owner: string;
|
|
1258
|
+
receiver: string;
|
|
1259
|
+
sender: string;
|
|
1260
|
+
shares: string;
|
|
650
1261
|
/**
|
|
651
1262
|
* The type of webhook event.
|
|
652
1263
|
*/
|
|
653
|
-
type: '
|
|
654
|
-
|
|
655
|
-
* The ID of the user.
|
|
656
|
-
*/
|
|
657
|
-
user_id: string;
|
|
1264
|
+
type: 'yield.withdraw.confirmed';
|
|
1265
|
+
vault_address: string;
|
|
658
1266
|
}
|
|
659
1267
|
/**
|
|
660
|
-
* Payload for the
|
|
1268
|
+
* Payload for the yield.claim.confirmed webhook event.
|
|
661
1269
|
*/
|
|
662
|
-
export interface
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
failed_at: string;
|
|
667
|
-
/**
|
|
668
|
-
* The reason for the failure.
|
|
669
|
-
*/
|
|
670
|
-
failure_reason: 'timeout' | 'api_error' | 'disabled_or_closed';
|
|
1270
|
+
export interface YieldClaimConfirmedWebhookPayload {
|
|
1271
|
+
caip2: string;
|
|
1272
|
+
rewards: Array<YieldClaimConfirmedWebhookPayload.Reward>;
|
|
1273
|
+
transaction_id: string;
|
|
671
1274
|
/**
|
|
672
1275
|
* The type of webhook event.
|
|
673
1276
|
*/
|
|
674
|
-
type: '
|
|
675
|
-
|
|
676
|
-
* The ID of the user.
|
|
677
|
-
*/
|
|
678
|
-
user_id: string;
|
|
679
|
-
/**
|
|
680
|
-
* The user's status at the time of failure.
|
|
681
|
-
*/
|
|
682
|
-
status?: KrakenEmbedVerificationFailedWebhookPayload.UnionMember0 | KrakenEmbedVerificationFailedWebhookPayload.UnionMember1 | KrakenEmbedVerificationFailedWebhookPayload.UnionMember2;
|
|
1277
|
+
type: 'yield.claim.confirmed';
|
|
1278
|
+
wallet_id: string;
|
|
683
1279
|
}
|
|
684
|
-
export declare namespace
|
|
685
|
-
interface
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
namespace UnionMember0 {
|
|
690
|
-
interface UnionMember0 {
|
|
691
|
-
action_type: 'verification';
|
|
692
|
-
deadline: string | null;
|
|
693
|
-
reasons: Array<string>;
|
|
694
|
-
verification_type: 'identity' | 'residence' | 'selfie' | 'sanctions_check' | 'pep_check' | 'negative_news_check' | 'tax_id';
|
|
695
|
-
}
|
|
696
|
-
interface UnionMember1 {
|
|
697
|
-
action_type: 'provide_details';
|
|
698
|
-
deadline: string | null;
|
|
699
|
-
details_type: UnionMember1.UnionMember0 | UnionMember1.FullNameType | UnionMember1.DateOfBirthType | UnionMember1.CityOfBirthType | UnionMember1.CountryOfBirthType | UnionMember1.NationalitiesType | UnionMember1.ResidenceType | UnionMember1.PhoneType | UnionMember1.OccupationType | UnionMember1.EmployerType | UnionMember1.TaxIdsType | UnionMember1.ClientIdentifierType;
|
|
700
|
-
reason: string | null;
|
|
701
|
-
}
|
|
702
|
-
namespace UnionMember1 {
|
|
703
|
-
interface UnionMember0 {
|
|
704
|
-
type: 'terms_of_service';
|
|
705
|
-
version?: number;
|
|
706
|
-
}
|
|
707
|
-
interface FullNameType {
|
|
708
|
-
type: 'full_name';
|
|
709
|
-
}
|
|
710
|
-
interface DateOfBirthType {
|
|
711
|
-
type: 'date_of_birth';
|
|
712
|
-
}
|
|
713
|
-
interface CityOfBirthType {
|
|
714
|
-
type: 'city_of_birth';
|
|
715
|
-
}
|
|
716
|
-
interface CountryOfBirthType {
|
|
717
|
-
type: 'country_of_birth';
|
|
718
|
-
}
|
|
719
|
-
interface NationalitiesType {
|
|
720
|
-
type: 'nationalities';
|
|
721
|
-
}
|
|
722
|
-
interface ResidenceType {
|
|
723
|
-
type: 'residence';
|
|
724
|
-
}
|
|
725
|
-
interface PhoneType {
|
|
726
|
-
type: 'phone';
|
|
727
|
-
}
|
|
728
|
-
interface OccupationType {
|
|
729
|
-
type: 'occupation';
|
|
730
|
-
}
|
|
731
|
-
interface EmployerType {
|
|
732
|
-
type: 'employer';
|
|
733
|
-
}
|
|
734
|
-
interface TaxIdsType {
|
|
735
|
-
type: 'tax_ids';
|
|
736
|
-
}
|
|
737
|
-
interface ClientIdentifierType {
|
|
738
|
-
type: 'client_identifier';
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
interface UnionMember2 {
|
|
742
|
-
action_type: 'wait';
|
|
743
|
-
wait_reason_code: string;
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
interface UnionMember1 {
|
|
747
|
-
reasons: Array<string>;
|
|
748
|
-
required_actions: Array<UnionMember1.UnionMember0 | UnionMember1.UnionMember1 | UnionMember1.UnionMember2>;
|
|
749
|
-
state: 'disabled';
|
|
750
|
-
}
|
|
751
|
-
namespace UnionMember1 {
|
|
752
|
-
interface UnionMember0 {
|
|
753
|
-
action_type: 'verification';
|
|
754
|
-
deadline: string | null;
|
|
755
|
-
reasons: Array<string>;
|
|
756
|
-
verification_type: 'identity' | 'residence' | 'selfie' | 'sanctions_check' | 'pep_check' | 'negative_news_check' | 'tax_id';
|
|
757
|
-
}
|
|
758
|
-
interface UnionMember1 {
|
|
759
|
-
action_type: 'provide_details';
|
|
760
|
-
deadline: string | null;
|
|
761
|
-
details_type: UnionMember1.UnionMember0 | UnionMember1.FullNameType | UnionMember1.DateOfBirthType | UnionMember1.CityOfBirthType | UnionMember1.CountryOfBirthType | UnionMember1.NationalitiesType | UnionMember1.ResidenceType | UnionMember1.PhoneType | UnionMember1.OccupationType | UnionMember1.EmployerType | UnionMember1.TaxIdsType | UnionMember1.ClientIdentifierType;
|
|
762
|
-
reason: string | null;
|
|
763
|
-
}
|
|
764
|
-
namespace UnionMember1 {
|
|
765
|
-
interface UnionMember0 {
|
|
766
|
-
type: 'terms_of_service';
|
|
767
|
-
version?: number;
|
|
768
|
-
}
|
|
769
|
-
interface FullNameType {
|
|
770
|
-
type: 'full_name';
|
|
771
|
-
}
|
|
772
|
-
interface DateOfBirthType {
|
|
773
|
-
type: 'date_of_birth';
|
|
774
|
-
}
|
|
775
|
-
interface CityOfBirthType {
|
|
776
|
-
type: 'city_of_birth';
|
|
777
|
-
}
|
|
778
|
-
interface CountryOfBirthType {
|
|
779
|
-
type: 'country_of_birth';
|
|
780
|
-
}
|
|
781
|
-
interface NationalitiesType {
|
|
782
|
-
type: 'nationalities';
|
|
783
|
-
}
|
|
784
|
-
interface ResidenceType {
|
|
785
|
-
type: 'residence';
|
|
786
|
-
}
|
|
787
|
-
interface PhoneType {
|
|
788
|
-
type: 'phone';
|
|
789
|
-
}
|
|
790
|
-
interface OccupationType {
|
|
791
|
-
type: 'occupation';
|
|
792
|
-
}
|
|
793
|
-
interface EmployerType {
|
|
794
|
-
type: 'employer';
|
|
795
|
-
}
|
|
796
|
-
interface TaxIdsType {
|
|
797
|
-
type: 'tax_ids';
|
|
798
|
-
}
|
|
799
|
-
interface ClientIdentifierType {
|
|
800
|
-
type: 'client_identifier';
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
interface UnionMember2 {
|
|
804
|
-
action_type: 'wait';
|
|
805
|
-
wait_reason_code: string;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
interface UnionMember2 {
|
|
809
|
-
reasons: Array<string>;
|
|
810
|
-
state: 'closed';
|
|
1280
|
+
export declare namespace YieldClaimConfirmedWebhookPayload {
|
|
1281
|
+
interface Reward {
|
|
1282
|
+
amount: string;
|
|
1283
|
+
token_address: string;
|
|
1284
|
+
token_symbol: string;
|
|
811
1285
|
}
|
|
812
1286
|
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Union of all webhook payload schemas.
|
|
1289
|
+
*/
|
|
1290
|
+
export type WebhookPayload = UserCreatedWebhookPayload | UserAuthenticatedWebhookPayload | UserLinkedAccountWebhookPayload | UserUnlinkedAccountWebhookPayload | UserUpdatedAccountWebhookPayload | UserTransferredAccountWebhookPayload | UserWalletCreatedWebhookPayload | TransactionBroadcastedWebhookPayload | TransactionConfirmedWebhookPayload | TransactionExecutionRevertedWebhookPayload | TransactionStillPendingWebhookPayload | TransactionFailedWebhookPayload | TransactionReplacedWebhookPayload | TransactionProviderErrorWebhookPayload | FundsDepositedWebhookPayload | FundsWithdrawnWebhookPayload | PrivateKeyExportWebhookPayload | SeedPhraseExportWebhookPayload | WalletRecoverySetupWebhookPayload | WalletRecoveredWebhookPayload | MfaEnabledWebhookPayload | MfaDisabledWebhookPayload | YieldDepositConfirmedWebhookPayload | YieldWithdrawConfirmedWebhookPayload | YieldClaimConfirmedWebhookPayload | UserOperationCompletedWebhookPayload | IntentCreatedWebhookPayload | IntentAuthorizedWebhookPayload | IntentExecutedWebhookPayload | IntentFailedWebhookPayload | WalletActionSwapCreatedWebhookPayload | WalletActionSwapSucceededWebhookPayload | WalletActionSwapRejectedWebhookPayload | WalletActionSwapFailedWebhookPayload | WalletActionTransferCreatedWebhookPayload | WalletActionTransferSucceededWebhookPayload | WalletActionTransferRejectedWebhookPayload | WalletActionTransferFailedWebhookPayload;
|
|
813
1291
|
/**
|
|
814
1292
|
* Payload for the kraken_embed.quote_executed webhook event.
|
|
815
1293
|
*/
|
|
@@ -934,44 +1412,7 @@ export interface KrakenEmbedUserClosedWebhookPayload {
|
|
|
934
1412
|
*/
|
|
935
1413
|
user_id: string;
|
|
936
1414
|
}
|
|
937
|
-
/**
|
|
938
|
-
* Payload for the yield.deposit.confirmed webhook event.
|
|
939
|
-
*/
|
|
940
|
-
export interface YieldDepositConfirmedWebhookPayload {
|
|
941
|
-
assets: string;
|
|
942
|
-
block_number: number;
|
|
943
|
-
caip2: string;
|
|
944
|
-
log_index: number;
|
|
945
|
-
owner: string;
|
|
946
|
-
sender: string;
|
|
947
|
-
shares: string;
|
|
948
|
-
transaction_hash: string;
|
|
949
|
-
/**
|
|
950
|
-
* The type of webhook event.
|
|
951
|
-
*/
|
|
952
|
-
type: 'yield.deposit.confirmed';
|
|
953
|
-
vault_address: string;
|
|
954
|
-
}
|
|
955
|
-
/**
|
|
956
|
-
* Payload for the yield.withdraw.confirmed webhook event.
|
|
957
|
-
*/
|
|
958
|
-
export interface YieldWithdrawConfirmedWebhookPayload {
|
|
959
|
-
assets: string;
|
|
960
|
-
block_number: number;
|
|
961
|
-
caip2: string;
|
|
962
|
-
log_index: number;
|
|
963
|
-
owner: string;
|
|
964
|
-
receiver: string;
|
|
965
|
-
sender: string;
|
|
966
|
-
shares: string;
|
|
967
|
-
transaction_hash: string;
|
|
968
|
-
/**
|
|
969
|
-
* The type of webhook event.
|
|
970
|
-
*/
|
|
971
|
-
type: 'yield.withdraw.confirmed';
|
|
972
|
-
vault_address: string;
|
|
973
|
-
}
|
|
974
1415
|
export declare namespace Webhooks {
|
|
975
|
-
export { type UserCreatedWebhookPayload as UserCreatedWebhookPayload, type UserAuthenticatedWebhookPayload as UserAuthenticatedWebhookPayload, type UserLinkedAccountWebhookPayload as UserLinkedAccountWebhookPayload, type UserUnlinkedAccountWebhookPayload as UserUnlinkedAccountWebhookPayload, type UserUpdatedAccountWebhookPayload as UserUpdatedAccountWebhookPayload, type UserTransferredAccountWebhookPayload as UserTransferredAccountWebhookPayload, type UserWalletCreatedWebhookPayload as UserWalletCreatedWebhookPayload, type
|
|
1416
|
+
export { type IntentCreatedWebhookPayload as IntentCreatedWebhookPayload, type IntentAuthorizedWebhookPayload as IntentAuthorizedWebhookPayload, type IntentExecutedWebhookPayload as IntentExecutedWebhookPayload, type IntentFailedWebhookPayload as IntentFailedWebhookPayload, type MfaEnabledWebhookPayload as MfaEnabledWebhookPayload, type MfaDisabledWebhookPayload as MfaDisabledWebhookPayload, type TransactionBroadcastedWebhookPayload as TransactionBroadcastedWebhookPayload, type TransactionConfirmedWebhookPayload as TransactionConfirmedWebhookPayload, type TransactionExecutionRevertedWebhookPayload as TransactionExecutionRevertedWebhookPayload, type TransactionStillPendingWebhookPayload as TransactionStillPendingWebhookPayload, type TransactionFailedWebhookPayload as TransactionFailedWebhookPayload, type TransactionReplacedWebhookPayload as TransactionReplacedWebhookPayload, type TransactionProviderErrorWebhookPayload as TransactionProviderErrorWebhookPayload, type UserOperationCompletedWebhookPayload as UserOperationCompletedWebhookPayload, type UserCreatedWebhookPayload as UserCreatedWebhookPayload, type UserAuthenticatedWebhookPayload as UserAuthenticatedWebhookPayload, type UserLinkedAccountWebhookPayload as UserLinkedAccountWebhookPayload, type UserUnlinkedAccountWebhookPayload as UserUnlinkedAccountWebhookPayload, type UserUpdatedAccountWebhookPayload as UserUpdatedAccountWebhookPayload, type UserTransferredAccountWebhookPayload as UserTransferredAccountWebhookPayload, type UserWalletCreatedWebhookPayload as UserWalletCreatedWebhookPayload, type WalletActionSwapCreatedWebhookPayload as WalletActionSwapCreatedWebhookPayload, type WalletActionSwapSucceededWebhookPayload as WalletActionSwapSucceededWebhookPayload, type WalletActionSwapRejectedWebhookPayload as WalletActionSwapRejectedWebhookPayload, type WalletActionSwapFailedWebhookPayload as WalletActionSwapFailedWebhookPayload, type WalletActionTransferCreatedWebhookPayload as WalletActionTransferCreatedWebhookPayload, type WalletActionTransferSucceededWebhookPayload as WalletActionTransferSucceededWebhookPayload, type WalletActionTransferRejectedWebhookPayload as WalletActionTransferRejectedWebhookPayload, type WalletActionTransferFailedWebhookPayload as WalletActionTransferFailedWebhookPayload, type FundsDepositedWebhookPayload as FundsDepositedWebhookPayload, type FundsWithdrawnWebhookPayload as FundsWithdrawnWebhookPayload, type PrivateKeyExportWebhookPayload as PrivateKeyExportWebhookPayload, type SeedPhraseExportWebhookPayload as SeedPhraseExportWebhookPayload, type WalletRecoverySetupWebhookPayload as WalletRecoverySetupWebhookPayload, type WalletRecoveredWebhookPayload as WalletRecoveredWebhookPayload, type YieldDepositConfirmedWebhookPayload as YieldDepositConfirmedWebhookPayload, type YieldWithdrawConfirmedWebhookPayload as YieldWithdrawConfirmedWebhookPayload, type YieldClaimConfirmedWebhookPayload as YieldClaimConfirmedWebhookPayload, type WebhookPayload as WebhookPayload, type KrakenEmbedQuoteExecutedWebhookPayload as KrakenEmbedQuoteExecutedWebhookPayload, type KrakenEmbedQuoteExecutionFailedWebhookPayload as KrakenEmbedQuoteExecutionFailedWebhookPayload, type KrakenEmbedQuoteCancelledWebhookPayload as KrakenEmbedQuoteCancelledWebhookPayload, type KrakenEmbedUserVerifiedWebhookPayload as KrakenEmbedUserVerifiedWebhookPayload, type KrakenEmbedUserDisabledWebhookPayload as KrakenEmbedUserDisabledWebhookPayload, type KrakenEmbedUserClosedWebhookPayload as KrakenEmbedUserClosedWebhookPayload, };
|
|
976
1417
|
}
|
|
977
1418
|
//# sourceMappingURL=webhooks.d.mts.map
|