@privy-io/api-types 0.7.0 → 0.9.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 +62 -0
- package/client.d.mts +39 -30
- package/client.d.mts.map +1 -1
- package/client.d.ts +39 -30
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +79 -106
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +79 -106
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs.map +1 -1
- package/resources/aggregations.d.mts +18 -392
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +18 -392
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/aggregations.js.map +1 -1
- package/resources/aggregations.mjs.map +1 -1
- package/resources/apps.d.mts +154 -71
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +154 -71
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +796 -427
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +796 -427
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/cross-app.d.mts +14 -13
- package/resources/cross-app.d.mts.map +1 -1
- package/resources/cross-app.d.ts +14 -13
- package/resources/cross-app.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +167 -83
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +167 -83
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/embedded-wallets.js.map +1 -1
- package/resources/embedded-wallets.mjs.map +1 -1
- package/resources/funding.d.mts +150 -64
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +150 -64
- package/resources/funding.d.ts.map +1 -1
- package/resources/funding.js.map +1 -1
- package/resources/funding.mjs.map +1 -1
- package/resources/index.d.mts +18 -15
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +224 -1757
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +224 -1757
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +74 -26
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +74 -26
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +8 -8
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +8 -8
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +52 -1
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +52 -1
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/policies.d.mts +512 -992
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +512 -992
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +48 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +48 -41
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +59 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +59 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/swaps.d.mts +108 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +108 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +9 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +5 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transactions.d.mts +150 -98
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +150 -98
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +207 -240
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +207 -240
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +439 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +439 -0
- package/resources/wallet-actions.d.ts.map +1 -0
- package/resources/wallet-actions.js +9 -0
- package/resources/wallet-actions.js.map +1 -0
- package/resources/wallet-actions.mjs +5 -0
- package/resources/wallet-actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +2 -1
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +2 -1
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js.map +1 -1
- 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 +11 -30
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +11 -30
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2435 -923
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2435 -923
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +24 -11
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +24 -11
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +1296 -186
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1296 -186
- 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 +25 -1
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +25 -1
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +869 -92
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/accounts.ts +93 -120
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +211 -111
- package/src/resources/client-auth.ts +1361 -896
- package/src/resources/cross-app.ts +19 -15
- package/src/resources/embedded-wallets.ts +219 -123
- package/src/resources/funding.ts +263 -173
- package/src/resources/index.ts +447 -65
- package/src/resources/intents.ts +370 -3100
- package/src/resources/key-quorums.ts +100 -32
- package/src/resources/kraken-embed.ts +105 -0
- package/src/resources/policies.ts +648 -1494
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +169 -102
- package/src/resources/users.ts +676 -729
- package/src/resources/wallet-actions.ts +573 -0
- package/src/resources/wallets/balance.ts +2 -1
- package/src/resources/wallets/index.ts +156 -17
- package/src/resources/wallets/transactions.ts +12 -88
- package/src/resources/wallets/wallets.ts +3162 -1109
- package/src/resources/webhooks.ts +1609 -229
- package/src/resources/yield.ts +29 -0
- 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
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
|
|
5
|
+
export class WalletActions extends APIResource {}
|
|
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
|
+
/**
|
|
57
|
+
* A wallet action step consisting of an EVM transaction.
|
|
58
|
+
*/
|
|
59
|
+
export interface EvmTransactionWalletActionStep {
|
|
60
|
+
/**
|
|
61
|
+
* CAIP-2 chain identifier of the transaction, containing the chain ID.
|
|
62
|
+
*/
|
|
63
|
+
caip2: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Status of an EVM step in a wallet action.
|
|
67
|
+
*/
|
|
68
|
+
status: EvmWalletActionStepStatus;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The transaction hash for this step. May change while the step status is
|
|
72
|
+
* non-terminal.
|
|
73
|
+
*/
|
|
74
|
+
transaction_hash: string | null;
|
|
75
|
+
|
|
76
|
+
type: 'evm_transaction';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
80
|
+
*/
|
|
81
|
+
failure_reason?: FailureReason;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A wallet action step consisting of an EVM user operation.
|
|
86
|
+
*/
|
|
87
|
+
export interface EvmUserOperationWalletActionStep {
|
|
88
|
+
/**
|
|
89
|
+
* Transaction hash of the bundle in which this user operation was included. Null
|
|
90
|
+
* until included by a bundler.
|
|
91
|
+
*/
|
|
92
|
+
bundle_transaction_hash: string | null;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* CAIP-2 network identifier, containing the chain ID of the user operation.
|
|
96
|
+
*/
|
|
97
|
+
caip2: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The entrypoint version of the user operation.
|
|
101
|
+
*/
|
|
102
|
+
entrypoint_version: '0.6' | '0.7' | '0.8' | '0.9';
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Status of an EVM step in a wallet action.
|
|
106
|
+
*/
|
|
107
|
+
status: EvmWalletActionStepStatus;
|
|
108
|
+
|
|
109
|
+
type: 'evm_user_operation';
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The user operation hash for this step. May change while the step status is
|
|
113
|
+
* non-terminal.
|
|
114
|
+
*/
|
|
115
|
+
user_operation_hash: string | null;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
119
|
+
*/
|
|
120
|
+
failure_reason?: FailureReason;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A step within a wallet action, representing a single onchain action.
|
|
125
|
+
*/
|
|
126
|
+
export type WalletActionStep = EvmTransactionWalletActionStep | EvmUserOperationWalletActionStep;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Response for a swap action.
|
|
130
|
+
*/
|
|
131
|
+
export interface SwapActionResponse {
|
|
132
|
+
/**
|
|
133
|
+
* The ID of the wallet action.
|
|
134
|
+
*/
|
|
135
|
+
id: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* CAIP-2 chain identifier for the swap.
|
|
139
|
+
*/
|
|
140
|
+
caip2: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
144
|
+
*/
|
|
145
|
+
created_at: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Exact base-unit amount of input token. Populated after on-chain confirmation.
|
|
149
|
+
*/
|
|
150
|
+
input_amount: string | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Token address or "native" for the token being sold.
|
|
154
|
+
*/
|
|
155
|
+
input_token: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Exact base-unit amount of output token. Populated after on-chain confirmation.
|
|
159
|
+
*/
|
|
160
|
+
output_amount: string | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Token address or "native" for the token being bought.
|
|
164
|
+
*/
|
|
165
|
+
output_token: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Status of a wallet action.
|
|
169
|
+
*/
|
|
170
|
+
status: WalletActionStatus;
|
|
171
|
+
|
|
172
|
+
type: 'swap';
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The ID of the wallet involved in the action.
|
|
176
|
+
*/
|
|
177
|
+
wallet_id: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
181
|
+
*/
|
|
182
|
+
failure_reason?: FailureReason;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
186
|
+
*/
|
|
187
|
+
steps?: Array<WalletActionStep>;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Response for a transfer action.
|
|
192
|
+
*/
|
|
193
|
+
export interface TransferActionResponse {
|
|
194
|
+
/**
|
|
195
|
+
* The ID of the wallet action.
|
|
196
|
+
*/
|
|
197
|
+
id: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
201
|
+
*/
|
|
202
|
+
created_at: string;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Recipient address.
|
|
206
|
+
*/
|
|
207
|
+
destination_address: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Decimal amount as the user provided (e.g. "1.5").
|
|
211
|
+
*/
|
|
212
|
+
source_amount: string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Asset identifier (e.g. "usdc", "eth").
|
|
216
|
+
*/
|
|
217
|
+
source_asset: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Chain name (e.g. "base", "ethereum").
|
|
221
|
+
*/
|
|
222
|
+
source_chain: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Status of a wallet action.
|
|
226
|
+
*/
|
|
227
|
+
status: WalletActionStatus;
|
|
228
|
+
|
|
229
|
+
type: 'transfer';
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The ID of the wallet involved in the action.
|
|
233
|
+
*/
|
|
234
|
+
wallet_id: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
238
|
+
*/
|
|
239
|
+
failure_reason?: FailureReason;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
243
|
+
*/
|
|
244
|
+
steps?: Array<WalletActionStep>;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* A specific reward token and amount associated with an earn incentive claim.
|
|
249
|
+
*/
|
|
250
|
+
export interface EarnIncetiveClaimRewardEntry {
|
|
251
|
+
/**
|
|
252
|
+
* Claimable amount in base units.
|
|
253
|
+
*/
|
|
254
|
+
amount: string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Address of the reward token.
|
|
258
|
+
*/
|
|
259
|
+
token_address: string;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Symbol of the reward token (e.g. "MORPHO").
|
|
263
|
+
*/
|
|
264
|
+
token_symbol: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Response for an earn deposit action.
|
|
269
|
+
*/
|
|
270
|
+
export interface EarnDepositActionResponse {
|
|
271
|
+
/**
|
|
272
|
+
* The ID of the wallet action.
|
|
273
|
+
*/
|
|
274
|
+
id: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Underlying asset token address.
|
|
278
|
+
*/
|
|
279
|
+
asset_address: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* CAIP-2 chain identifier.
|
|
283
|
+
*/
|
|
284
|
+
caip2: string;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
288
|
+
*/
|
|
289
|
+
created_at: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Base-unit amount of asset deposited (e.g. "1500000").
|
|
293
|
+
*/
|
|
294
|
+
raw_amount: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Vault shares received in base units. Populated after on-chain confirmation.
|
|
298
|
+
*/
|
|
299
|
+
share_amount: string | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Status of a wallet action.
|
|
303
|
+
*/
|
|
304
|
+
status: WalletActionStatus;
|
|
305
|
+
|
|
306
|
+
type: 'earn_deposit';
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* ERC-4626 vault contract address.
|
|
310
|
+
*/
|
|
311
|
+
vault_address: string;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* The vault ID.
|
|
315
|
+
*/
|
|
316
|
+
vault_id: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The ID of the wallet involved in the action.
|
|
320
|
+
*/
|
|
321
|
+
wallet_id: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
|
|
325
|
+
* the token is known in the asset registry.
|
|
326
|
+
*/
|
|
327
|
+
amount?: string;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
331
|
+
* the asset registry.
|
|
332
|
+
*/
|
|
333
|
+
asset?: string;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
337
|
+
* present when the token is known in the asset registry.
|
|
338
|
+
*/
|
|
339
|
+
decimals?: number;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
343
|
+
*/
|
|
344
|
+
failure_reason?: FailureReason;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
348
|
+
*/
|
|
349
|
+
steps?: Array<WalletActionStep>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Response for an earn withdraw action.
|
|
354
|
+
*/
|
|
355
|
+
export interface EarnWithdrawActionResponse {
|
|
356
|
+
/**
|
|
357
|
+
* The ID of the wallet action.
|
|
358
|
+
*/
|
|
359
|
+
id: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Underlying asset token address.
|
|
363
|
+
*/
|
|
364
|
+
asset_address: string;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* CAIP-2 chain identifier.
|
|
368
|
+
*/
|
|
369
|
+
caip2: string;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
373
|
+
*/
|
|
374
|
+
created_at: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Base-unit amount of asset withdrawn (e.g. "1500000").
|
|
378
|
+
*/
|
|
379
|
+
raw_amount: string;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Vault shares burned in base units. Populated after on-chain confirmation.
|
|
383
|
+
*/
|
|
384
|
+
share_amount: string | null;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Status of a wallet action.
|
|
388
|
+
*/
|
|
389
|
+
status: WalletActionStatus;
|
|
390
|
+
|
|
391
|
+
type: 'earn_withdraw';
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* ERC-4626 vault contract address.
|
|
395
|
+
*/
|
|
396
|
+
vault_address: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The vault ID.
|
|
400
|
+
*/
|
|
401
|
+
vault_id: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The ID of the wallet involved in the action.
|
|
405
|
+
*/
|
|
406
|
+
wallet_id: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
|
|
410
|
+
* the token is known in the asset registry.
|
|
411
|
+
*/
|
|
412
|
+
amount?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
416
|
+
* the asset registry.
|
|
417
|
+
*/
|
|
418
|
+
asset?: string;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
422
|
+
* present when the token is known in the asset registry.
|
|
423
|
+
*/
|
|
424
|
+
decimals?: number;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
428
|
+
*/
|
|
429
|
+
failure_reason?: FailureReason;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
433
|
+
*/
|
|
434
|
+
steps?: Array<WalletActionStep>;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Response for an earn incentive claim action.
|
|
439
|
+
*/
|
|
440
|
+
export interface EarnIncentiveClaimActionResponse {
|
|
441
|
+
/**
|
|
442
|
+
* The ID of the wallet action.
|
|
443
|
+
*/
|
|
444
|
+
id: string;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* EVM chain name (e.g. "base", "ethereum").
|
|
448
|
+
*/
|
|
449
|
+
chain: string;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* ISO 8601 timestamp of when the wallet action was created.
|
|
453
|
+
*/
|
|
454
|
+
created_at: string;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Claimed reward tokens. Populated after the preparation step fetches from Merkl.
|
|
458
|
+
*/
|
|
459
|
+
rewards: Array<EarnIncetiveClaimRewardEntry> | null;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Status of a wallet action.
|
|
463
|
+
*/
|
|
464
|
+
status: WalletActionStatus;
|
|
465
|
+
|
|
466
|
+
type: 'earn_incentive_claim';
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* The ID of the wallet involved in the action.
|
|
470
|
+
*/
|
|
471
|
+
wallet_id: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* A description of why a wallet action (or a step within a wallet action) failed.
|
|
475
|
+
*/
|
|
476
|
+
failure_reason?: FailureReason;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* The steps of the wallet action. Only returned if `?include=steps` is provided.
|
|
480
|
+
*/
|
|
481
|
+
steps?: Array<WalletActionStep>;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Response for a wallet action, discriminated on type.
|
|
486
|
+
*/
|
|
487
|
+
export type WalletActionResponse =
|
|
488
|
+
| SwapActionResponse
|
|
489
|
+
| TransferActionResponse
|
|
490
|
+
| EarnDepositActionResponse
|
|
491
|
+
| EarnWithdrawActionResponse
|
|
492
|
+
| EarnIncentiveClaimActionResponse;
|
|
493
|
+
|
|
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
|
+
/**
|
|
500
|
+
* The ID of the vault to deposit into.
|
|
501
|
+
*/
|
|
502
|
+
vault_id: string;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Human-readable decimal amount to deposit (e.g. "1.5" for 1.5 USDC). Exactly one
|
|
506
|
+
* of `amount` or `raw_amount` must be provided.
|
|
507
|
+
*/
|
|
508
|
+
amount?: string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Amount in smallest unit to deposit (e.g. "1500000" for 1.5 USDC with 6
|
|
512
|
+
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
513
|
+
*/
|
|
514
|
+
raw_amount?: string;
|
|
515
|
+
}
|
|
516
|
+
|
|
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
|
+
/**
|
|
523
|
+
* The ID of the vault to withdraw from.
|
|
524
|
+
*/
|
|
525
|
+
vault_id: string;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Human-readable decimal amount to withdraw (e.g. "1.5" for 1.5 USDC). Exactly one
|
|
529
|
+
* of `amount` or `raw_amount` must be provided.
|
|
530
|
+
*/
|
|
531
|
+
amount?: string;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Amount in smallest unit to withdraw (e.g. "1500000" for 1.5 USDC with 6
|
|
535
|
+
* decimals). Exactly one of `amount` or `raw_amount` must be provided.
|
|
536
|
+
*/
|
|
537
|
+
raw_amount?: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Input for claiming incentive rewards.
|
|
542
|
+
*/
|
|
543
|
+
export interface EarnIncentiveClaimRequestBody {
|
|
544
|
+
/**
|
|
545
|
+
* The blockchain network on which to perform the incentive claim. Supported chains
|
|
546
|
+
* include: 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and more, along
|
|
547
|
+
* with their respective testnets.
|
|
548
|
+
*/
|
|
549
|
+
chain: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export declare namespace WalletActions {
|
|
553
|
+
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
|
+
type EvmTransactionWalletActionStep as EvmTransactionWalletActionStep,
|
|
560
|
+
type EvmUserOperationWalletActionStep as EvmUserOperationWalletActionStep,
|
|
561
|
+
type WalletActionStep as WalletActionStep,
|
|
562
|
+
type SwapActionResponse as SwapActionResponse,
|
|
563
|
+
type TransferActionResponse as TransferActionResponse,
|
|
564
|
+
type EarnIncetiveClaimRewardEntry as EarnIncetiveClaimRewardEntry,
|
|
565
|
+
type EarnDepositActionResponse as EarnDepositActionResponse,
|
|
566
|
+
type EarnWithdrawActionResponse as EarnWithdrawActionResponse,
|
|
567
|
+
type EarnIncentiveClaimActionResponse as EarnIncentiveClaimActionResponse,
|
|
568
|
+
type WalletActionResponse as WalletActionResponse,
|
|
569
|
+
type EarnDepositRequestBody as EarnDepositRequestBody,
|
|
570
|
+
type EarnWithdrawRequestBody as EarnWithdrawRequestBody,
|
|
571
|
+
type EarnIncentiveClaimRequestBody as EarnIncentiveClaimRequestBody,
|
|
572
|
+
};
|
|
573
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as WalletsAPI from './wallets';
|
|
4
5
|
import { APIPromise } from '../../core/api-promise';
|
|
5
6
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
7
|
import { path } from '../../internal/utils/path';
|
|
@@ -80,7 +81,7 @@ export interface BalanceGetParams {
|
|
|
80
81
|
| 'eurc'
|
|
81
82
|
| 'usdb'
|
|
82
83
|
| 'sol'
|
|
83
|
-
| Array<
|
|
84
|
+
| Array<WalletsAPI.WalletAsset>;
|
|
84
85
|
|
|
85
86
|
chain?:
|
|
86
87
|
| 'ethereum'
|