@privy-io/node 0.10.1 → 0.11.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 +50 -0
- package/client.d.mts +37 -19
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -19
- package/client.d.ts.map +1 -1
- package/client.js +29 -10
- package/client.js.map +1 -1
- package/client.mjs +30 -11
- package/client.mjs.map +1 -1
- package/index.d.mts +2 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +12 -1
- package/public-api/PrivyClient.d.mts +3 -0
- package/public-api/PrivyClient.d.mts.map +1 -1
- package/public-api/PrivyClient.d.ts +3 -0
- package/public-api/PrivyClient.d.ts.map +1 -1
- package/public-api/PrivyClient.js +5 -0
- package/public-api/PrivyClient.js.map +1 -1
- package/public-api/PrivyClient.mjs +5 -0
- package/public-api/PrivyClient.mjs.map +1 -1
- package/public-api/services/apps.d.mts +25 -0
- package/public-api/services/apps.d.mts.map +1 -0
- package/public-api/services/apps.d.ts +25 -0
- package/public-api/services/apps.d.ts.map +1 -0
- package/public-api/services/apps.js +56 -0
- package/public-api/services/apps.js.map +1 -0
- package/public-api/services/apps.mjs +52 -0
- package/public-api/services/apps.mjs.map +1 -0
- package/public-api/services/policies.d.mts +6 -2
- package/public-api/services/policies.d.mts.map +1 -1
- package/public-api/services/policies.d.ts +6 -2
- package/public-api/services/policies.d.ts.map +1 -1
- package/public-api/services/policies.js +6 -0
- package/public-api/services/policies.js.map +1 -1
- package/public-api/services/policies.mjs +6 -0
- package/public-api/services/policies.mjs.map +1 -1
- package/public-api/services/wallets.d.mts +5 -1
- package/public-api/services/wallets.d.mts.map +1 -1
- package/public-api/services/wallets.d.ts +5 -1
- package/public-api/services/wallets.d.ts.map +1 -1
- package/public-api/services/wallets.js +6 -0
- package/public-api/services/wallets.js.map +1 -1
- package/public-api/services/wallets.mjs +6 -0
- package/public-api/services/wallets.mjs.map +1 -1
- package/resources/accounts.d.mts +182 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +182 -4
- package/resources/accounts.d.ts.map +1 -1
- package/resources/apps/allowlist.d.mts +81 -0
- package/resources/apps/allowlist.d.mts.map +1 -0
- package/resources/apps/allowlist.d.ts +81 -0
- package/resources/apps/allowlist.d.ts.map +1 -0
- package/resources/apps/allowlist.js +56 -0
- package/resources/apps/allowlist.js.map +1 -0
- package/resources/apps/allowlist.mjs +52 -0
- package/resources/apps/allowlist.mjs.map +1 -0
- package/resources/apps/apps.d.mts +238 -0
- package/resources/apps/apps.d.mts.map +1 -0
- package/resources/apps/apps.d.ts +238 -0
- package/resources/apps/apps.d.ts.map +1 -0
- package/resources/apps/apps.js +44 -0
- package/resources/apps/apps.js.map +1 -0
- package/resources/apps/apps.mjs +39 -0
- package/resources/apps/apps.mjs.map +1 -0
- package/resources/apps/index.d.mts +3 -0
- package/resources/apps/index.d.mts.map +1 -0
- package/resources/apps/index.d.ts +3 -0
- package/resources/apps/index.d.ts.map +1 -0
- package/resources/apps/index.js +9 -0
- package/resources/apps/index.js.map +1 -0
- package/resources/apps/index.mjs +4 -0
- package/resources/apps/index.mjs.map +1 -0
- package/resources/apps.d.mts +1 -151
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +1 -151
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +2 -5
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +1 -3
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +144 -1
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +144 -1
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/index.d.mts +11 -10
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -10
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +2815 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +2815 -31
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js +156 -0
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs +156 -0
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +45 -2
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +45 -2
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +18 -1
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +18 -1
- 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 +63 -56
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +63 -56
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +3 -0
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +3 -0
- package/resources/policies.mjs.map +1 -1
- package/resources/transactions.d.mts +3 -0
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +3 -0
- 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 +50 -47
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +50 -47
- 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/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 +9 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +9 -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 +126 -69
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +126 -69
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +11 -5
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +11 -5
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +319 -283
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +319 -283
- 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 +26 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +26 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +196 -37
- package/src/index.ts +10 -0
- package/src/public-api/PrivyClient.ts +7 -0
- package/src/public-api/services/apps.ts +85 -0
- package/src/public-api/services/policies.ts +15 -1
- package/src/public-api/services/wallets.ts +14 -0
- package/src/resources/accounts.ts +217 -3
- package/src/resources/apps/allowlist.ts +126 -0
- package/src/resources/apps/apps.ts +391 -0
- package/src/resources/apps/index.ts +20 -0
- package/src/resources/apps.ts +1 -257
- package/src/resources/client-auth.ts +202 -0
- package/src/resources/index.ts +93 -21
- package/src/resources/intents.ts +4579 -40
- package/src/resources/key-quorums.ts +50 -2
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +83 -76
- package/src/resources/transactions.ts +3 -0
- package/src/resources/users.ts +66 -63
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +4 -2
- package/src/resources/wallets/transactions.ts +10 -4
- package/src/resources/wallets/wallets.ts +171 -93
- package/src/resources/webhooks.ts +454 -438
- package/src/resources/yield.ts +39 -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.ts
CHANGED
|
@@ -1,128 +1,209 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as IntentsAPI from "./intents.js";
|
|
2
3
|
import * as UsersAPI from "./users.js";
|
|
3
4
|
export declare class Webhooks extends APIResource {
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
|
-
* Payload for the
|
|
7
|
+
* Payload for the intent.created webhook event.
|
|
7
8
|
*/
|
|
8
|
-
export interface
|
|
9
|
+
export interface IntentCreatedWebhookPayload {
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* Unix timestamp when the intent was created.
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
created_at: number;
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Unix timestamp when the intent expires.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Payload for the user.authenticated webhook event.
|
|
20
|
-
*/
|
|
21
|
-
export interface UserAuthenticatedWebhookPayload {
|
|
17
|
+
expires_at: number;
|
|
22
18
|
/**
|
|
23
|
-
*
|
|
19
|
+
* The unique ID of the intent.
|
|
24
20
|
*/
|
|
25
|
-
|
|
21
|
+
intent_id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Type of intent.
|
|
24
|
+
*/
|
|
25
|
+
intent_type: IntentsAPI.IntentType;
|
|
26
|
+
/**
|
|
27
|
+
* The current status of the intent.
|
|
28
|
+
*/
|
|
29
|
+
status: string;
|
|
26
30
|
/**
|
|
27
31
|
* The type of webhook event.
|
|
28
32
|
*/
|
|
29
|
-
type: '
|
|
33
|
+
type: 'intent.created';
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Key quorums that can authorize this intent.
|
|
32
36
|
*/
|
|
33
|
-
|
|
37
|
+
authorization_details?: Array<IntentsAPI.IntentAuthorization>;
|
|
38
|
+
/**
|
|
39
|
+
* Display name of the user who created the intent.
|
|
40
|
+
*/
|
|
41
|
+
created_by_display_name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The ID of the user who created the intent.
|
|
44
|
+
*/
|
|
45
|
+
created_by_id?: string;
|
|
34
46
|
}
|
|
35
47
|
/**
|
|
36
|
-
* Payload for the
|
|
48
|
+
* Payload for the intent.authorized webhook event.
|
|
37
49
|
*/
|
|
38
|
-
export interface
|
|
50
|
+
export interface IntentAuthorizedWebhookPayload {
|
|
39
51
|
/**
|
|
40
|
-
*
|
|
52
|
+
* Unix timestamp when the authorization was recorded.
|
|
41
53
|
*/
|
|
42
|
-
|
|
54
|
+
authorized_at: number;
|
|
55
|
+
/**
|
|
56
|
+
* Unix timestamp when the intent was created.
|
|
57
|
+
*/
|
|
58
|
+
created_at: number;
|
|
59
|
+
/**
|
|
60
|
+
* Unix timestamp when the intent expires.
|
|
61
|
+
*/
|
|
62
|
+
expires_at: number;
|
|
63
|
+
/**
|
|
64
|
+
* The unique ID of the intent.
|
|
65
|
+
*/
|
|
66
|
+
intent_id: string;
|
|
67
|
+
/**
|
|
68
|
+
* Type of intent.
|
|
69
|
+
*/
|
|
70
|
+
intent_type: IntentsAPI.IntentType;
|
|
71
|
+
/**
|
|
72
|
+
* A leaf member (user or key) of a nested key quorum in an intent authorization.
|
|
73
|
+
*/
|
|
74
|
+
member: IntentsAPI.IntentAuthorizationKeyQuorumMember;
|
|
75
|
+
/**
|
|
76
|
+
* The current status of the intent.
|
|
77
|
+
*/
|
|
78
|
+
status: string;
|
|
43
79
|
/**
|
|
44
80
|
* The type of webhook event.
|
|
45
81
|
*/
|
|
46
|
-
type: '
|
|
82
|
+
type: 'intent.authorized';
|
|
47
83
|
/**
|
|
48
|
-
*
|
|
84
|
+
* Display name of the user who created the intent.
|
|
49
85
|
*/
|
|
50
|
-
|
|
86
|
+
created_by_display_name?: string;
|
|
87
|
+
/**
|
|
88
|
+
* The ID of the user who created the intent.
|
|
89
|
+
*/
|
|
90
|
+
created_by_id?: string;
|
|
51
91
|
}
|
|
52
92
|
/**
|
|
53
|
-
* Payload for the
|
|
93
|
+
* Payload for the intent.executed webhook event.
|
|
54
94
|
*/
|
|
55
|
-
export interface
|
|
95
|
+
export interface IntentExecutedWebhookPayload {
|
|
56
96
|
/**
|
|
57
|
-
*
|
|
97
|
+
* Result of the successful intent execution.
|
|
58
98
|
*/
|
|
59
|
-
|
|
99
|
+
action_result: IntentsAPI.BaseActionResult;
|
|
100
|
+
/**
|
|
101
|
+
* Unix timestamp when the intent was created.
|
|
102
|
+
*/
|
|
103
|
+
created_at: number;
|
|
104
|
+
/**
|
|
105
|
+
* Unix timestamp when the intent expires.
|
|
106
|
+
*/
|
|
107
|
+
expires_at: number;
|
|
108
|
+
/**
|
|
109
|
+
* The unique ID of the intent.
|
|
110
|
+
*/
|
|
111
|
+
intent_id: string;
|
|
112
|
+
/**
|
|
113
|
+
* Type of intent.
|
|
114
|
+
*/
|
|
115
|
+
intent_type: IntentsAPI.IntentType;
|
|
116
|
+
/**
|
|
117
|
+
* The current status of the intent.
|
|
118
|
+
*/
|
|
119
|
+
status: string;
|
|
60
120
|
/**
|
|
61
121
|
* The type of webhook event.
|
|
62
122
|
*/
|
|
63
|
-
type: '
|
|
123
|
+
type: 'intent.executed';
|
|
64
124
|
/**
|
|
65
|
-
*
|
|
125
|
+
* Display name of the user who created the intent.
|
|
66
126
|
*/
|
|
67
|
-
|
|
127
|
+
created_by_display_name?: string;
|
|
128
|
+
/**
|
|
129
|
+
* The ID of the user who created the intent.
|
|
130
|
+
*/
|
|
131
|
+
created_by_id?: string;
|
|
68
132
|
}
|
|
69
133
|
/**
|
|
70
|
-
* Payload for the
|
|
134
|
+
* Payload for the intent.failed webhook event.
|
|
71
135
|
*/
|
|
72
|
-
export interface
|
|
136
|
+
export interface IntentFailedWebhookPayload {
|
|
73
137
|
/**
|
|
74
|
-
*
|
|
138
|
+
* Result of the failed intent execution.
|
|
75
139
|
*/
|
|
76
|
-
|
|
140
|
+
action_result: IntentsAPI.BaseActionResult;
|
|
141
|
+
/**
|
|
142
|
+
* Unix timestamp when the intent was created.
|
|
143
|
+
*/
|
|
144
|
+
created_at: number;
|
|
145
|
+
/**
|
|
146
|
+
* Unix timestamp when the intent expires.
|
|
147
|
+
*/
|
|
148
|
+
expires_at: number;
|
|
149
|
+
/**
|
|
150
|
+
* The unique ID of the intent.
|
|
151
|
+
*/
|
|
152
|
+
intent_id: string;
|
|
153
|
+
/**
|
|
154
|
+
* Type of intent.
|
|
155
|
+
*/
|
|
156
|
+
intent_type: IntentsAPI.IntentType;
|
|
157
|
+
/**
|
|
158
|
+
* The current status of the intent.
|
|
159
|
+
*/
|
|
160
|
+
status: string;
|
|
77
161
|
/**
|
|
78
162
|
* The type of webhook event.
|
|
79
163
|
*/
|
|
80
|
-
type: '
|
|
164
|
+
type: 'intent.failed';
|
|
81
165
|
/**
|
|
82
|
-
*
|
|
166
|
+
* Display name of the user who created the intent.
|
|
83
167
|
*/
|
|
84
|
-
|
|
168
|
+
created_by_display_name?: string;
|
|
169
|
+
/**
|
|
170
|
+
* The ID of the user who created the intent.
|
|
171
|
+
*/
|
|
172
|
+
created_by_id?: string;
|
|
85
173
|
}
|
|
86
174
|
/**
|
|
87
|
-
* Payload for the
|
|
175
|
+
* Payload for the mfa.enabled webhook event.
|
|
88
176
|
*/
|
|
89
|
-
export interface
|
|
177
|
+
export interface MfaEnabledWebhookPayload {
|
|
90
178
|
/**
|
|
91
|
-
*
|
|
179
|
+
* The MFA method that was enabled.
|
|
92
180
|
*/
|
|
93
|
-
|
|
94
|
-
deletedUser: true;
|
|
95
|
-
fromUser: UserTransferredAccountWebhookPayload.FromUser;
|
|
181
|
+
method: 'sms' | 'totp' | 'passkey';
|
|
96
182
|
/**
|
|
97
|
-
*
|
|
183
|
+
* The type of webhook event.
|
|
98
184
|
*/
|
|
99
|
-
|
|
185
|
+
type: 'mfa.enabled';
|
|
100
186
|
/**
|
|
101
|
-
* The
|
|
187
|
+
* The ID of the user who enabled MFA.
|
|
102
188
|
*/
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
export declare namespace UserTransferredAccountWebhookPayload {
|
|
106
|
-
interface FromUser {
|
|
107
|
-
id: string;
|
|
108
|
-
}
|
|
189
|
+
user_id: string;
|
|
109
190
|
}
|
|
110
191
|
/**
|
|
111
|
-
* Payload for the
|
|
192
|
+
* Payload for the mfa.disabled webhook event.
|
|
112
193
|
*/
|
|
113
|
-
export interface
|
|
194
|
+
export interface MfaDisabledWebhookPayload {
|
|
114
195
|
/**
|
|
115
|
-
* The
|
|
196
|
+
* The MFA method that was disabled.
|
|
116
197
|
*/
|
|
117
|
-
|
|
198
|
+
method: 'sms' | 'totp' | 'passkey';
|
|
118
199
|
/**
|
|
119
|
-
*
|
|
200
|
+
* The type of webhook event.
|
|
120
201
|
*/
|
|
121
|
-
|
|
202
|
+
type: 'mfa.disabled';
|
|
122
203
|
/**
|
|
123
|
-
*
|
|
204
|
+
* The ID of the user who disabled MFA.
|
|
124
205
|
*/
|
|
125
|
-
|
|
206
|
+
user_id: string;
|
|
126
207
|
}
|
|
127
208
|
/**
|
|
128
209
|
* Payload for the transaction.broadcasted webhook event.
|
|
@@ -332,6 +413,148 @@ export interface TransactionProviderErrorWebhookPayload {
|
|
|
332
413
|
*/
|
|
333
414
|
wallet_id: string;
|
|
334
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Payload for the user_operation.completed webhook event.
|
|
418
|
+
*/
|
|
419
|
+
export interface UserOperationCompletedWebhookPayload {
|
|
420
|
+
actual_gas_cost: string;
|
|
421
|
+
actual_gas_used: string;
|
|
422
|
+
block_number: number;
|
|
423
|
+
caip2: string;
|
|
424
|
+
log_index: number;
|
|
425
|
+
nonce: string;
|
|
426
|
+
paymaster: string | null;
|
|
427
|
+
sender: string;
|
|
428
|
+
success: boolean;
|
|
429
|
+
transaction_hash: string;
|
|
430
|
+
/**
|
|
431
|
+
* The type of webhook event.
|
|
432
|
+
*/
|
|
433
|
+
type: 'user_operation.completed';
|
|
434
|
+
user_op_hash: string;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Payload for the user.created webhook event.
|
|
438
|
+
*/
|
|
439
|
+
export interface UserCreatedWebhookPayload {
|
|
440
|
+
/**
|
|
441
|
+
* The type of webhook event.
|
|
442
|
+
*/
|
|
443
|
+
type: 'user.created';
|
|
444
|
+
/**
|
|
445
|
+
* A Privy user object.
|
|
446
|
+
*/
|
|
447
|
+
user: UsersAPI.User;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Payload for the user.authenticated webhook event.
|
|
451
|
+
*/
|
|
452
|
+
export interface UserAuthenticatedWebhookPayload {
|
|
453
|
+
/**
|
|
454
|
+
* A linked account for the user.
|
|
455
|
+
*/
|
|
456
|
+
account: UsersAPI.LinkedAccount;
|
|
457
|
+
/**
|
|
458
|
+
* The type of webhook event.
|
|
459
|
+
*/
|
|
460
|
+
type: 'user.authenticated';
|
|
461
|
+
/**
|
|
462
|
+
* A Privy user object.
|
|
463
|
+
*/
|
|
464
|
+
user: UsersAPI.User;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Payload for the user.linked_account webhook event.
|
|
468
|
+
*/
|
|
469
|
+
export interface UserLinkedAccountWebhookPayload {
|
|
470
|
+
/**
|
|
471
|
+
* A linked account for the user.
|
|
472
|
+
*/
|
|
473
|
+
account: UsersAPI.LinkedAccount;
|
|
474
|
+
/**
|
|
475
|
+
* The type of webhook event.
|
|
476
|
+
*/
|
|
477
|
+
type: 'user.linked_account';
|
|
478
|
+
/**
|
|
479
|
+
* A Privy user object.
|
|
480
|
+
*/
|
|
481
|
+
user: UsersAPI.User;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Payload for the user.unlinked_account webhook event.
|
|
485
|
+
*/
|
|
486
|
+
export interface UserUnlinkedAccountWebhookPayload {
|
|
487
|
+
/**
|
|
488
|
+
* A linked account for the user.
|
|
489
|
+
*/
|
|
490
|
+
account: UsersAPI.LinkedAccount;
|
|
491
|
+
/**
|
|
492
|
+
* The type of webhook event.
|
|
493
|
+
*/
|
|
494
|
+
type: 'user.unlinked_account';
|
|
495
|
+
/**
|
|
496
|
+
* A Privy user object.
|
|
497
|
+
*/
|
|
498
|
+
user: UsersAPI.User;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Payload for the user.updated_account webhook event.
|
|
502
|
+
*/
|
|
503
|
+
export interface UserUpdatedAccountWebhookPayload {
|
|
504
|
+
/**
|
|
505
|
+
* A linked account for the user.
|
|
506
|
+
*/
|
|
507
|
+
account: UsersAPI.LinkedAccount;
|
|
508
|
+
/**
|
|
509
|
+
* The type of webhook event.
|
|
510
|
+
*/
|
|
511
|
+
type: 'user.updated_account';
|
|
512
|
+
/**
|
|
513
|
+
* A Privy user object.
|
|
514
|
+
*/
|
|
515
|
+
user: UsersAPI.User;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Payload for the user.transferred_account webhook event.
|
|
519
|
+
*/
|
|
520
|
+
export interface UserTransferredAccountWebhookPayload {
|
|
521
|
+
/**
|
|
522
|
+
* A linked account for the user.
|
|
523
|
+
*/
|
|
524
|
+
account: UsersAPI.LinkedAccount;
|
|
525
|
+
deletedUser: true;
|
|
526
|
+
fromUser: UserTransferredAccountWebhookPayload.FromUser;
|
|
527
|
+
/**
|
|
528
|
+
* A Privy user object.
|
|
529
|
+
*/
|
|
530
|
+
toUser: UsersAPI.User;
|
|
531
|
+
/**
|
|
532
|
+
* The type of webhook event.
|
|
533
|
+
*/
|
|
534
|
+
type: 'user.transferred_account';
|
|
535
|
+
}
|
|
536
|
+
export declare namespace UserTransferredAccountWebhookPayload {
|
|
537
|
+
interface FromUser {
|
|
538
|
+
id: string;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Payload for the user.wallet_created webhook event.
|
|
543
|
+
*/
|
|
544
|
+
export interface UserWalletCreatedWebhookPayload {
|
|
545
|
+
/**
|
|
546
|
+
* The type of webhook event.
|
|
547
|
+
*/
|
|
548
|
+
type: 'user.wallet_created';
|
|
549
|
+
/**
|
|
550
|
+
* A Privy user object.
|
|
551
|
+
*/
|
|
552
|
+
user: UsersAPI.User;
|
|
553
|
+
/**
|
|
554
|
+
* Base schema for wallet accounts linked to the user.
|
|
555
|
+
*/
|
|
556
|
+
wallet: UsersAPI.LinkedAccountBaseWallet;
|
|
557
|
+
}
|
|
335
558
|
/**
|
|
336
559
|
* Payload for the wallet.funds_deposited webhook event.
|
|
337
560
|
*/
|
|
@@ -606,210 +829,60 @@ export interface WalletRecoveredWebhookPayload {
|
|
|
606
829
|
wallet_id: string;
|
|
607
830
|
}
|
|
608
831
|
/**
|
|
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.
|
|
832
|
+
* Payload for the yield.deposit.confirmed webhook event.
|
|
627
833
|
*/
|
|
628
|
-
export interface
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
834
|
+
export interface YieldDepositConfirmedWebhookPayload {
|
|
835
|
+
assets: string;
|
|
836
|
+
caip2: string;
|
|
837
|
+
owner: string;
|
|
838
|
+
sender: string;
|
|
839
|
+
shares: string;
|
|
633
840
|
/**
|
|
634
841
|
* The type of webhook event.
|
|
635
842
|
*/
|
|
636
|
-
type: '
|
|
637
|
-
|
|
638
|
-
* The ID of the user who disabled MFA.
|
|
639
|
-
*/
|
|
640
|
-
user_id: string;
|
|
843
|
+
type: 'yield.deposit.confirmed';
|
|
844
|
+
vault_address: string;
|
|
641
845
|
}
|
|
642
846
|
/**
|
|
643
|
-
* Payload for the
|
|
847
|
+
* Payload for the yield.withdraw.confirmed webhook event.
|
|
644
848
|
*/
|
|
645
|
-
export interface
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
849
|
+
export interface YieldWithdrawConfirmedWebhookPayload {
|
|
850
|
+
assets: string;
|
|
851
|
+
caip2: string;
|
|
852
|
+
owner: string;
|
|
853
|
+
receiver: string;
|
|
854
|
+
sender: string;
|
|
855
|
+
shares: string;
|
|
650
856
|
/**
|
|
651
857
|
* The type of webhook event.
|
|
652
858
|
*/
|
|
653
|
-
type: '
|
|
654
|
-
|
|
655
|
-
* The ID of the user.
|
|
656
|
-
*/
|
|
657
|
-
user_id: string;
|
|
859
|
+
type: 'yield.withdraw.confirmed';
|
|
860
|
+
vault_address: string;
|
|
658
861
|
}
|
|
659
862
|
/**
|
|
660
|
-
* Payload for the
|
|
863
|
+
* Payload for the yield.claim.confirmed webhook event.
|
|
661
864
|
*/
|
|
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';
|
|
865
|
+
export interface YieldClaimConfirmedWebhookPayload {
|
|
866
|
+
caip2: string;
|
|
867
|
+
rewards: Array<YieldClaimConfirmedWebhookPayload.Reward>;
|
|
868
|
+
transaction_id: string;
|
|
671
869
|
/**
|
|
672
870
|
* The type of webhook event.
|
|
673
871
|
*/
|
|
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;
|
|
872
|
+
type: 'yield.claim.confirmed';
|
|
873
|
+
wallet_id: string;
|
|
683
874
|
}
|
|
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';
|
|
875
|
+
export declare namespace YieldClaimConfirmedWebhookPayload {
|
|
876
|
+
interface Reward {
|
|
877
|
+
amount: string;
|
|
878
|
+
token_address: string;
|
|
879
|
+
token_symbol: string;
|
|
811
880
|
}
|
|
812
881
|
}
|
|
882
|
+
/**
|
|
883
|
+
* Union of all webhook payload schemas.
|
|
884
|
+
*/
|
|
885
|
+
export type WebhookPayload = UserCreatedWebhookPayload | UserAuthenticatedWebhookPayload | UserLinkedAccountWebhookPayload | UserUnlinkedAccountWebhookPayload | UserUpdatedAccountWebhookPayload | UserTransferredAccountWebhookPayload | UserWalletCreatedWebhookPayload | TransactionBroadcastedWebhookPayload | TransactionConfirmedWebhookPayload | TransactionExecutionRevertedWebhookPayload | TransactionStillPendingWebhookPayload | TransactionFailedWebhookPayload | TransactionReplacedWebhookPayload | TransactionProviderErrorWebhookPayload | FundsDepositedWebhookPayload | FundsWithdrawnWebhookPayload | PrivateKeyExportWebhookPayload | WalletRecoverySetupWebhookPayload | WalletRecoveredWebhookPayload | MfaEnabledWebhookPayload | MfaDisabledWebhookPayload | YieldDepositConfirmedWebhookPayload | YieldWithdrawConfirmedWebhookPayload | YieldClaimConfirmedWebhookPayload | UserOperationCompletedWebhookPayload | IntentCreatedWebhookPayload | IntentAuthorizedWebhookPayload | IntentExecutedWebhookPayload | IntentFailedWebhookPayload;
|
|
813
886
|
/**
|
|
814
887
|
* Payload for the kraken_embed.quote_executed webhook event.
|
|
815
888
|
*/
|
|
@@ -934,44 +1007,7 @@ export interface KrakenEmbedUserClosedWebhookPayload {
|
|
|
934
1007
|
*/
|
|
935
1008
|
user_id: string;
|
|
936
1009
|
}
|
|
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
1010
|
export declare namespace Webhooks {
|
|
975
|
-
export { type
|
|
1011
|
+
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 FundsDepositedWebhookPayload as FundsDepositedWebhookPayload, type FundsWithdrawnWebhookPayload as FundsWithdrawnWebhookPayload, type PrivateKeyExportWebhookPayload as PrivateKeyExportWebhookPayload, 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
1012
|
}
|
|
977
1013
|
//# sourceMappingURL=webhooks.d.ts.map
|