@privy-io/api-types 0.9.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.
- package/CHANGELOG.md +38 -0
- package/client.d.mts +33 -30
- package/client.d.mts.map +1 -1
- package/client.d.ts +33 -30
- package/client.d.ts.map +1 -1
- package/client.js +22 -8
- package/client.js.map +1 -1
- package/client.mjs +23 -9
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +128 -86
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +128 -86
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +43 -43
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +43 -43
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +169 -135
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +169 -135
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +646 -644
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +646 -644
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +114 -114
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +114 -114
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/funding.d.mts +42 -42
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +42 -42
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +19 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +19 -18
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +269 -265
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +269 -265
- package/resources/intents.d.ts.map +1 -1
- package/resources/key-quorums.d.mts +20 -20
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +20 -20
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/kraken-embed.d.mts +12 -20
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +12 -20
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/organizations.d.mts +65 -0
- package/resources/organizations.d.mts.map +1 -0
- package/resources/organizations.d.ts +65 -0
- package/resources/organizations.d.ts.map +1 -0
- package/resources/organizations.js +9 -0
- package/resources/organizations.js.map +1 -0
- package/resources/organizations.mjs +5 -0
- package/resources/organizations.mjs.map +1 -0
- package/resources/policies.d.mts +258 -240
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +258 -240
- package/resources/policies.d.ts.map +1 -1
- package/resources/shared.d.mts +28 -28
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +28 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +6 -9
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +6 -9
- package/resources/swaps.d.ts.map +1 -1
- package/resources/swaps.js.map +1 -1
- package/resources/swaps.mjs.map +1 -1
- package/resources/transactions.d.mts +53 -53
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +53 -53
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +468 -459
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +468 -459
- package/resources/users.d.ts.map +1 -1
- package/resources/wallet-actions.d.mts +302 -145
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +302 -145
- package/resources/wallet-actions.d.ts.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 +7 -2
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +7 -2
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/wallets.d.mts +1424 -1227
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1424 -1227
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +4 -1
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +4 -1
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +935 -877
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +935 -877
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/yield.d.mts +157 -157
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +157 -157
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +594 -516
- package/src/internal/types.ts +6 -8
- package/src/resources/accounts.ts +157 -103
- package/src/resources/aggregations.ts +55 -55
- package/src/resources/apps.ts +221 -178
- package/src/resources/client-auth.ts +887 -887
- package/src/resources/embedded-wallets.ts +150 -150
- package/src/resources/funding.ts +66 -66
- package/src/resources/index.ts +504 -475
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +23 -23
- package/src/resources/kraken-embed.ts +14 -22
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +379 -352
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +5 -10
- package/src/resources/transactions.ts +86 -86
- package/src/resources/users.ts +707 -696
- package/src/resources/wallet-actions.ts +392 -185
- package/src/resources/wallets/index.ts +157 -148
- package/src/resources/wallets/transactions.ts +18 -3
- package/src/resources/wallets/wallets.ts +1937 -1686
- package/src/resources/webhooks.ts +1172 -1100
- package/src/resources/yield.ts +188 -188
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -4,55 +4,6 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
|
|
5
5
|
export class WalletActions extends APIResource {}
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Type of wallet action
|
|
9
|
-
*/
|
|
10
|
-
export type WalletActionType =
|
|
11
|
-
| 'swap'
|
|
12
|
-
| 'transfer'
|
|
13
|
-
| 'earn_deposit'
|
|
14
|
-
| 'earn_withdraw'
|
|
15
|
-
| 'earn_incentive_claim';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Status of a wallet action.
|
|
19
|
-
*/
|
|
20
|
-
export type WalletActionStatus = 'pending' | 'succeeded' | 'rejected' | 'failed';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Type of a wallet action step.
|
|
24
|
-
*/
|
|
25
|
-
export type WalletActionStepType = 'evm_transaction' | 'evm_user_operation';
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Status of an EVM step in a wallet action.
|
|
29
|
-
*/
|
|
30
|
-
export type EvmWalletActionStepStatus =
|
|
31
|
-
| 'preparing'
|
|
32
|
-
| 'queued'
|
|
33
|
-
| 'pending'
|
|
34
|
-
| 'retrying'
|
|
35
|
-
| 'confirmed'
|
|
36
|
-
| 'rejected'
|
|
37
|
-
| 'reverted'
|
|
38
|
-
| 'replaced'
|
|
39
|
-
| 'abandoned';
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
43
|
-
*/
|
|
44
|
-
export interface FailureReason {
|
|
45
|
-
/**
|
|
46
|
-
* Human-readable failure message.
|
|
47
|
-
*/
|
|
48
|
-
message: string;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Additional error details, if available.
|
|
52
|
-
*/
|
|
53
|
-
details?: unknown;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
7
|
/**
|
|
57
8
|
* A wallet action step consisting of an EVM transaction.
|
|
58
9
|
*/
|
|
@@ -121,21 +72,55 @@ export interface EvmUserOperationWalletActionStep {
|
|
|
121
72
|
}
|
|
122
73
|
|
|
123
74
|
/**
|
|
124
|
-
*
|
|
75
|
+
* Status of an EVM step in a wallet action.
|
|
76
|
+
*/
|
|
77
|
+
export type EvmWalletActionStepStatus =
|
|
78
|
+
| 'preparing'
|
|
79
|
+
| 'queued'
|
|
80
|
+
| 'pending'
|
|
81
|
+
| 'retrying'
|
|
82
|
+
| 'confirmed'
|
|
83
|
+
| 'rejected'
|
|
84
|
+
| 'reverted'
|
|
85
|
+
| 'replaced'
|
|
86
|
+
| 'abandoned';
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Asset metadata for an earn vault position.
|
|
125
90
|
*/
|
|
126
|
-
export
|
|
91
|
+
export interface EarnAsset {
|
|
92
|
+
/**
|
|
93
|
+
* Token contract address.
|
|
94
|
+
*/
|
|
95
|
+
address: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Number of decimals for the asset (e.g. 6 for USDC).
|
|
99
|
+
*/
|
|
100
|
+
decimals: number;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Lowercase token symbol (e.g. "usdc").
|
|
104
|
+
*/
|
|
105
|
+
symbol: string;
|
|
106
|
+
}
|
|
127
107
|
|
|
128
108
|
/**
|
|
129
|
-
* Response for
|
|
109
|
+
* Response for an earn deposit action.
|
|
130
110
|
*/
|
|
131
|
-
export interface
|
|
111
|
+
export interface EarnDepositActionResponse {
|
|
132
112
|
/**
|
|
133
113
|
* The ID of the wallet action.
|
|
134
114
|
*/
|
|
135
115
|
id: string;
|
|
136
116
|
|
|
137
117
|
/**
|
|
138
|
-
*
|
|
118
|
+
* Underlying asset token address.
|
|
119
|
+
*/
|
|
120
|
+
asset_address: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* CAIP-2 chain identifier.
|
|
139
124
|
*/
|
|
140
125
|
caip2: string;
|
|
141
126
|
|
|
@@ -145,37 +130,55 @@ export interface SwapActionResponse {
|
|
|
145
130
|
created_at: string;
|
|
146
131
|
|
|
147
132
|
/**
|
|
148
|
-
*
|
|
133
|
+
* Base-unit amount of asset deposited (e.g. "1500000").
|
|
149
134
|
*/
|
|
150
|
-
|
|
135
|
+
raw_amount: string;
|
|
151
136
|
|
|
152
137
|
/**
|
|
153
|
-
*
|
|
138
|
+
* Vault shares received in base units. Populated after on-chain confirmation.
|
|
154
139
|
*/
|
|
155
|
-
|
|
140
|
+
share_amount: string | null;
|
|
156
141
|
|
|
157
142
|
/**
|
|
158
|
-
*
|
|
143
|
+
* Status of a wallet action.
|
|
159
144
|
*/
|
|
160
|
-
|
|
145
|
+
status: WalletActionStatus;
|
|
146
|
+
|
|
147
|
+
type: 'earn_deposit';
|
|
161
148
|
|
|
162
149
|
/**
|
|
163
|
-
*
|
|
150
|
+
* ERC-4626 vault contract address.
|
|
164
151
|
*/
|
|
165
|
-
|
|
152
|
+
vault_address: string;
|
|
166
153
|
|
|
167
154
|
/**
|
|
168
|
-
*
|
|
155
|
+
* The vault ID.
|
|
169
156
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
type: 'swap';
|
|
157
|
+
vault_id: string;
|
|
173
158
|
|
|
174
159
|
/**
|
|
175
160
|
* The ID of the wallet involved in the action.
|
|
176
161
|
*/
|
|
177
162
|
wallet_id: string;
|
|
178
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
|
|
166
|
+
* the token is known in the asset registry.
|
|
167
|
+
*/
|
|
168
|
+
amount?: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
172
|
+
* the asset registry.
|
|
173
|
+
*/
|
|
174
|
+
asset?: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
178
|
+
* present when the token is known in the asset registry.
|
|
179
|
+
*/
|
|
180
|
+
decimals?: number;
|
|
181
|
+
|
|
179
182
|
/**
|
|
180
183
|
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
181
184
|
*/
|
|
@@ -188,45 +191,58 @@ export interface SwapActionResponse {
|
|
|
188
191
|
}
|
|
189
192
|
|
|
190
193
|
/**
|
|
191
|
-
*
|
|
194
|
+
* Input for depositing assets into an ERC-4626 vault. Exactly one of `amount` or
|
|
195
|
+
* `raw_amount` must be provided.
|
|
192
196
|
*/
|
|
193
|
-
export interface
|
|
197
|
+
export interface EarnDepositRequestBody {
|
|
194
198
|
/**
|
|
195
|
-
* The ID of the
|
|
199
|
+
* The ID of the vault to deposit into.
|
|
196
200
|
*/
|
|
197
|
-
|
|
201
|
+
vault_id: string;
|
|
198
202
|
|
|
199
203
|
/**
|
|
200
|
-
*
|
|
204
|
+
* Human-readable decimal amount to deposit (e.g. "1.5" for 1.5 USDC). Exactly one
|
|
205
|
+
* of `amount` or `raw_amount` must be provided.
|
|
201
206
|
*/
|
|
202
|
-
|
|
207
|
+
amount?: string;
|
|
203
208
|
|
|
204
209
|
/**
|
|
205
|
-
*
|
|
210
|
+
* Amount in smallest unit to deposit (e.g. "1500000" for 1.5 USDC with 6
|
|
211
|
+
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
206
212
|
*/
|
|
207
|
-
|
|
213
|
+
raw_amount?: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Response for an earn incentive claim action.
|
|
218
|
+
*/
|
|
219
|
+
export interface EarnIncentiveClaimActionResponse {
|
|
220
|
+
/**
|
|
221
|
+
* The ID of the wallet action.
|
|
222
|
+
*/
|
|
223
|
+
id: string;
|
|
208
224
|
|
|
209
225
|
/**
|
|
210
|
-
*
|
|
226
|
+
* EVM chain name (e.g. "base", "ethereum").
|
|
211
227
|
*/
|
|
212
|
-
|
|
228
|
+
chain: string;
|
|
213
229
|
|
|
214
230
|
/**
|
|
215
|
-
*
|
|
231
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
216
232
|
*/
|
|
217
|
-
|
|
233
|
+
created_at: string;
|
|
218
234
|
|
|
219
235
|
/**
|
|
220
|
-
*
|
|
236
|
+
* Claimed reward tokens. Populated after the preparation step fetches from Merkl.
|
|
221
237
|
*/
|
|
222
|
-
|
|
238
|
+
rewards: Array<EarnIncetiveClaimRewardEntry> | null;
|
|
223
239
|
|
|
224
240
|
/**
|
|
225
241
|
* Status of a wallet action.
|
|
226
242
|
*/
|
|
227
243
|
status: WalletActionStatus;
|
|
228
244
|
|
|
229
|
-
type: '
|
|
245
|
+
type: 'earn_incentive_claim';
|
|
230
246
|
|
|
231
247
|
/**
|
|
232
248
|
* The ID of the wallet involved in the action.
|
|
@@ -244,6 +260,18 @@ export interface TransferActionResponse {
|
|
|
244
260
|
steps?: Array<WalletActionStep>;
|
|
245
261
|
}
|
|
246
262
|
|
|
263
|
+
/**
|
|
264
|
+
* Input for claiming incentive rewards.
|
|
265
|
+
*/
|
|
266
|
+
export interface EarnIncentiveClaimRequestBody {
|
|
267
|
+
/**
|
|
268
|
+
* The blockchain network on which to perform the incentive claim. Supported chains
|
|
269
|
+
* include: 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and more, along
|
|
270
|
+
* with their respective testnets.
|
|
271
|
+
*/
|
|
272
|
+
chain: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
247
275
|
/**
|
|
248
276
|
* A specific reward token and amount associated with an earn incentive claim.
|
|
249
277
|
*/
|
|
@@ -262,12 +290,17 @@ export interface EarnIncetiveClaimRewardEntry {
|
|
|
262
290
|
* Symbol of the reward token (e.g. "MORPHO").
|
|
263
291
|
*/
|
|
264
292
|
token_symbol: string;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Number of decimal places for the reward token.
|
|
296
|
+
*/
|
|
297
|
+
token_decimals?: number;
|
|
265
298
|
}
|
|
266
299
|
|
|
267
300
|
/**
|
|
268
|
-
* Response for an earn
|
|
301
|
+
* Response for an earn withdraw action.
|
|
269
302
|
*/
|
|
270
|
-
export interface
|
|
303
|
+
export interface EarnWithdrawActionResponse {
|
|
271
304
|
/**
|
|
272
305
|
* The ID of the wallet action.
|
|
273
306
|
*/
|
|
@@ -289,12 +322,12 @@ export interface EarnDepositActionResponse {
|
|
|
289
322
|
created_at: string;
|
|
290
323
|
|
|
291
324
|
/**
|
|
292
|
-
* Base-unit amount of asset
|
|
325
|
+
* Base-unit amount of asset withdrawn (e.g. "1500000").
|
|
293
326
|
*/
|
|
294
327
|
raw_amount: string;
|
|
295
328
|
|
|
296
329
|
/**
|
|
297
|
-
* Vault shares
|
|
330
|
+
* Vault shares burned in base units. Populated after on-chain confirmation.
|
|
298
331
|
*/
|
|
299
332
|
share_amount: string | null;
|
|
300
333
|
|
|
@@ -303,7 +336,7 @@ export interface EarnDepositActionResponse {
|
|
|
303
336
|
*/
|
|
304
337
|
status: WalletActionStatus;
|
|
305
338
|
|
|
306
|
-
type: '
|
|
339
|
+
type: 'earn_withdraw';
|
|
307
340
|
|
|
308
341
|
/**
|
|
309
342
|
* ERC-4626 vault contract address.
|
|
@@ -321,7 +354,7 @@ export interface EarnDepositActionResponse {
|
|
|
321
354
|
wallet_id: string;
|
|
322
355
|
|
|
323
356
|
/**
|
|
324
|
-
* Human-readable decimal amount of asset
|
|
357
|
+
* Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
|
|
325
358
|
* the token is known in the asset registry.
|
|
326
359
|
*/
|
|
327
360
|
amount?: string;
|
|
@@ -350,103 +383,198 @@ export interface EarnDepositActionResponse {
|
|
|
350
383
|
}
|
|
351
384
|
|
|
352
385
|
/**
|
|
353
|
-
*
|
|
386
|
+
* Input for withdrawing assets from an ERC-4626 vault. Exactly one of `amount` or
|
|
387
|
+
* `raw_amount` must be provided.
|
|
354
388
|
*/
|
|
355
|
-
export interface
|
|
389
|
+
export interface EarnWithdrawRequestBody {
|
|
356
390
|
/**
|
|
357
|
-
* The ID of the
|
|
391
|
+
* The ID of the vault to withdraw from.
|
|
392
|
+
*/
|
|
393
|
+
vault_id: string;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Human-readable decimal amount to withdraw (e.g. "1.5" for 1.5 USDC). Exactly one
|
|
397
|
+
* of `amount` or `raw_amount` must be provided.
|
|
398
|
+
*/
|
|
399
|
+
amount?: string;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Amount in smallest unit to withdraw (e.g. "1500000" for 1.5 USDC with 6
|
|
403
|
+
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
404
|
+
*/
|
|
405
|
+
raw_amount?: string;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Query parameters for fetching an earn vault position.
|
|
410
|
+
*/
|
|
411
|
+
export interface EthereumEarnPositionQuery {
|
|
412
|
+
/**
|
|
413
|
+
* The vault ID to get position for.
|
|
414
|
+
*/
|
|
415
|
+
vault_id: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* A wallet's position in an earn vault.
|
|
420
|
+
*/
|
|
421
|
+
export interface EthereumEarnPositionResponse {
|
|
422
|
+
/**
|
|
423
|
+
* Asset metadata for an earn vault position.
|
|
424
|
+
*/
|
|
425
|
+
asset: EarnAsset;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Current asset value in the vault (realtime from ERC-4626), in smallest unit.
|
|
429
|
+
*/
|
|
430
|
+
assets_in_vault: string;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Current vault shares held (realtime from ERC-4626).
|
|
434
|
+
*/
|
|
435
|
+
shares_in_vault: string;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Total amount deposited into the vault, in smallest unit.
|
|
439
|
+
*/
|
|
440
|
+
total_deposited: string;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Total amount withdrawn from the vault, in smallest unit.
|
|
444
|
+
*/
|
|
445
|
+
total_withdrawn: string;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Supported earn provider protocols.
|
|
450
|
+
*/
|
|
451
|
+
export type EthereumEarnProvider = 'morpho' | 'aave';
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Detailed vault information including current APY, liquidity, and asset metadata.
|
|
455
|
+
*/
|
|
456
|
+
export interface EthereumEarnVaultDetailsResponse {
|
|
457
|
+
/**
|
|
458
|
+
* Vault identifier.
|
|
358
459
|
*/
|
|
359
460
|
id: string;
|
|
360
461
|
|
|
361
462
|
/**
|
|
362
|
-
*
|
|
463
|
+
* Annual percentage yield earned by the app from fee wrapper fees, in basis
|
|
464
|
+
* points.
|
|
363
465
|
*/
|
|
364
|
-
|
|
466
|
+
app_apy: number | null;
|
|
365
467
|
|
|
366
468
|
/**
|
|
367
|
-
*
|
|
469
|
+
* Asset metadata for an earn vault position.
|
|
368
470
|
*/
|
|
369
|
-
|
|
471
|
+
asset: EarnAsset;
|
|
370
472
|
|
|
371
473
|
/**
|
|
372
|
-
*
|
|
474
|
+
* Available liquidity in USD.
|
|
373
475
|
*/
|
|
374
|
-
|
|
476
|
+
available_liquidity_usd: number | null;
|
|
375
477
|
|
|
376
478
|
/**
|
|
377
|
-
*
|
|
479
|
+
* CAIP-2 chain identifier (e.g. "eip155:8453").
|
|
378
480
|
*/
|
|
379
|
-
|
|
481
|
+
caip2: string;
|
|
380
482
|
|
|
381
483
|
/**
|
|
382
|
-
*
|
|
484
|
+
* Human-readable vault name from the yield provider.
|
|
383
485
|
*/
|
|
384
|
-
|
|
486
|
+
name: string;
|
|
385
487
|
|
|
386
488
|
/**
|
|
387
|
-
*
|
|
489
|
+
* Supported earn provider protocols.
|
|
388
490
|
*/
|
|
389
|
-
|
|
491
|
+
provider: EthereumEarnProvider;
|
|
390
492
|
|
|
391
|
-
|
|
493
|
+
/**
|
|
494
|
+
* Total value locked in USD.
|
|
495
|
+
*/
|
|
496
|
+
tvl_usd: number | null;
|
|
392
497
|
|
|
393
498
|
/**
|
|
394
|
-
*
|
|
499
|
+
* Current annual percentage yield in basis points (e.g. 500 for 5%). 1 basis point
|
|
500
|
+
* = 0.01%.
|
|
395
501
|
*/
|
|
396
|
-
|
|
502
|
+
user_apy: number | null;
|
|
397
503
|
|
|
398
504
|
/**
|
|
399
|
-
*
|
|
505
|
+
* Onchain vault contract address.
|
|
400
506
|
*/
|
|
401
|
-
|
|
507
|
+
vault_address: string;
|
|
508
|
+
}
|
|
402
509
|
|
|
510
|
+
/**
|
|
511
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
512
|
+
*/
|
|
513
|
+
export interface FailureReason {
|
|
403
514
|
/**
|
|
404
|
-
*
|
|
515
|
+
* Human-readable failure message.
|
|
405
516
|
*/
|
|
406
|
-
|
|
517
|
+
message: string;
|
|
407
518
|
|
|
408
519
|
/**
|
|
409
|
-
*
|
|
410
|
-
* the token is known in the asset registry.
|
|
520
|
+
* Additional error details, if available.
|
|
411
521
|
*/
|
|
412
|
-
|
|
522
|
+
details?: unknown;
|
|
523
|
+
}
|
|
413
524
|
|
|
525
|
+
/**
|
|
526
|
+
* A wallet action step consisting of an SVM (Solana) transaction.
|
|
527
|
+
*/
|
|
528
|
+
export interface SvmTransactionWalletActionStep {
|
|
414
529
|
/**
|
|
415
|
-
*
|
|
416
|
-
* the asset registry.
|
|
530
|
+
* CAIP-2 chain identifier for the Solana network.
|
|
417
531
|
*/
|
|
418
|
-
|
|
532
|
+
caip2: string;
|
|
419
533
|
|
|
420
534
|
/**
|
|
421
|
-
*
|
|
422
|
-
* present when the token is known in the asset registry.
|
|
535
|
+
* Status of an SVM step in a wallet action.
|
|
423
536
|
*/
|
|
424
|
-
|
|
537
|
+
status: SvmWalletActionStepStatus;
|
|
425
538
|
|
|
426
539
|
/**
|
|
427
|
-
*
|
|
540
|
+
* The Solana transaction signature (base58-encoded). Null until broadcast.
|
|
428
541
|
*/
|
|
429
|
-
|
|
542
|
+
transaction_signature: string | null;
|
|
543
|
+
|
|
544
|
+
type: 'svm_transaction';
|
|
430
545
|
|
|
431
546
|
/**
|
|
432
|
-
*
|
|
547
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
433
548
|
*/
|
|
434
|
-
|
|
549
|
+
failure_reason?: FailureReason;
|
|
435
550
|
}
|
|
436
551
|
|
|
437
552
|
/**
|
|
438
|
-
*
|
|
553
|
+
* Status of an SVM step in a wallet action.
|
|
439
554
|
*/
|
|
440
|
-
export
|
|
555
|
+
export type SvmWalletActionStepStatus =
|
|
556
|
+
| 'preparing'
|
|
557
|
+
| 'queued'
|
|
558
|
+
| 'pending'
|
|
559
|
+
| 'confirmed'
|
|
560
|
+
| 'finalized'
|
|
561
|
+
| 'rejected'
|
|
562
|
+
| 'reverted'
|
|
563
|
+
| 'failed';
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Response for a swap action.
|
|
567
|
+
*/
|
|
568
|
+
export interface SwapActionResponse {
|
|
441
569
|
/**
|
|
442
570
|
* The ID of the wallet action.
|
|
443
571
|
*/
|
|
444
572
|
id: string;
|
|
445
573
|
|
|
446
574
|
/**
|
|
447
|
-
*
|
|
575
|
+
* CAIP-2 chain identifier for the swap.
|
|
448
576
|
*/
|
|
449
|
-
|
|
577
|
+
caip2: string;
|
|
450
578
|
|
|
451
579
|
/**
|
|
452
580
|
* ISO 8601 timestamp of when the wallet action was created.
|
|
@@ -454,16 +582,31 @@ export interface EarnIncentiveClaimActionResponse {
|
|
|
454
582
|
created_at: string;
|
|
455
583
|
|
|
456
584
|
/**
|
|
457
|
-
*
|
|
585
|
+
* Exact base-unit amount of input token. Populated after on-chain confirmation.
|
|
458
586
|
*/
|
|
459
|
-
|
|
587
|
+
input_amount: string | null;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Token address or "native" for the token being sold.
|
|
591
|
+
*/
|
|
592
|
+
input_token: string;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Exact base-unit amount of output token. Populated after on-chain confirmation.
|
|
596
|
+
*/
|
|
597
|
+
output_amount: string | null;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Token address or "native" for the token being bought.
|
|
601
|
+
*/
|
|
602
|
+
output_token: string;
|
|
460
603
|
|
|
461
604
|
/**
|
|
462
605
|
* Status of a wallet action.
|
|
463
606
|
*/
|
|
464
607
|
status: WalletActionStatus;
|
|
465
608
|
|
|
466
|
-
type: '
|
|
609
|
+
type: 'swap';
|
|
467
610
|
|
|
468
611
|
/**
|
|
469
612
|
* The ID of the wallet involved in the action.
|
|
@@ -482,92 +625,156 @@ export interface EarnIncentiveClaimActionResponse {
|
|
|
482
625
|
}
|
|
483
626
|
|
|
484
627
|
/**
|
|
485
|
-
* Response for a
|
|
628
|
+
* Response for a transfer action.
|
|
486
629
|
*/
|
|
487
|
-
export
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
| EarnIncentiveClaimActionResponse;
|
|
630
|
+
export interface TransferActionResponse {
|
|
631
|
+
/**
|
|
632
|
+
* The ID of the wallet action.
|
|
633
|
+
*/
|
|
634
|
+
id: string;
|
|
493
635
|
|
|
494
|
-
/**
|
|
495
|
-
* Input for depositing assets into an ERC-4626 vault. Exactly one of `amount` or
|
|
496
|
-
* `raw_amount` must be provided.
|
|
497
|
-
*/
|
|
498
|
-
export interface EarnDepositRequestBody {
|
|
499
636
|
/**
|
|
500
|
-
*
|
|
637
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
501
638
|
*/
|
|
502
|
-
|
|
639
|
+
created_at: string;
|
|
503
640
|
|
|
504
641
|
/**
|
|
505
|
-
*
|
|
506
|
-
* of `amount` or `raw_amount` must be provided.
|
|
642
|
+
* Recipient address.
|
|
507
643
|
*/
|
|
508
|
-
|
|
644
|
+
destination_address: string;
|
|
509
645
|
|
|
510
646
|
/**
|
|
511
|
-
*
|
|
512
|
-
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
647
|
+
* Chain name (e.g. "base", "ethereum").
|
|
513
648
|
*/
|
|
514
|
-
|
|
515
|
-
}
|
|
649
|
+
source_chain: string;
|
|
516
650
|
|
|
517
|
-
/**
|
|
518
|
-
* Input for withdrawing assets from an ERC-4626 vault. Exactly one of `amount` or
|
|
519
|
-
* `raw_amount` must be provided.
|
|
520
|
-
*/
|
|
521
|
-
export interface EarnWithdrawRequestBody {
|
|
522
651
|
/**
|
|
523
|
-
*
|
|
652
|
+
* Status of a wallet action.
|
|
524
653
|
*/
|
|
525
|
-
|
|
654
|
+
status: WalletActionStatus;
|
|
655
|
+
|
|
656
|
+
type: 'transfer';
|
|
526
657
|
|
|
527
658
|
/**
|
|
528
|
-
*
|
|
529
|
-
* of `amount` or `raw_amount` must be provided.
|
|
659
|
+
* The ID of the wallet involved in the action.
|
|
530
660
|
*/
|
|
531
|
-
|
|
661
|
+
wallet_id: string;
|
|
532
662
|
|
|
533
663
|
/**
|
|
534
|
-
* Amount
|
|
535
|
-
*
|
|
664
|
+
* Amount received on the destination chain. Populated immediately for exact_output
|
|
665
|
+
* transfers, or after fill confirmation for exact_input transfers.
|
|
536
666
|
*/
|
|
537
|
-
|
|
538
|
-
}
|
|
667
|
+
destination_amount?: string;
|
|
539
668
|
|
|
540
|
-
/**
|
|
541
|
-
* Input for claiming incentive rewards.
|
|
542
|
-
*/
|
|
543
|
-
export interface EarnIncentiveClaimRequestBody {
|
|
544
669
|
/**
|
|
545
|
-
*
|
|
546
|
-
* include: 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and more, along
|
|
547
|
-
* with their respective testnets.
|
|
670
|
+
* Destination asset for cross-asset transfers. Omitted for same-asset transfers.
|
|
548
671
|
*/
|
|
549
|
-
|
|
672
|
+
destination_asset?: string;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Destination chain for cross-chain transfers. Omitted for same-chain transfers.
|
|
676
|
+
*/
|
|
677
|
+
destination_chain?: string;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
681
|
+
*/
|
|
682
|
+
failure_reason?: FailureReason;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Decimal amount sent on the source chain (e.g. "1.5"). Omitted for exact_output
|
|
686
|
+
* cross-chain transfers until the source amount is determined.
|
|
687
|
+
*/
|
|
688
|
+
source_amount?: string;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
|
|
692
|
+
* with a named asset; omitted for custom-token transfers.
|
|
693
|
+
*/
|
|
694
|
+
source_asset?: string;
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Token contract address (EVM) or mint address (Solana). Present when the transfer
|
|
698
|
+
* was initiated with `asset_address`.
|
|
699
|
+
*/
|
|
700
|
+
source_asset_address?: string;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Number of decimals for the transferred token. Present when the transfer was
|
|
704
|
+
* initiated with `asset_address` and the decimals were resolved on-chain.
|
|
705
|
+
*/
|
|
706
|
+
source_asset_decimals?: number;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
710
|
+
*/
|
|
711
|
+
steps?: Array<WalletActionStep>;
|
|
550
712
|
}
|
|
551
713
|
|
|
714
|
+
/**
|
|
715
|
+
* Response for a wallet action, discriminated on type.
|
|
716
|
+
*/
|
|
717
|
+
export type WalletActionResponse =
|
|
718
|
+
| SwapActionResponse
|
|
719
|
+
| TransferActionResponse
|
|
720
|
+
| EarnDepositActionResponse
|
|
721
|
+
| EarnWithdrawActionResponse
|
|
722
|
+
| EarnIncentiveClaimActionResponse;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Status of a wallet action.
|
|
726
|
+
*/
|
|
727
|
+
export type WalletActionStatus = 'pending' | 'succeeded' | 'rejected' | 'failed';
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* A step within a wallet action, representing a single onchain action.
|
|
731
|
+
*/
|
|
732
|
+
export type WalletActionStep =
|
|
733
|
+
| EvmTransactionWalletActionStep
|
|
734
|
+
| EvmUserOperationWalletActionStep
|
|
735
|
+
| SvmTransactionWalletActionStep;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Type of a wallet action step.
|
|
739
|
+
*/
|
|
740
|
+
export type WalletActionStepType = 'evm_transaction' | 'evm_user_operation' | 'svm_transaction';
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Type of wallet action
|
|
744
|
+
*/
|
|
745
|
+
export type WalletActionType =
|
|
746
|
+
| 'swap'
|
|
747
|
+
| 'transfer'
|
|
748
|
+
| 'earn_deposit'
|
|
749
|
+
| 'earn_withdraw'
|
|
750
|
+
| 'earn_incentive_claim';
|
|
751
|
+
|
|
552
752
|
export declare namespace WalletActions {
|
|
553
753
|
export {
|
|
554
|
-
type WalletActionType as WalletActionType,
|
|
555
|
-
type WalletActionStatus as WalletActionStatus,
|
|
556
|
-
type WalletActionStepType as WalletActionStepType,
|
|
557
|
-
type EvmWalletActionStepStatus as EvmWalletActionStepStatus,
|
|
558
|
-
type FailureReason as FailureReason,
|
|
559
754
|
type EvmTransactionWalletActionStep as EvmTransactionWalletActionStep,
|
|
560
755
|
type EvmUserOperationWalletActionStep as EvmUserOperationWalletActionStep,
|
|
561
|
-
type
|
|
562
|
-
type
|
|
563
|
-
type TransferActionResponse as TransferActionResponse,
|
|
564
|
-
type EarnIncetiveClaimRewardEntry as EarnIncetiveClaimRewardEntry,
|
|
756
|
+
type EvmWalletActionStepStatus as EvmWalletActionStepStatus,
|
|
757
|
+
type EarnAsset as EarnAsset,
|
|
565
758
|
type EarnDepositActionResponse as EarnDepositActionResponse,
|
|
566
|
-
type EarnWithdrawActionResponse as EarnWithdrawActionResponse,
|
|
567
|
-
type EarnIncentiveClaimActionResponse as EarnIncentiveClaimActionResponse,
|
|
568
|
-
type WalletActionResponse as WalletActionResponse,
|
|
569
759
|
type EarnDepositRequestBody as EarnDepositRequestBody,
|
|
570
|
-
type
|
|
760
|
+
type EarnIncentiveClaimActionResponse as EarnIncentiveClaimActionResponse,
|
|
571
761
|
type EarnIncentiveClaimRequestBody as EarnIncentiveClaimRequestBody,
|
|
762
|
+
type EarnIncetiveClaimRewardEntry as EarnIncetiveClaimRewardEntry,
|
|
763
|
+
type EarnWithdrawActionResponse as EarnWithdrawActionResponse,
|
|
764
|
+
type EarnWithdrawRequestBody as EarnWithdrawRequestBody,
|
|
765
|
+
type EthereumEarnPositionQuery as EthereumEarnPositionQuery,
|
|
766
|
+
type EthereumEarnPositionResponse as EthereumEarnPositionResponse,
|
|
767
|
+
type EthereumEarnProvider as EthereumEarnProvider,
|
|
768
|
+
type EthereumEarnVaultDetailsResponse as EthereumEarnVaultDetailsResponse,
|
|
769
|
+
type FailureReason as FailureReason,
|
|
770
|
+
type SvmTransactionWalletActionStep as SvmTransactionWalletActionStep,
|
|
771
|
+
type SvmWalletActionStepStatus as SvmWalletActionStepStatus,
|
|
772
|
+
type SwapActionResponse as SwapActionResponse,
|
|
773
|
+
type TransferActionResponse as TransferActionResponse,
|
|
774
|
+
type WalletActionResponse as WalletActionResponse,
|
|
775
|
+
type WalletActionStatus as WalletActionStatus,
|
|
776
|
+
type WalletActionStep as WalletActionStep,
|
|
777
|
+
type WalletActionStepType as WalletActionStepType,
|
|
778
|
+
type WalletActionType as WalletActionType,
|
|
572
779
|
};
|
|
573
780
|
}
|