@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
|
@@ -1,35 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
export declare class WalletActions extends APIResource {
|
|
3
3
|
}
|
|
4
|
-
/**
|
|
5
|
-
* Type of wallet action
|
|
6
|
-
*/
|
|
7
|
-
export type WalletActionType = 'swap' | 'transfer' | 'earn_deposit' | 'earn_withdraw' | 'earn_incentive_claim';
|
|
8
|
-
/**
|
|
9
|
-
* Status of a wallet action.
|
|
10
|
-
*/
|
|
11
|
-
export type WalletActionStatus = 'pending' | 'succeeded' | 'rejected' | 'failed';
|
|
12
|
-
/**
|
|
13
|
-
* Type of a wallet action step.
|
|
14
|
-
*/
|
|
15
|
-
export type WalletActionStepType = 'evm_transaction' | 'evm_user_operation';
|
|
16
|
-
/**
|
|
17
|
-
* Status of an EVM step in a wallet action.
|
|
18
|
-
*/
|
|
19
|
-
export type EvmWalletActionStepStatus = 'preparing' | 'queued' | 'pending' | 'retrying' | 'confirmed' | 'rejected' | 'reverted' | 'replaced' | 'abandoned';
|
|
20
|
-
/**
|
|
21
|
-
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
22
|
-
*/
|
|
23
|
-
export interface FailureReason {
|
|
24
|
-
/**
|
|
25
|
-
* Human-readable failure message.
|
|
26
|
-
*/
|
|
27
|
-
message: string;
|
|
28
|
-
/**
|
|
29
|
-
* Additional error details, if available.
|
|
30
|
-
*/
|
|
31
|
-
details?: unknown;
|
|
32
|
-
}
|
|
33
4
|
/**
|
|
34
5
|
* A wallet action step consisting of an EVM transaction.
|
|
35
6
|
*/
|
|
@@ -86,19 +57,40 @@ export interface EvmUserOperationWalletActionStep {
|
|
|
86
57
|
failure_reason?: FailureReason;
|
|
87
58
|
}
|
|
88
59
|
/**
|
|
89
|
-
*
|
|
60
|
+
* Status of an EVM step in a wallet action.
|
|
90
61
|
*/
|
|
91
|
-
export type
|
|
62
|
+
export type EvmWalletActionStepStatus = 'preparing' | 'queued' | 'pending' | 'retrying' | 'confirmed' | 'rejected' | 'reverted' | 'replaced' | 'abandoned';
|
|
92
63
|
/**
|
|
93
|
-
*
|
|
64
|
+
* Asset metadata for an earn vault position.
|
|
94
65
|
*/
|
|
95
|
-
export interface
|
|
66
|
+
export interface EarnAsset {
|
|
67
|
+
/**
|
|
68
|
+
* Token contract address.
|
|
69
|
+
*/
|
|
70
|
+
address: string;
|
|
71
|
+
/**
|
|
72
|
+
* Number of decimals for the asset (e.g. 6 for USDC).
|
|
73
|
+
*/
|
|
74
|
+
decimals: number;
|
|
75
|
+
/**
|
|
76
|
+
* Lowercase token symbol (e.g. "usdc").
|
|
77
|
+
*/
|
|
78
|
+
symbol: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Response for an earn deposit action.
|
|
82
|
+
*/
|
|
83
|
+
export interface EarnDepositActionResponse {
|
|
96
84
|
/**
|
|
97
85
|
* The ID of the wallet action.
|
|
98
86
|
*/
|
|
99
87
|
id: string;
|
|
100
88
|
/**
|
|
101
|
-
*
|
|
89
|
+
* Underlying asset token address.
|
|
90
|
+
*/
|
|
91
|
+
asset_address: string;
|
|
92
|
+
/**
|
|
93
|
+
* CAIP-2 chain identifier.
|
|
102
94
|
*/
|
|
103
95
|
caip2: string;
|
|
104
96
|
/**
|
|
@@ -106,30 +98,45 @@ export interface SwapActionResponse {
|
|
|
106
98
|
*/
|
|
107
99
|
created_at: string;
|
|
108
100
|
/**
|
|
109
|
-
*
|
|
101
|
+
* Base-unit amount of asset deposited (e.g. "1500000").
|
|
110
102
|
*/
|
|
111
|
-
|
|
103
|
+
raw_amount: string;
|
|
112
104
|
/**
|
|
113
|
-
*
|
|
105
|
+
* Vault shares received in base units. Populated after on-chain confirmation.
|
|
114
106
|
*/
|
|
115
|
-
|
|
107
|
+
share_amount: string | null;
|
|
116
108
|
/**
|
|
117
|
-
*
|
|
109
|
+
* Status of a wallet action.
|
|
118
110
|
*/
|
|
119
|
-
|
|
111
|
+
status: WalletActionStatus;
|
|
112
|
+
type: 'earn_deposit';
|
|
120
113
|
/**
|
|
121
|
-
*
|
|
114
|
+
* ERC-4626 vault contract address.
|
|
122
115
|
*/
|
|
123
|
-
|
|
116
|
+
vault_address: string;
|
|
124
117
|
/**
|
|
125
|
-
*
|
|
118
|
+
* The vault ID.
|
|
126
119
|
*/
|
|
127
|
-
|
|
128
|
-
type: 'swap';
|
|
120
|
+
vault_id: string;
|
|
129
121
|
/**
|
|
130
122
|
* The ID of the wallet involved in the action.
|
|
131
123
|
*/
|
|
132
124
|
wallet_id: string;
|
|
125
|
+
/**
|
|
126
|
+
* Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
|
|
127
|
+
* the token is known in the asset registry.
|
|
128
|
+
*/
|
|
129
|
+
amount?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
132
|
+
* the asset registry.
|
|
133
|
+
*/
|
|
134
|
+
asset?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
137
|
+
* present when the token is known in the asset registry.
|
|
138
|
+
*/
|
|
139
|
+
decimals?: number;
|
|
133
140
|
/**
|
|
134
141
|
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
135
142
|
*/
|
|
@@ -140,38 +147,50 @@ export interface SwapActionResponse {
|
|
|
140
147
|
steps?: Array<WalletActionStep>;
|
|
141
148
|
}
|
|
142
149
|
/**
|
|
143
|
-
*
|
|
150
|
+
* Input for depositing assets into an ERC-4626 vault. Exactly one of `amount` or
|
|
151
|
+
* `raw_amount` must be provided.
|
|
144
152
|
*/
|
|
145
|
-
export interface
|
|
153
|
+
export interface EarnDepositRequestBody {
|
|
146
154
|
/**
|
|
147
|
-
* The ID of the
|
|
155
|
+
* The ID of the vault to deposit into.
|
|
148
156
|
*/
|
|
149
|
-
|
|
157
|
+
vault_id: string;
|
|
150
158
|
/**
|
|
151
|
-
*
|
|
159
|
+
* Human-readable decimal amount to deposit (e.g. "1.5" for 1.5 USDC). Exactly one
|
|
160
|
+
* of `amount` or `raw_amount` must be provided.
|
|
152
161
|
*/
|
|
153
|
-
|
|
162
|
+
amount?: string;
|
|
154
163
|
/**
|
|
155
|
-
*
|
|
164
|
+
* Amount in smallest unit to deposit (e.g. "1500000" for 1.5 USDC with 6
|
|
165
|
+
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
156
166
|
*/
|
|
157
|
-
|
|
167
|
+
raw_amount?: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Response for an earn incentive claim action.
|
|
171
|
+
*/
|
|
172
|
+
export interface EarnIncentiveClaimActionResponse {
|
|
158
173
|
/**
|
|
159
|
-
*
|
|
174
|
+
* The ID of the wallet action.
|
|
160
175
|
*/
|
|
161
|
-
|
|
176
|
+
id: string;
|
|
162
177
|
/**
|
|
163
|
-
*
|
|
178
|
+
* EVM chain name (e.g. "base", "ethereum").
|
|
164
179
|
*/
|
|
165
|
-
|
|
180
|
+
chain: string;
|
|
166
181
|
/**
|
|
167
|
-
*
|
|
182
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
168
183
|
*/
|
|
169
|
-
|
|
184
|
+
created_at: string;
|
|
185
|
+
/**
|
|
186
|
+
* Claimed reward tokens. Populated after the preparation step fetches from Merkl.
|
|
187
|
+
*/
|
|
188
|
+
rewards: Array<EarnIncetiveClaimRewardEntry> | null;
|
|
170
189
|
/**
|
|
171
190
|
* Status of a wallet action.
|
|
172
191
|
*/
|
|
173
192
|
status: WalletActionStatus;
|
|
174
|
-
type: '
|
|
193
|
+
type: 'earn_incentive_claim';
|
|
175
194
|
/**
|
|
176
195
|
* The ID of the wallet involved in the action.
|
|
177
196
|
*/
|
|
@@ -185,6 +204,17 @@ export interface TransferActionResponse {
|
|
|
185
204
|
*/
|
|
186
205
|
steps?: Array<WalletActionStep>;
|
|
187
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Input for claiming incentive rewards.
|
|
209
|
+
*/
|
|
210
|
+
export interface EarnIncentiveClaimRequestBody {
|
|
211
|
+
/**
|
|
212
|
+
* The blockchain network on which to perform the incentive claim. Supported chains
|
|
213
|
+
* include: 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and more, along
|
|
214
|
+
* with their respective testnets.
|
|
215
|
+
*/
|
|
216
|
+
chain: string;
|
|
217
|
+
}
|
|
188
218
|
/**
|
|
189
219
|
* A specific reward token and amount associated with an earn incentive claim.
|
|
190
220
|
*/
|
|
@@ -201,11 +231,15 @@ export interface EarnIncetiveClaimRewardEntry {
|
|
|
201
231
|
* Symbol of the reward token (e.g. "MORPHO").
|
|
202
232
|
*/
|
|
203
233
|
token_symbol: string;
|
|
234
|
+
/**
|
|
235
|
+
* Number of decimal places for the reward token.
|
|
236
|
+
*/
|
|
237
|
+
token_decimals?: number;
|
|
204
238
|
}
|
|
205
239
|
/**
|
|
206
|
-
* Response for an earn
|
|
240
|
+
* Response for an earn withdraw action.
|
|
207
241
|
*/
|
|
208
|
-
export interface
|
|
242
|
+
export interface EarnWithdrawActionResponse {
|
|
209
243
|
/**
|
|
210
244
|
* The ID of the wallet action.
|
|
211
245
|
*/
|
|
@@ -223,18 +257,18 @@ export interface EarnDepositActionResponse {
|
|
|
223
257
|
*/
|
|
224
258
|
created_at: string;
|
|
225
259
|
/**
|
|
226
|
-
* Base-unit amount of asset
|
|
260
|
+
* Base-unit amount of asset withdrawn (e.g. "1500000").
|
|
227
261
|
*/
|
|
228
262
|
raw_amount: string;
|
|
229
263
|
/**
|
|
230
|
-
* Vault shares
|
|
264
|
+
* Vault shares burned in base units. Populated after on-chain confirmation.
|
|
231
265
|
*/
|
|
232
266
|
share_amount: string | null;
|
|
233
267
|
/**
|
|
234
268
|
* Status of a wallet action.
|
|
235
269
|
*/
|
|
236
270
|
status: WalletActionStatus;
|
|
237
|
-
type: '
|
|
271
|
+
type: 'earn_withdraw';
|
|
238
272
|
/**
|
|
239
273
|
* ERC-4626 vault contract address.
|
|
240
274
|
*/
|
|
@@ -248,7 +282,7 @@ export interface EarnDepositActionResponse {
|
|
|
248
282
|
*/
|
|
249
283
|
wallet_id: string;
|
|
250
284
|
/**
|
|
251
|
-
* Human-readable decimal amount of asset
|
|
285
|
+
* Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
|
|
252
286
|
* the token is known in the asset registry.
|
|
253
287
|
*/
|
|
254
288
|
amount?: string;
|
|
@@ -272,99 +306,186 @@ export interface EarnDepositActionResponse {
|
|
|
272
306
|
steps?: Array<WalletActionStep>;
|
|
273
307
|
}
|
|
274
308
|
/**
|
|
275
|
-
*
|
|
309
|
+
* Input for withdrawing assets from an ERC-4626 vault. Exactly one of `amount` or
|
|
310
|
+
* `raw_amount` must be provided.
|
|
276
311
|
*/
|
|
277
|
-
export interface
|
|
312
|
+
export interface EarnWithdrawRequestBody {
|
|
278
313
|
/**
|
|
279
|
-
* The ID of the
|
|
314
|
+
* The ID of the vault to withdraw from.
|
|
315
|
+
*/
|
|
316
|
+
vault_id: string;
|
|
317
|
+
/**
|
|
318
|
+
* Human-readable decimal amount to withdraw (e.g. "1.5" for 1.5 USDC). Exactly one
|
|
319
|
+
* of `amount` or `raw_amount` must be provided.
|
|
320
|
+
*/
|
|
321
|
+
amount?: string;
|
|
322
|
+
/**
|
|
323
|
+
* Amount in smallest unit to withdraw (e.g. "1500000" for 1.5 USDC with 6
|
|
324
|
+
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
325
|
+
*/
|
|
326
|
+
raw_amount?: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Query parameters for fetching an earn vault position.
|
|
330
|
+
*/
|
|
331
|
+
export interface EthereumEarnPositionQuery {
|
|
332
|
+
/**
|
|
333
|
+
* The vault ID to get position for.
|
|
334
|
+
*/
|
|
335
|
+
vault_id: string;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* A wallet's position in an earn vault.
|
|
339
|
+
*/
|
|
340
|
+
export interface EthereumEarnPositionResponse {
|
|
341
|
+
/**
|
|
342
|
+
* Asset metadata for an earn vault position.
|
|
343
|
+
*/
|
|
344
|
+
asset: EarnAsset;
|
|
345
|
+
/**
|
|
346
|
+
* Current asset value in the vault (realtime from ERC-4626), in smallest unit.
|
|
347
|
+
*/
|
|
348
|
+
assets_in_vault: string;
|
|
349
|
+
/**
|
|
350
|
+
* Current vault shares held (realtime from ERC-4626).
|
|
351
|
+
*/
|
|
352
|
+
shares_in_vault: string;
|
|
353
|
+
/**
|
|
354
|
+
* Total amount deposited into the vault, in smallest unit.
|
|
355
|
+
*/
|
|
356
|
+
total_deposited: string;
|
|
357
|
+
/**
|
|
358
|
+
* Total amount withdrawn from the vault, in smallest unit.
|
|
359
|
+
*/
|
|
360
|
+
total_withdrawn: string;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Supported earn provider protocols.
|
|
364
|
+
*/
|
|
365
|
+
export type EthereumEarnProvider = 'morpho' | 'aave';
|
|
366
|
+
/**
|
|
367
|
+
* Detailed vault information including current APY, liquidity, and asset metadata.
|
|
368
|
+
*/
|
|
369
|
+
export interface EthereumEarnVaultDetailsResponse {
|
|
370
|
+
/**
|
|
371
|
+
* Vault identifier.
|
|
280
372
|
*/
|
|
281
373
|
id: string;
|
|
282
374
|
/**
|
|
283
|
-
*
|
|
375
|
+
* Annual percentage yield earned by the app from fee wrapper fees, in basis
|
|
376
|
+
* points.
|
|
284
377
|
*/
|
|
285
|
-
|
|
378
|
+
app_apy: number | null;
|
|
286
379
|
/**
|
|
287
|
-
*
|
|
380
|
+
* Asset metadata for an earn vault position.
|
|
381
|
+
*/
|
|
382
|
+
asset: EarnAsset;
|
|
383
|
+
/**
|
|
384
|
+
* Available liquidity in USD.
|
|
385
|
+
*/
|
|
386
|
+
available_liquidity_usd: number | null;
|
|
387
|
+
/**
|
|
388
|
+
* CAIP-2 chain identifier (e.g. "eip155:8453").
|
|
288
389
|
*/
|
|
289
390
|
caip2: string;
|
|
290
391
|
/**
|
|
291
|
-
*
|
|
392
|
+
* Human-readable vault name from the yield provider.
|
|
292
393
|
*/
|
|
293
|
-
|
|
394
|
+
name: string;
|
|
294
395
|
/**
|
|
295
|
-
*
|
|
396
|
+
* Supported earn provider protocols.
|
|
296
397
|
*/
|
|
297
|
-
|
|
398
|
+
provider: EthereumEarnProvider;
|
|
298
399
|
/**
|
|
299
|
-
*
|
|
400
|
+
* Total value locked in USD.
|
|
300
401
|
*/
|
|
301
|
-
|
|
402
|
+
tvl_usd: number | null;
|
|
302
403
|
/**
|
|
303
|
-
*
|
|
404
|
+
* Current annual percentage yield in basis points (e.g. 500 for 5%). 1 basis point
|
|
405
|
+
* = 0.01%.
|
|
304
406
|
*/
|
|
305
|
-
|
|
306
|
-
type: 'earn_withdraw';
|
|
407
|
+
user_apy: number | null;
|
|
307
408
|
/**
|
|
308
|
-
*
|
|
409
|
+
* Onchain vault contract address.
|
|
309
410
|
*/
|
|
310
411
|
vault_address: string;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
415
|
+
*/
|
|
416
|
+
export interface FailureReason {
|
|
311
417
|
/**
|
|
312
|
-
*
|
|
418
|
+
* Human-readable failure message.
|
|
313
419
|
*/
|
|
314
|
-
|
|
420
|
+
message: string;
|
|
315
421
|
/**
|
|
316
|
-
*
|
|
422
|
+
* Additional error details, if available.
|
|
317
423
|
*/
|
|
318
|
-
|
|
424
|
+
details?: unknown;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* A wallet action step consisting of an SVM (Solana) transaction.
|
|
428
|
+
*/
|
|
429
|
+
export interface SvmTransactionWalletActionStep {
|
|
319
430
|
/**
|
|
320
|
-
*
|
|
321
|
-
* the token is known in the asset registry.
|
|
431
|
+
* CAIP-2 chain identifier for the Solana network.
|
|
322
432
|
*/
|
|
323
|
-
|
|
433
|
+
caip2: string;
|
|
324
434
|
/**
|
|
325
|
-
*
|
|
326
|
-
* the asset registry.
|
|
435
|
+
* Status of an SVM step in a wallet action.
|
|
327
436
|
*/
|
|
328
|
-
|
|
437
|
+
status: SvmWalletActionStepStatus;
|
|
329
438
|
/**
|
|
330
|
-
*
|
|
331
|
-
* present when the token is known in the asset registry.
|
|
439
|
+
* The Solana transaction signature (base58-encoded). Null until broadcast.
|
|
332
440
|
*/
|
|
333
|
-
|
|
441
|
+
transaction_signature: string | null;
|
|
442
|
+
type: 'svm_transaction';
|
|
334
443
|
/**
|
|
335
444
|
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
336
445
|
*/
|
|
337
446
|
failure_reason?: FailureReason;
|
|
338
|
-
/**
|
|
339
|
-
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
340
|
-
*/
|
|
341
|
-
steps?: Array<WalletActionStep>;
|
|
342
447
|
}
|
|
343
448
|
/**
|
|
344
|
-
*
|
|
449
|
+
* Status of an SVM step in a wallet action.
|
|
345
450
|
*/
|
|
346
|
-
export
|
|
451
|
+
export type SvmWalletActionStepStatus = 'preparing' | 'queued' | 'pending' | 'confirmed' | 'finalized' | 'rejected' | 'reverted' | 'failed';
|
|
452
|
+
/**
|
|
453
|
+
* Response for a swap action.
|
|
454
|
+
*/
|
|
455
|
+
export interface SwapActionResponse {
|
|
347
456
|
/**
|
|
348
457
|
* The ID of the wallet action.
|
|
349
458
|
*/
|
|
350
459
|
id: string;
|
|
351
460
|
/**
|
|
352
|
-
*
|
|
461
|
+
* CAIP-2 chain identifier for the swap.
|
|
353
462
|
*/
|
|
354
|
-
|
|
463
|
+
caip2: string;
|
|
355
464
|
/**
|
|
356
465
|
* ISO 8601 timestamp of when the wallet action was created.
|
|
357
466
|
*/
|
|
358
467
|
created_at: string;
|
|
359
468
|
/**
|
|
360
|
-
*
|
|
469
|
+
* Exact base-unit amount of input token. Populated after on-chain confirmation.
|
|
361
470
|
*/
|
|
362
|
-
|
|
471
|
+
input_amount: string | null;
|
|
472
|
+
/**
|
|
473
|
+
* Token address or "native" for the token being sold.
|
|
474
|
+
*/
|
|
475
|
+
input_token: string;
|
|
476
|
+
/**
|
|
477
|
+
* Exact base-unit amount of output token. Populated after on-chain confirmation.
|
|
478
|
+
*/
|
|
479
|
+
output_amount: string | null;
|
|
480
|
+
/**
|
|
481
|
+
* Token address or "native" for the token being bought.
|
|
482
|
+
*/
|
|
483
|
+
output_token: string;
|
|
363
484
|
/**
|
|
364
485
|
* Status of a wallet action.
|
|
365
486
|
*/
|
|
366
487
|
status: WalletActionStatus;
|
|
367
|
-
type: '
|
|
488
|
+
type: 'swap';
|
|
368
489
|
/**
|
|
369
490
|
* The ID of the wallet involved in the action.
|
|
370
491
|
*/
|
|
@@ -379,61 +500,97 @@ export interface EarnIncentiveClaimActionResponse {
|
|
|
379
500
|
steps?: Array<WalletActionStep>;
|
|
380
501
|
}
|
|
381
502
|
/**
|
|
382
|
-
* Response for a
|
|
383
|
-
*/
|
|
384
|
-
export type WalletActionResponse = SwapActionResponse | TransferActionResponse | EarnDepositActionResponse | EarnWithdrawActionResponse | EarnIncentiveClaimActionResponse;
|
|
385
|
-
/**
|
|
386
|
-
* Input for depositing assets into an ERC-4626 vault. Exactly one of `amount` or
|
|
387
|
-
* `raw_amount` must be provided.
|
|
503
|
+
* Response for a transfer action.
|
|
388
504
|
*/
|
|
389
|
-
export interface
|
|
505
|
+
export interface TransferActionResponse {
|
|
390
506
|
/**
|
|
391
|
-
* The ID of the
|
|
507
|
+
* The ID of the wallet action.
|
|
392
508
|
*/
|
|
393
|
-
|
|
509
|
+
id: string;
|
|
394
510
|
/**
|
|
395
|
-
*
|
|
396
|
-
* of `amount` or `raw_amount` must be provided.
|
|
511
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
397
512
|
*/
|
|
398
|
-
|
|
513
|
+
created_at: string;
|
|
399
514
|
/**
|
|
400
|
-
*
|
|
401
|
-
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
515
|
+
* Recipient address.
|
|
402
516
|
*/
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Input for withdrawing assets from an ERC-4626 vault. Exactly one of `amount` or
|
|
407
|
-
* `raw_amount` must be provided.
|
|
408
|
-
*/
|
|
409
|
-
export interface EarnWithdrawRequestBody {
|
|
517
|
+
destination_address: string;
|
|
410
518
|
/**
|
|
411
|
-
*
|
|
519
|
+
* Chain name (e.g. "base", "ethereum").
|
|
412
520
|
*/
|
|
413
|
-
|
|
521
|
+
source_chain: string;
|
|
414
522
|
/**
|
|
415
|
-
*
|
|
416
|
-
* of `amount` or `raw_amount` must be provided.
|
|
523
|
+
* Status of a wallet action.
|
|
417
524
|
*/
|
|
418
|
-
|
|
525
|
+
status: WalletActionStatus;
|
|
526
|
+
type: 'transfer';
|
|
419
527
|
/**
|
|
420
|
-
*
|
|
421
|
-
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
528
|
+
* The ID of the wallet involved in the action.
|
|
422
529
|
*/
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Input for claiming incentive rewards.
|
|
427
|
-
*/
|
|
428
|
-
export interface EarnIncentiveClaimRequestBody {
|
|
530
|
+
wallet_id: string;
|
|
429
531
|
/**
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
* with their respective testnets.
|
|
532
|
+
* Amount received on the destination chain. Populated immediately for exact_output
|
|
533
|
+
* transfers, or after fill confirmation for exact_input transfers.
|
|
433
534
|
*/
|
|
434
|
-
|
|
535
|
+
destination_amount?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Destination asset for cross-asset transfers. Omitted for same-asset transfers.
|
|
538
|
+
*/
|
|
539
|
+
destination_asset?: string;
|
|
540
|
+
/**
|
|
541
|
+
* Destination chain for cross-chain transfers. Omitted for same-chain transfers.
|
|
542
|
+
*/
|
|
543
|
+
destination_chain?: string;
|
|
544
|
+
/**
|
|
545
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
546
|
+
*/
|
|
547
|
+
failure_reason?: FailureReason;
|
|
548
|
+
/**
|
|
549
|
+
* Decimal amount sent on the source chain (e.g. "1.5"). Omitted for exact_output
|
|
550
|
+
* cross-chain transfers until the source amount is determined.
|
|
551
|
+
*/
|
|
552
|
+
source_amount?: string;
|
|
553
|
+
/**
|
|
554
|
+
* Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
|
|
555
|
+
* with a named asset; omitted for custom-token transfers.
|
|
556
|
+
*/
|
|
557
|
+
source_asset?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Token contract address (EVM) or mint address (Solana). Present when the transfer
|
|
560
|
+
* was initiated with `asset_address`.
|
|
561
|
+
*/
|
|
562
|
+
source_asset_address?: string;
|
|
563
|
+
/**
|
|
564
|
+
* Number of decimals for the transferred token. Present when the transfer was
|
|
565
|
+
* initiated with `asset_address` and the decimals were resolved on-chain.
|
|
566
|
+
*/
|
|
567
|
+
source_asset_decimals?: number;
|
|
568
|
+
/**
|
|
569
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
570
|
+
*/
|
|
571
|
+
steps?: Array<WalletActionStep>;
|
|
435
572
|
}
|
|
573
|
+
/**
|
|
574
|
+
* Response for a wallet action, discriminated on type.
|
|
575
|
+
*/
|
|
576
|
+
export type WalletActionResponse = SwapActionResponse | TransferActionResponse | EarnDepositActionResponse | EarnWithdrawActionResponse | EarnIncentiveClaimActionResponse;
|
|
577
|
+
/**
|
|
578
|
+
* Status of a wallet action.
|
|
579
|
+
*/
|
|
580
|
+
export type WalletActionStatus = 'pending' | 'succeeded' | 'rejected' | 'failed';
|
|
581
|
+
/**
|
|
582
|
+
* A step within a wallet action, representing a single onchain action.
|
|
583
|
+
*/
|
|
584
|
+
export type WalletActionStep = EvmTransactionWalletActionStep | EvmUserOperationWalletActionStep | SvmTransactionWalletActionStep;
|
|
585
|
+
/**
|
|
586
|
+
* Type of a wallet action step.
|
|
587
|
+
*/
|
|
588
|
+
export type WalletActionStepType = 'evm_transaction' | 'evm_user_operation' | 'svm_transaction';
|
|
589
|
+
/**
|
|
590
|
+
* Type of wallet action
|
|
591
|
+
*/
|
|
592
|
+
export type WalletActionType = 'swap' | 'transfer' | 'earn_deposit' | 'earn_withdraw' | 'earn_incentive_claim';
|
|
436
593
|
export declare namespace WalletActions {
|
|
437
|
-
export { type
|
|
594
|
+
export { type EvmTransactionWalletActionStep as EvmTransactionWalletActionStep, type EvmUserOperationWalletActionStep as EvmUserOperationWalletActionStep, type EvmWalletActionStepStatus as EvmWalletActionStepStatus, type EarnAsset as EarnAsset, type EarnDepositActionResponse as EarnDepositActionResponse, type EarnDepositRequestBody as EarnDepositRequestBody, type EarnIncentiveClaimActionResponse as EarnIncentiveClaimActionResponse, type EarnIncentiveClaimRequestBody as EarnIncentiveClaimRequestBody, type EarnIncetiveClaimRewardEntry as EarnIncetiveClaimRewardEntry, type EarnWithdrawActionResponse as EarnWithdrawActionResponse, type EarnWithdrawRequestBody as EarnWithdrawRequestBody, type EthereumEarnPositionQuery as EthereumEarnPositionQuery, type EthereumEarnPositionResponse as EthereumEarnPositionResponse, type EthereumEarnProvider as EthereumEarnProvider, type EthereumEarnVaultDetailsResponse as EthereumEarnVaultDetailsResponse, type FailureReason as FailureReason, type SvmTransactionWalletActionStep as SvmTransactionWalletActionStep, type SvmWalletActionStepStatus as SvmWalletActionStepStatus, type SwapActionResponse as SwapActionResponse, type TransferActionResponse as TransferActionResponse, type WalletActionResponse as WalletActionResponse, type WalletActionStatus as WalletActionStatus, type WalletActionStep as WalletActionStep, type WalletActionStepType as WalletActionStepType, type WalletActionType as WalletActionType, };
|
|
438
595
|
}
|
|
439
596
|
//# sourceMappingURL=wallet-actions.d.ts.map
|