@privy-io/api-types 0.3.4 → 0.5.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 +82 -0
- package/LICENSE +1 -1
- package/README.md +31 -0
- package/client.d.mts +21 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +21 -11
- package/client.d.ts.map +1 -1
- package/client.js +20 -3
- package/client.js.map +1 -1
- package/client.mjs +20 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/aggregations.d.mts +507 -0
- package/resources/aggregations.d.mts.map +1 -0
- package/resources/aggregations.d.ts +507 -0
- package/resources/aggregations.d.ts.map +1 -0
- package/resources/aggregations.js +9 -0
- package/resources/aggregations.js.map +1 -0
- package/resources/aggregations.mjs +5 -0
- package/resources/aggregations.mjs.map +1 -0
- package/resources/client-auth.d.mts +183 -24
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +183 -24
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/funding.d.mts +4 -4
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +4 -4
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +7 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -4
- 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/key-quorums.d.mts +4 -1
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +4 -1
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/policies.d.mts +89 -135
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +89 -135
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs.map +1 -1
- package/resources/users.d.mts +679 -415
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +679 -415
- package/resources/users.d.ts.map +1 -1
- package/resources/wallets/balance.d.mts +11 -6
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +11 -6
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +1 -2
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +1 -2
- 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 +3 -3
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +3 -3
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/wallets.d.mts +347 -65
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +347 -65
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +1 -1
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +1 -1
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +940 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +940 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +9 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +5 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources/yield.d.mts +264 -0
- package/resources/yield.d.mts.map +1 -0
- package/resources/yield.d.ts +264 -0
- package/resources/yield.d.ts.map +1 -0
- package/resources/yield.js +9 -0
- package/resources/yield.js.map +1 -0
- package/resources/yield.mjs +5 -0
- package/resources/yield.mjs.map +1 -0
- package/src/client.ts +331 -16
- package/src/internal/parse.ts +6 -0
- package/src/resources/aggregations.ts +853 -0
- package/src/resources/client-auth.ts +309 -35
- package/src/resources/funding.ts +4 -1
- package/src/resources/index.ts +156 -9
- package/src/resources/key-quorums.ts +4 -1
- package/src/resources/policies.ts +129 -214
- package/src/resources/users.ts +974 -650
- package/src/resources/wallets/balance.ts +24 -6
- package/src/resources/wallets/index.ts +13 -3
- package/src/resources/wallets/transactions.ts +11 -3
- package/src/resources/wallets/wallets.ts +468 -91
- package/src/resources/webhooks.ts +1287 -0
- package/src/resources/yield.ts +330 -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
|
@@ -11,7 +11,7 @@ export declare class Wallets extends APIResource {
|
|
|
11
11
|
transactions: TransactionsAPI.Transactions;
|
|
12
12
|
balance: BalanceAPI.Balance;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Creates a new wallet on the requested chain and for the requested owner.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
@@ -147,14 +147,128 @@ export declare class Wallets extends APIResource {
|
|
|
147
147
|
get(walletID: string, options?: RequestOptions): APIPromise<Wallet>;
|
|
148
148
|
}
|
|
149
149
|
export type WalletsCursor = Cursor<Wallet>;
|
|
150
|
+
/**
|
|
151
|
+
* The response body from revoking a wallet delegation.
|
|
152
|
+
*/
|
|
153
|
+
export interface WalletRevokeResponse {
|
|
154
|
+
message: string;
|
|
155
|
+
}
|
|
150
156
|
/**
|
|
151
157
|
* The wallet chain types that support curve-based signing.
|
|
152
158
|
*/
|
|
153
159
|
export type CurveSigningChainType = 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'near' | 'ton' | 'starknet';
|
|
160
|
+
/**
|
|
161
|
+
* The wallet chain types that are not first class chains.
|
|
162
|
+
*/
|
|
163
|
+
export type ExtendedChainType = 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'near' | 'ton' | 'starknet' | 'spark';
|
|
154
164
|
/**
|
|
155
165
|
* The wallet chain types that offer first class support.
|
|
156
166
|
*/
|
|
157
167
|
export type FirstClassChainType = 'ethereum' | 'solana';
|
|
168
|
+
/**
|
|
169
|
+
* The wallet chain types.
|
|
170
|
+
*/
|
|
171
|
+
export type WalletChainType = 'ethereum' | 'solana' | 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'near' | 'ton' | 'starknet' | 'spark';
|
|
172
|
+
/**
|
|
173
|
+
* Information about the custodian managing this wallet.
|
|
174
|
+
*/
|
|
175
|
+
export interface WalletCustodian {
|
|
176
|
+
name: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The provider of the custodial wallet.
|
|
180
|
+
*/
|
|
181
|
+
export type CustodialWalletProvider = 'bridge';
|
|
182
|
+
/**
|
|
183
|
+
* The chain type of the custodial wallet.
|
|
184
|
+
*/
|
|
185
|
+
export type CustodialWalletChainType = 'ethereum';
|
|
186
|
+
/**
|
|
187
|
+
* The input for creating a custodial wallet.
|
|
188
|
+
*/
|
|
189
|
+
export interface CustodialWalletCreateInput {
|
|
190
|
+
/**
|
|
191
|
+
* The chain type of the custodial wallet.
|
|
192
|
+
*/
|
|
193
|
+
chain_type: CustodialWalletChainType;
|
|
194
|
+
/**
|
|
195
|
+
* The provider of the custodial wallet.
|
|
196
|
+
*/
|
|
197
|
+
provider: CustodialWalletProvider;
|
|
198
|
+
/**
|
|
199
|
+
* The resource ID of the beneficiary of the custodial wallet, given by the
|
|
200
|
+
* licensing provider.
|
|
201
|
+
*/
|
|
202
|
+
provider_user_id: string;
|
|
203
|
+
additional_signers?: Array<CustodialWalletCreateInput.AdditionalSigner>;
|
|
204
|
+
owner?: CustodialWalletCreateInput.UserID | CustodialWalletCreateInput.PublicKey | null;
|
|
205
|
+
policy_ids?: Array<string>;
|
|
206
|
+
}
|
|
207
|
+
export declare namespace CustodialWalletCreateInput {
|
|
208
|
+
interface AdditionalSigner {
|
|
209
|
+
signer_id: string;
|
|
210
|
+
override_policy_ids?: Array<string>;
|
|
211
|
+
}
|
|
212
|
+
interface UserID {
|
|
213
|
+
user_id: string;
|
|
214
|
+
}
|
|
215
|
+
interface PublicKey {
|
|
216
|
+
public_key: string;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Information about a custodial wallet.
|
|
221
|
+
*/
|
|
222
|
+
export interface CustodialWallet {
|
|
223
|
+
id: string;
|
|
224
|
+
address: string;
|
|
225
|
+
/**
|
|
226
|
+
* The chain type of the custodial wallet.
|
|
227
|
+
*/
|
|
228
|
+
chain_type: CustodialWalletChainType;
|
|
229
|
+
owner_id: string | null;
|
|
230
|
+
/**
|
|
231
|
+
* The provider of the custodial wallet.
|
|
232
|
+
*/
|
|
233
|
+
provider: CustodialWalletProvider;
|
|
234
|
+
additional_signers?: Array<CustodialWallet.AdditionalSigner>;
|
|
235
|
+
policy_ids?: Array<string>;
|
|
236
|
+
}
|
|
237
|
+
export declare namespace CustodialWallet {
|
|
238
|
+
interface AdditionalSigner {
|
|
239
|
+
signer_id: string;
|
|
240
|
+
override_policy_ids?: Array<string>;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Optional HPKE configuration for wallet import decryption. These parameters allow
|
|
245
|
+
* importing wallets encrypted by external providers that use different HPKE
|
|
246
|
+
* configurations.
|
|
247
|
+
*/
|
|
248
|
+
export interface HpkeImportConfig {
|
|
249
|
+
/**
|
|
250
|
+
* Additional Authenticated Data (AAD) used during encryption. Should be
|
|
251
|
+
* base64-encoded bytes.
|
|
252
|
+
*/
|
|
253
|
+
aad?: string;
|
|
254
|
+
/**
|
|
255
|
+
* The AEAD algorithm used for encryption. Defaults to CHACHA20_POLY1305 if not
|
|
256
|
+
* specified.
|
|
257
|
+
*/
|
|
258
|
+
aead_algorithm?: 'CHACHA20_POLY1305' | 'AES_GCM256';
|
|
259
|
+
/**
|
|
260
|
+
* Application-specific context information (INFO) used during HPKE encryption.
|
|
261
|
+
* Should be base64-encoded bytes.
|
|
262
|
+
*/
|
|
263
|
+
info?: string;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* SUI transaction commands allowlist for raw_sign endpoint policy evaluation
|
|
267
|
+
*/
|
|
268
|
+
export type SuiCommandName = 'TransferObjects' | 'SplitCoins' | 'MergeCoins';
|
|
269
|
+
/**
|
|
270
|
+
* A wallet managed by Privy's wallet infrastructure.
|
|
271
|
+
*/
|
|
158
272
|
export interface Wallet {
|
|
159
273
|
/**
|
|
160
274
|
* Unique ID of the wallet. This will be the primary identifier when using the
|
|
@@ -212,24 +326,116 @@ export declare namespace Wallet {
|
|
|
212
326
|
}
|
|
213
327
|
}
|
|
214
328
|
/**
|
|
215
|
-
*
|
|
329
|
+
* Input for a single wallet in a batch creation request.
|
|
216
330
|
*/
|
|
217
|
-
export
|
|
331
|
+
export interface WalletBatchItemInput {
|
|
332
|
+
/**
|
|
333
|
+
* The wallet chain types.
|
|
334
|
+
*/
|
|
335
|
+
chain_type: WalletChainType;
|
|
336
|
+
/**
|
|
337
|
+
* Additional signers for the wallet.
|
|
338
|
+
*/
|
|
339
|
+
additional_signers?: Array<WalletBatchItemInput.AdditionalSigner>;
|
|
340
|
+
/**
|
|
341
|
+
* The owner of the resource. If you provide this, do not specify an owner_id as it
|
|
342
|
+
* will be generated automatically. When updating a wallet, you can set the owner
|
|
343
|
+
* to null to remove the owner.
|
|
344
|
+
*/
|
|
345
|
+
owner?: WalletBatchItemInput.PublicKeyOwner | WalletBatchItemInput.UserOwner | null;
|
|
346
|
+
/**
|
|
347
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
348
|
+
* not specify an owner.
|
|
349
|
+
*/
|
|
350
|
+
owner_id?: string;
|
|
351
|
+
/**
|
|
352
|
+
* List of policy IDs for policies that should be enforced on the wallet.
|
|
353
|
+
* Currently, only one policy is supported per wallet.
|
|
354
|
+
*/
|
|
355
|
+
policy_ids?: Array<string>;
|
|
356
|
+
}
|
|
357
|
+
export declare namespace WalletBatchItemInput {
|
|
358
|
+
interface AdditionalSigner {
|
|
359
|
+
signer_id: string;
|
|
360
|
+
/**
|
|
361
|
+
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
362
|
+
* this will override the base policy IDs set on the wallet.
|
|
363
|
+
*/
|
|
364
|
+
override_policy_ids?: Array<string>;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
368
|
+
* If you provide this, do not specify an owner_id as it will be generated
|
|
369
|
+
* automatically.
|
|
370
|
+
*/
|
|
371
|
+
interface PublicKeyOwner {
|
|
372
|
+
public_key: string;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* The user ID of the owner of the resource. The user must already exist, and this
|
|
376
|
+
* value must start with "did:privy:". If you provide this, do not specify an
|
|
377
|
+
* owner_id as it will be generated automatically.
|
|
378
|
+
*/
|
|
379
|
+
interface UserOwner {
|
|
380
|
+
user_id: string;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
218
383
|
/**
|
|
219
|
-
*
|
|
384
|
+
* Request body for batch wallet creation.
|
|
220
385
|
*/
|
|
221
|
-
export interface
|
|
222
|
-
|
|
386
|
+
export interface WalletBatchCreateInput {
|
|
387
|
+
/**
|
|
388
|
+
* Array of wallet creation requests. Minimum 1, maximum 100.
|
|
389
|
+
*/
|
|
390
|
+
wallets: Array<WalletBatchItemInput>;
|
|
223
391
|
}
|
|
224
392
|
/**
|
|
225
|
-
*
|
|
393
|
+
* A single result from a batch wallet creation operation.
|
|
226
394
|
*/
|
|
227
|
-
export type
|
|
395
|
+
export type WalletBatchCreateResult = WalletBatchCreateResult.WalletBatchCreateSuccess | WalletBatchCreateResult.WalletBatchCreateFailure;
|
|
396
|
+
export declare namespace WalletBatchCreateResult {
|
|
397
|
+
/**
|
|
398
|
+
* A successful wallet creation result within a batch operation.
|
|
399
|
+
*/
|
|
400
|
+
interface WalletBatchCreateSuccess {
|
|
401
|
+
/**
|
|
402
|
+
* The index of the wallet in the original request array.
|
|
403
|
+
*/
|
|
404
|
+
index: number;
|
|
405
|
+
success: true;
|
|
406
|
+
/**
|
|
407
|
+
* A wallet managed by Privy's wallet infrastructure.
|
|
408
|
+
*/
|
|
409
|
+
wallet: WalletsAPI.Wallet;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* A failed wallet creation result within a batch operation.
|
|
413
|
+
*/
|
|
414
|
+
interface WalletBatchCreateFailure {
|
|
415
|
+
/**
|
|
416
|
+
* A PrivyErrorCode string identifying the error type (e.g., "invalid_data",
|
|
417
|
+
* "resource_conflict").
|
|
418
|
+
*/
|
|
419
|
+
code: string;
|
|
420
|
+
/**
|
|
421
|
+
* A human-readable error message with details about what went wrong.
|
|
422
|
+
*/
|
|
423
|
+
error: string;
|
|
424
|
+
/**
|
|
425
|
+
* The index of the wallet in the original request array.
|
|
426
|
+
*/
|
|
427
|
+
index: number;
|
|
428
|
+
success: false;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
228
431
|
/**
|
|
229
|
-
*
|
|
432
|
+
* Response for a batch wallet creation request.
|
|
230
433
|
*/
|
|
231
|
-
export interface
|
|
232
|
-
|
|
434
|
+
export interface WalletBatchCreateResponse {
|
|
435
|
+
/**
|
|
436
|
+
* Array of results for each wallet creation request, in the same order as input.
|
|
437
|
+
*/
|
|
438
|
+
results: Array<WalletBatchCreateResult>;
|
|
233
439
|
}
|
|
234
440
|
/**
|
|
235
441
|
* Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
|
|
@@ -261,6 +467,7 @@ export declare namespace EthereumSignTransactionRpcInput {
|
|
|
261
467
|
}
|
|
262
468
|
namespace Params {
|
|
263
469
|
interface Transaction {
|
|
470
|
+
authorization_list?: Array<Transaction.AuthorizationList>;
|
|
264
471
|
chain_id?: string | number;
|
|
265
472
|
data?: string;
|
|
266
473
|
from?: string;
|
|
@@ -270,9 +477,19 @@ export declare namespace EthereumSignTransactionRpcInput {
|
|
|
270
477
|
max_priority_fee_per_gas?: string | number;
|
|
271
478
|
nonce?: string | number;
|
|
272
479
|
to?: string;
|
|
273
|
-
type?: 0 | 1 | 2;
|
|
480
|
+
type?: 0 | 1 | 2 | 4;
|
|
274
481
|
value?: string | number;
|
|
275
482
|
}
|
|
483
|
+
namespace Transaction {
|
|
484
|
+
interface AuthorizationList {
|
|
485
|
+
chain_id: string | number;
|
|
486
|
+
contract: string;
|
|
487
|
+
nonce: string | number;
|
|
488
|
+
r: string;
|
|
489
|
+
s: string;
|
|
490
|
+
y_parity: number;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
276
493
|
}
|
|
277
494
|
}
|
|
278
495
|
/**
|
|
@@ -292,6 +509,7 @@ export declare namespace EthereumSendTransactionRpcInput {
|
|
|
292
509
|
}
|
|
293
510
|
namespace Params {
|
|
294
511
|
interface Transaction {
|
|
512
|
+
authorization_list?: Array<Transaction.AuthorizationList>;
|
|
295
513
|
chain_id?: string | number;
|
|
296
514
|
data?: string;
|
|
297
515
|
from?: string;
|
|
@@ -301,9 +519,19 @@ export declare namespace EthereumSendTransactionRpcInput {
|
|
|
301
519
|
max_priority_fee_per_gas?: string | number;
|
|
302
520
|
nonce?: string | number;
|
|
303
521
|
to?: string;
|
|
304
|
-
type?: 0 | 1 | 2;
|
|
522
|
+
type?: 0 | 1 | 2 | 4;
|
|
305
523
|
value?: string | number;
|
|
306
524
|
}
|
|
525
|
+
namespace Transaction {
|
|
526
|
+
interface AuthorizationList {
|
|
527
|
+
chain_id: string | number;
|
|
528
|
+
contract: string;
|
|
529
|
+
nonce: string | number;
|
|
530
|
+
r: string;
|
|
531
|
+
s: string;
|
|
532
|
+
y_parity: number;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
307
535
|
}
|
|
308
536
|
}
|
|
309
537
|
/**
|
|
@@ -477,9 +705,11 @@ export declare namespace EthereumSendTransactionRpcResponse {
|
|
|
477
705
|
hash: string;
|
|
478
706
|
transaction_id?: string;
|
|
479
707
|
transaction_request?: Data.TransactionRequest;
|
|
708
|
+
user_operation_hash?: string;
|
|
480
709
|
}
|
|
481
710
|
namespace Data {
|
|
482
711
|
interface TransactionRequest {
|
|
712
|
+
authorization_list?: Array<TransactionRequest.AuthorizationList>;
|
|
483
713
|
chain_id?: string | number;
|
|
484
714
|
data?: string;
|
|
485
715
|
from?: string;
|
|
@@ -489,9 +719,19 @@ export declare namespace EthereumSendTransactionRpcResponse {
|
|
|
489
719
|
max_priority_fee_per_gas?: string | number;
|
|
490
720
|
nonce?: string | number;
|
|
491
721
|
to?: string;
|
|
492
|
-
type?: 0 | 1 | 2;
|
|
722
|
+
type?: 0 | 1 | 2 | 4;
|
|
493
723
|
value?: string | number;
|
|
494
724
|
}
|
|
725
|
+
namespace TransactionRequest {
|
|
726
|
+
interface AuthorizationList {
|
|
727
|
+
chain_id: string | number;
|
|
728
|
+
contract: string;
|
|
729
|
+
nonce: string | number;
|
|
730
|
+
r: string;
|
|
731
|
+
s: string;
|
|
732
|
+
y_parity: number;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
495
735
|
}
|
|
496
736
|
}
|
|
497
737
|
/**
|
|
@@ -761,10 +1001,19 @@ export declare namespace WalletCreateParams {
|
|
|
761
1001
|
}
|
|
762
1002
|
}
|
|
763
1003
|
export interface WalletListParams extends CursorParams {
|
|
1004
|
+
/**
|
|
1005
|
+
* Filter wallets by authorization public key. Returns wallets owned by key quorums
|
|
1006
|
+
* that include the specified P-256 public key (base64-encoded DER format). Cannot
|
|
1007
|
+
* be used together with user_id.
|
|
1008
|
+
*/
|
|
1009
|
+
authorization_key?: string;
|
|
764
1010
|
/**
|
|
765
1011
|
* The wallet chain types.
|
|
766
1012
|
*/
|
|
767
1013
|
chain_type?: WalletChainType;
|
|
1014
|
+
/**
|
|
1015
|
+
* Filter wallets by user ID. Cannot be used together with authorization_key.
|
|
1016
|
+
*/
|
|
768
1017
|
user_id?: string;
|
|
769
1018
|
}
|
|
770
1019
|
export interface WalletExportParams {
|
|
@@ -863,30 +1112,30 @@ export declare namespace WalletRawSignParams {
|
|
|
863
1112
|
/**
|
|
864
1113
|
* The encoding scheme for the bytes.
|
|
865
1114
|
*/
|
|
866
|
-
encoding: 'utf-8' | 'hex';
|
|
1115
|
+
encoding: 'utf-8' | 'hex' | 'base64';
|
|
867
1116
|
/**
|
|
868
1117
|
* The hash function to hash the bytes.
|
|
869
1118
|
*/
|
|
870
|
-
hash_function: 'keccak256' | 'sha256';
|
|
1119
|
+
hash_function: 'keccak256' | 'sha256' | 'blake2b256';
|
|
871
1120
|
}
|
|
872
1121
|
}
|
|
873
1122
|
export type WalletRpcParams = WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSignUserOperationRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignMessageRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
|
|
874
1123
|
export declare namespace WalletRpcParams {
|
|
875
1124
|
interface EthereumPersonalSignRpcInput {
|
|
876
1125
|
/**
|
|
877
|
-
* Body param
|
|
1126
|
+
* Body param
|
|
878
1127
|
*/
|
|
879
1128
|
method: 'personal_sign';
|
|
880
1129
|
/**
|
|
881
|
-
* Body param
|
|
1130
|
+
* Body param
|
|
882
1131
|
*/
|
|
883
1132
|
params: EthereumPersonalSignRpcInput.Params;
|
|
884
1133
|
/**
|
|
885
|
-
* Body param
|
|
1134
|
+
* Body param
|
|
886
1135
|
*/
|
|
887
1136
|
address?: string;
|
|
888
1137
|
/**
|
|
889
|
-
* Body param
|
|
1138
|
+
* Body param
|
|
890
1139
|
*/
|
|
891
1140
|
chain_type?: 'ethereum';
|
|
892
1141
|
/**
|
|
@@ -908,19 +1157,19 @@ export declare namespace WalletRpcParams {
|
|
|
908
1157
|
}
|
|
909
1158
|
interface EthereumSignTypedDataRpcInput {
|
|
910
1159
|
/**
|
|
911
|
-
* Body param
|
|
1160
|
+
* Body param
|
|
912
1161
|
*/
|
|
913
1162
|
method: 'eth_signTypedData_v4';
|
|
914
1163
|
/**
|
|
915
|
-
* Body param
|
|
1164
|
+
* Body param
|
|
916
1165
|
*/
|
|
917
1166
|
params: EthereumSignTypedDataRpcInput.Params;
|
|
918
1167
|
/**
|
|
919
|
-
* Body param
|
|
1168
|
+
* Body param
|
|
920
1169
|
*/
|
|
921
1170
|
address?: string;
|
|
922
1171
|
/**
|
|
923
|
-
* Body param
|
|
1172
|
+
* Body param
|
|
924
1173
|
*/
|
|
925
1174
|
chain_type?: 'ethereum';
|
|
926
1175
|
/**
|
|
@@ -961,19 +1210,19 @@ export declare namespace WalletRpcParams {
|
|
|
961
1210
|
}
|
|
962
1211
|
interface EthereumSignTransactionRpcInput {
|
|
963
1212
|
/**
|
|
964
|
-
* Body param
|
|
1213
|
+
* Body param
|
|
965
1214
|
*/
|
|
966
1215
|
method: 'eth_signTransaction';
|
|
967
1216
|
/**
|
|
968
|
-
* Body param
|
|
1217
|
+
* Body param
|
|
969
1218
|
*/
|
|
970
1219
|
params: EthereumSignTransactionRpcInput.Params;
|
|
971
1220
|
/**
|
|
972
|
-
* Body param
|
|
1221
|
+
* Body param
|
|
973
1222
|
*/
|
|
974
1223
|
address?: string;
|
|
975
1224
|
/**
|
|
976
|
-
* Body param
|
|
1225
|
+
* Body param
|
|
977
1226
|
*/
|
|
978
1227
|
chain_type?: 'ethereum';
|
|
979
1228
|
/**
|
|
@@ -993,6 +1242,7 @@ export declare namespace WalletRpcParams {
|
|
|
993
1242
|
}
|
|
994
1243
|
namespace Params {
|
|
995
1244
|
interface Transaction {
|
|
1245
|
+
authorization_list?: Array<Transaction.AuthorizationList>;
|
|
996
1246
|
chain_id?: string | number;
|
|
997
1247
|
data?: string;
|
|
998
1248
|
from?: string;
|
|
@@ -1002,26 +1252,36 @@ export declare namespace WalletRpcParams {
|
|
|
1002
1252
|
max_priority_fee_per_gas?: string | number;
|
|
1003
1253
|
nonce?: string | number;
|
|
1004
1254
|
to?: string;
|
|
1005
|
-
type?: 0 | 1 | 2;
|
|
1255
|
+
type?: 0 | 1 | 2 | 4;
|
|
1006
1256
|
value?: string | number;
|
|
1007
1257
|
}
|
|
1258
|
+
namespace Transaction {
|
|
1259
|
+
interface AuthorizationList {
|
|
1260
|
+
chain_id: string | number;
|
|
1261
|
+
contract: string;
|
|
1262
|
+
nonce: string | number;
|
|
1263
|
+
r: string;
|
|
1264
|
+
s: string;
|
|
1265
|
+
y_parity: number;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1008
1268
|
}
|
|
1009
1269
|
}
|
|
1010
1270
|
interface EthereumSignUserOperationRpcInput {
|
|
1011
1271
|
/**
|
|
1012
|
-
* Body param
|
|
1272
|
+
* Body param
|
|
1013
1273
|
*/
|
|
1014
1274
|
method: 'eth_signUserOperation';
|
|
1015
1275
|
/**
|
|
1016
|
-
* Body param
|
|
1276
|
+
* Body param
|
|
1017
1277
|
*/
|
|
1018
1278
|
params: EthereumSignUserOperationRpcInput.Params;
|
|
1019
1279
|
/**
|
|
1020
|
-
* Body param
|
|
1280
|
+
* Body param
|
|
1021
1281
|
*/
|
|
1022
1282
|
address?: string;
|
|
1023
1283
|
/**
|
|
1024
|
-
* Body param
|
|
1284
|
+
* Body param
|
|
1025
1285
|
*/
|
|
1026
1286
|
chain_type?: 'ethereum';
|
|
1027
1287
|
/**
|
|
@@ -1060,27 +1320,27 @@ export declare namespace WalletRpcParams {
|
|
|
1060
1320
|
}
|
|
1061
1321
|
interface EthereumSendTransactionRpcInput {
|
|
1062
1322
|
/**
|
|
1063
|
-
* Body param
|
|
1323
|
+
* Body param
|
|
1064
1324
|
*/
|
|
1065
1325
|
caip2: string;
|
|
1066
1326
|
/**
|
|
1067
|
-
* Body param
|
|
1327
|
+
* Body param
|
|
1068
1328
|
*/
|
|
1069
1329
|
method: 'eth_sendTransaction';
|
|
1070
1330
|
/**
|
|
1071
|
-
* Body param
|
|
1331
|
+
* Body param
|
|
1072
1332
|
*/
|
|
1073
1333
|
params: EthereumSendTransactionRpcInput.Params;
|
|
1074
1334
|
/**
|
|
1075
|
-
* Body param
|
|
1335
|
+
* Body param
|
|
1076
1336
|
*/
|
|
1077
1337
|
address?: string;
|
|
1078
1338
|
/**
|
|
1079
|
-
* Body param
|
|
1339
|
+
* Body param
|
|
1080
1340
|
*/
|
|
1081
1341
|
chain_type?: 'ethereum';
|
|
1082
1342
|
/**
|
|
1083
|
-
* Body param
|
|
1343
|
+
* Body param
|
|
1084
1344
|
*/
|
|
1085
1345
|
sponsor?: boolean;
|
|
1086
1346
|
/**
|
|
@@ -1100,6 +1360,7 @@ export declare namespace WalletRpcParams {
|
|
|
1100
1360
|
}
|
|
1101
1361
|
namespace Params {
|
|
1102
1362
|
interface Transaction {
|
|
1363
|
+
authorization_list?: Array<Transaction.AuthorizationList>;
|
|
1103
1364
|
chain_id?: string | number;
|
|
1104
1365
|
data?: string;
|
|
1105
1366
|
from?: string;
|
|
@@ -1109,26 +1370,36 @@ export declare namespace WalletRpcParams {
|
|
|
1109
1370
|
max_priority_fee_per_gas?: string | number;
|
|
1110
1371
|
nonce?: string | number;
|
|
1111
1372
|
to?: string;
|
|
1112
|
-
type?: 0 | 1 | 2;
|
|
1373
|
+
type?: 0 | 1 | 2 | 4;
|
|
1113
1374
|
value?: string | number;
|
|
1114
1375
|
}
|
|
1376
|
+
namespace Transaction {
|
|
1377
|
+
interface AuthorizationList {
|
|
1378
|
+
chain_id: string | number;
|
|
1379
|
+
contract: string;
|
|
1380
|
+
nonce: string | number;
|
|
1381
|
+
r: string;
|
|
1382
|
+
s: string;
|
|
1383
|
+
y_parity: number;
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1115
1386
|
}
|
|
1116
1387
|
}
|
|
1117
1388
|
interface EthereumSign7702AuthorizationRpcInput {
|
|
1118
1389
|
/**
|
|
1119
|
-
* Body param
|
|
1390
|
+
* Body param
|
|
1120
1391
|
*/
|
|
1121
1392
|
method: 'eth_sign7702Authorization';
|
|
1122
1393
|
/**
|
|
1123
|
-
* Body param
|
|
1394
|
+
* Body param
|
|
1124
1395
|
*/
|
|
1125
1396
|
params: EthereumSign7702AuthorizationRpcInput.Params;
|
|
1126
1397
|
/**
|
|
1127
|
-
* Body param
|
|
1398
|
+
* Body param
|
|
1128
1399
|
*/
|
|
1129
1400
|
address?: string;
|
|
1130
1401
|
/**
|
|
1131
|
-
* Body param
|
|
1402
|
+
* Body param
|
|
1132
1403
|
*/
|
|
1133
1404
|
chain_type?: 'ethereum';
|
|
1134
1405
|
/**
|
|
@@ -1151,19 +1422,19 @@ export declare namespace WalletRpcParams {
|
|
|
1151
1422
|
}
|
|
1152
1423
|
interface EthereumSecp256k1SignRpcInput {
|
|
1153
1424
|
/**
|
|
1154
|
-
* Body param
|
|
1425
|
+
* Body param
|
|
1155
1426
|
*/
|
|
1156
1427
|
method: 'secp256k1_sign';
|
|
1157
1428
|
/**
|
|
1158
|
-
* Body param
|
|
1429
|
+
* Body param
|
|
1159
1430
|
*/
|
|
1160
1431
|
params: EthereumSecp256k1SignRpcInput.Params;
|
|
1161
1432
|
/**
|
|
1162
|
-
* Body param
|
|
1433
|
+
* Body param
|
|
1163
1434
|
*/
|
|
1164
1435
|
address?: string;
|
|
1165
1436
|
/**
|
|
1166
|
-
* Body param
|
|
1437
|
+
* Body param
|
|
1167
1438
|
*/
|
|
1168
1439
|
chain_type?: 'ethereum';
|
|
1169
1440
|
/**
|
|
@@ -1184,19 +1455,19 @@ export declare namespace WalletRpcParams {
|
|
|
1184
1455
|
}
|
|
1185
1456
|
interface SolanaSignMessageRpcInput {
|
|
1186
1457
|
/**
|
|
1187
|
-
* Body param
|
|
1458
|
+
* Body param
|
|
1188
1459
|
*/
|
|
1189
1460
|
method: 'signMessage';
|
|
1190
1461
|
/**
|
|
1191
|
-
* Body param
|
|
1462
|
+
* Body param
|
|
1192
1463
|
*/
|
|
1193
1464
|
params: SolanaSignMessageRpcInput.Params;
|
|
1194
1465
|
/**
|
|
1195
|
-
* Body param
|
|
1466
|
+
* Body param
|
|
1196
1467
|
*/
|
|
1197
1468
|
address?: string;
|
|
1198
1469
|
/**
|
|
1199
|
-
* Body param
|
|
1470
|
+
* Body param
|
|
1200
1471
|
*/
|
|
1201
1472
|
chain_type?: 'solana';
|
|
1202
1473
|
/**
|
|
@@ -1218,19 +1489,19 @@ export declare namespace WalletRpcParams {
|
|
|
1218
1489
|
}
|
|
1219
1490
|
interface SolanaSignTransactionRpcInput {
|
|
1220
1491
|
/**
|
|
1221
|
-
* Body param
|
|
1492
|
+
* Body param
|
|
1222
1493
|
*/
|
|
1223
1494
|
method: 'signTransaction';
|
|
1224
1495
|
/**
|
|
1225
|
-
* Body param
|
|
1496
|
+
* Body param
|
|
1226
1497
|
*/
|
|
1227
1498
|
params: SolanaSignTransactionRpcInput.Params;
|
|
1228
1499
|
/**
|
|
1229
|
-
* Body param
|
|
1500
|
+
* Body param
|
|
1230
1501
|
*/
|
|
1231
1502
|
address?: string;
|
|
1232
1503
|
/**
|
|
1233
|
-
* Body param
|
|
1504
|
+
* Body param
|
|
1234
1505
|
*/
|
|
1235
1506
|
chain_type?: 'solana';
|
|
1236
1507
|
/**
|
|
@@ -1252,27 +1523,27 @@ export declare namespace WalletRpcParams {
|
|
|
1252
1523
|
}
|
|
1253
1524
|
interface SolanaSignAndSendTransactionRpcInput {
|
|
1254
1525
|
/**
|
|
1255
|
-
* Body param
|
|
1526
|
+
* Body param
|
|
1256
1527
|
*/
|
|
1257
1528
|
caip2: string;
|
|
1258
1529
|
/**
|
|
1259
|
-
* Body param
|
|
1530
|
+
* Body param
|
|
1260
1531
|
*/
|
|
1261
1532
|
method: 'signAndSendTransaction';
|
|
1262
1533
|
/**
|
|
1263
|
-
* Body param
|
|
1534
|
+
* Body param
|
|
1264
1535
|
*/
|
|
1265
1536
|
params: SolanaSignAndSendTransactionRpcInput.Params;
|
|
1266
1537
|
/**
|
|
1267
|
-
* Body param
|
|
1538
|
+
* Body param
|
|
1268
1539
|
*/
|
|
1269
1540
|
address?: string;
|
|
1270
1541
|
/**
|
|
1271
|
-
* Body param
|
|
1542
|
+
* Body param
|
|
1272
1543
|
*/
|
|
1273
1544
|
chain_type?: 'solana';
|
|
1274
1545
|
/**
|
|
1275
|
-
* Body param
|
|
1546
|
+
* Body param
|
|
1276
1547
|
*/
|
|
1277
1548
|
sponsor?: boolean;
|
|
1278
1549
|
/**
|
|
@@ -1332,6 +1603,12 @@ export declare namespace WalletSubmitImportParams {
|
|
|
1332
1603
|
* The index of the wallet to import.
|
|
1333
1604
|
*/
|
|
1334
1605
|
index: number;
|
|
1606
|
+
/**
|
|
1607
|
+
* Optional HPKE configuration for wallet import decryption. These parameters allow
|
|
1608
|
+
* importing wallets encrypted by external providers that use different HPKE
|
|
1609
|
+
* configurations.
|
|
1610
|
+
*/
|
|
1611
|
+
hpke_config?: WalletsAPI.HpkeImportConfig;
|
|
1335
1612
|
}
|
|
1336
1613
|
interface PrivateKeySubmitInput {
|
|
1337
1614
|
/**
|
|
@@ -1357,6 +1634,12 @@ export declare namespace WalletSubmitImportParams {
|
|
|
1357
1634
|
*/
|
|
1358
1635
|
encryption_type: 'HPKE';
|
|
1359
1636
|
entropy_type: 'private-key';
|
|
1637
|
+
/**
|
|
1638
|
+
* Optional HPKE configuration for wallet import decryption. These parameters allow
|
|
1639
|
+
* importing wallets encrypted by external providers that use different HPKE
|
|
1640
|
+
* configurations.
|
|
1641
|
+
*/
|
|
1642
|
+
hpke_config?: WalletsAPI.HpkeImportConfig;
|
|
1360
1643
|
}
|
|
1361
1644
|
interface AdditionalSigner {
|
|
1362
1645
|
signer_id: string;
|
|
@@ -1381,8 +1664,7 @@ export interface WalletUpdateParams {
|
|
|
1381
1664
|
*/
|
|
1382
1665
|
owner?: WalletUpdateParams.PublicKeyOwner | WalletUpdateParams.UserOwner | null;
|
|
1383
1666
|
/**
|
|
1384
|
-
* Body param
|
|
1385
|
-
* provide this, do not specify an owner.
|
|
1667
|
+
* Body param
|
|
1386
1668
|
*/
|
|
1387
1669
|
owner_id?: string | null;
|
|
1388
1670
|
/**
|
|
@@ -1482,7 +1764,7 @@ export declare namespace WalletCreateWalletsWithRecoveryParams {
|
|
|
1482
1764
|
}
|
|
1483
1765
|
}
|
|
1484
1766
|
export declare namespace Wallets {
|
|
1485
|
-
export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type
|
|
1767
|
+
export { type WalletRevokeResponse as WalletRevokeResponse, type CurveSigningChainType as CurveSigningChainType, type ExtendedChainType as ExtendedChainType, type FirstClassChainType as FirstClassChainType, type WalletChainType as WalletChainType, type WalletCustodian as WalletCustodian, type CustodialWalletProvider as CustodialWalletProvider, type CustodialWalletChainType as CustodialWalletChainType, type CustodialWalletCreateInput as CustodialWalletCreateInput, type CustodialWallet as CustodialWallet, type HpkeImportConfig as HpkeImportConfig, type SuiCommandName as SuiCommandName, type Wallet as Wallet, type WalletBatchItemInput as WalletBatchItemInput, type WalletBatchCreateInput as WalletBatchCreateInput, type WalletBatchCreateResult as WalletBatchCreateResult, type WalletBatchCreateResponse as WalletBatchCreateResponse, type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput, type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput, type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput, type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput, type EthereumSignUserOperationRpcInput as EthereumSignUserOperationRpcInput, type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput, type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput, type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput, type SolanaSignAndSendTransactionRpcInput as SolanaSignAndSendTransactionRpcInput, type SolanaSignMessageRpcInput as SolanaSignMessageRpcInput, type EthereumSignTransactionRpcResponse as EthereumSignTransactionRpcResponse, type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse, type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse, type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse, type EthereumSignUserOperationRpcResponse as EthereumSignUserOperationRpcResponse, type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse, type EthereumSecp256k1SignRpcResponse as EthereumSecp256k1SignRpcResponse, type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse, type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse, type SolanaSignMessageRpcResponse as SolanaSignMessageRpcResponse, type WalletExportResponse as WalletExportResponse, type WalletInitImportResponse as WalletInitImportResponse, type WalletRawSignResponse as WalletRawSignResponse, type WalletRpcResponse as WalletRpcResponse, type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse, type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse, type WalletsCursor as WalletsCursor, type WalletCreateParams as WalletCreateParams, type WalletListParams as WalletListParams, type WalletExportParams as WalletExportParams, type WalletInitImportParams as WalletInitImportParams, type WalletRawSignParams as WalletRawSignParams, type WalletRpcParams as WalletRpcParams, type WalletSubmitImportParams as WalletSubmitImportParams, type WalletUpdateParams as WalletUpdateParams, type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams, type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams, };
|
|
1486
1768
|
export { Transactions as Transactions, type TransactionGetResponse as TransactionGetResponse, type TransactionGetParams as TransactionGetParams, };
|
|
1487
1769
|
export { Balance as Balance, type BalanceGetResponse as BalanceGetResponse, type BalanceGetParams as BalanceGetParams, };
|
|
1488
1770
|
}
|