@privy-io/api-types 0.7.0 → 0.8.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 +43 -0
- package/client.d.mts +37 -28
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -28
- 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/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 +139 -70
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +139 -70
- 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 +165 -81
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +165 -81
- 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 +17 -14
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +17 -14
- 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/policies.d.mts +335 -926
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +335 -926
- 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 +155 -93
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +155 -93
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +61 -94
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +61 -94
- 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 +187 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +187 -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/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 +1 -0
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +1 -0
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/wallets.d.mts +2377 -971
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2377 -971
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +18 -6
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +18 -6
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +438 -33
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +438 -33
- 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 +721 -72
- package/src/resources/accounts.ts +93 -120
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +187 -110
- package/src/resources/client-auth.ts +1358 -893
- 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 +368 -47
- package/src/resources/intents.ts +370 -3100
- package/src/resources/key-quorums.ts +100 -32
- package/src/resources/policies.ts +583 -1558
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +185 -91
- package/src/resources/users.ts +79 -132
- package/src/resources/wallet-actions.ts +251 -0
- package/src/resources/wallets/index.ts +144 -16
- package/src/resources/wallets/transactions.ts +2 -0
- package/src/resources/wallets/wallets.ts +2893 -1023
- package/src/resources/webhooks.ts +547 -47
- 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
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as WalletsAPI from './wallets';
|
|
5
|
+
import * as AppsAPI from '../apps';
|
|
6
|
+
import * as SharedAPI from '../shared';
|
|
5
7
|
import * as BalanceAPI from './balance';
|
|
6
8
|
import { Balance, BalanceGetParams, BalanceGetResponse } from './balance';
|
|
7
9
|
import * as TransactionsAPI from './transactions';
|
|
@@ -73,7 +75,11 @@ export class Wallets extends APIResource {
|
|
|
73
75
|
params: WalletExportParams,
|
|
74
76
|
options?: RequestOptions,
|
|
75
77
|
): APIPromise<WalletExportResponse> {
|
|
76
|
-
const {
|
|
78
|
+
const {
|
|
79
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
80
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
81
|
+
...body
|
|
82
|
+
} = params;
|
|
77
83
|
return this._client.post(path`/v1/wallets/${walletID}/export`, {
|
|
78
84
|
body,
|
|
79
85
|
...options,
|
|
@@ -82,6 +88,7 @@ export class Wallets extends APIResource {
|
|
|
82
88
|
...(privyAuthorizationSignature != null ?
|
|
83
89
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
84
90
|
: undefined),
|
|
91
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
85
92
|
},
|
|
86
93
|
options?.headers,
|
|
87
94
|
]),
|
|
@@ -111,7 +118,7 @@ export class Wallets extends APIResource {
|
|
|
111
118
|
*
|
|
112
119
|
* @example
|
|
113
120
|
* ```ts
|
|
114
|
-
* const
|
|
121
|
+
* const rawSignResponse = await client.wallets._rawSign(
|
|
115
122
|
* 'wallet_id',
|
|
116
123
|
* {
|
|
117
124
|
* params: {
|
|
@@ -125,10 +132,11 @@ export class Wallets extends APIResource {
|
|
|
125
132
|
walletID: string,
|
|
126
133
|
params: WalletRawSignParams,
|
|
127
134
|
options?: RequestOptions,
|
|
128
|
-
): APIPromise<
|
|
135
|
+
): APIPromise<RawSignResponse> {
|
|
129
136
|
const {
|
|
130
137
|
'privy-authorization-signature': privyAuthorizationSignature,
|
|
131
138
|
'privy-idempotency-key': privyIdempotencyKey,
|
|
139
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
132
140
|
...body
|
|
133
141
|
} = params;
|
|
134
142
|
return this._client.post(path`/v1/wallets/${walletID}/raw_sign`, {
|
|
@@ -140,6 +148,7 @@ export class Wallets extends APIResource {
|
|
|
140
148
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
141
149
|
: undefined),
|
|
142
150
|
...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined),
|
|
151
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
143
152
|
},
|
|
144
153
|
options?.headers,
|
|
145
154
|
]),
|
|
@@ -155,7 +164,12 @@ export class Wallets extends APIResource {
|
|
|
155
164
|
* 'wallet_id',
|
|
156
165
|
* {
|
|
157
166
|
* method: 'eth_sendTransaction',
|
|
158
|
-
* params: {
|
|
167
|
+
* params: {
|
|
168
|
+
* transaction: {
|
|
169
|
+
* to: '0x0000000000000000000000000000000000000000',
|
|
170
|
+
* value: 1,
|
|
171
|
+
* },
|
|
172
|
+
* },
|
|
159
173
|
* chain_type: 'ethereum',
|
|
160
174
|
* },
|
|
161
175
|
* );
|
|
@@ -165,6 +179,7 @@ export class Wallets extends APIResource {
|
|
|
165
179
|
const {
|
|
166
180
|
'privy-authorization-signature': privyAuthorizationSignature,
|
|
167
181
|
'privy-idempotency-key': privyIdempotencyKey,
|
|
182
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
168
183
|
...body
|
|
169
184
|
} = params;
|
|
170
185
|
return this._client.post(path`/v1/wallets/${walletID}/rpc`, {
|
|
@@ -176,6 +191,7 @@ export class Wallets extends APIResource {
|
|
|
176
191
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
177
192
|
: undefined),
|
|
178
193
|
...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined),
|
|
194
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
179
195
|
},
|
|
180
196
|
options?.headers,
|
|
181
197
|
]),
|
|
@@ -216,7 +232,11 @@ export class Wallets extends APIResource {
|
|
|
216
232
|
* ```
|
|
217
233
|
*/
|
|
218
234
|
_update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet> {
|
|
219
|
-
const {
|
|
235
|
+
const {
|
|
236
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
237
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
238
|
+
...body
|
|
239
|
+
} = params;
|
|
220
240
|
return this._client.patch(path`/v1/wallets/${walletID}`, {
|
|
221
241
|
body,
|
|
222
242
|
...options,
|
|
@@ -225,6 +245,7 @@ export class Wallets extends APIResource {
|
|
|
225
245
|
...(privyAuthorizationSignature != null ?
|
|
226
246
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
227
247
|
: undefined),
|
|
248
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
228
249
|
},
|
|
229
250
|
options?.headers,
|
|
230
251
|
]),
|
|
@@ -237,6 +258,9 @@ export class Wallets extends APIResource {
|
|
|
237
258
|
* @example
|
|
238
259
|
* ```ts
|
|
239
260
|
* const response = await client.wallets.authenticateWithJwt({
|
|
261
|
+
* encryption_type: 'HPKE',
|
|
262
|
+
* recipient_public_key:
|
|
263
|
+
* 'DAQcDQgAEx4aoeD72yykviK+fckqE2CItVIGn1rCnvCXZ1HgpOcMEMialRmTrqIK4oZlYd1',
|
|
240
264
|
* user_jwt:
|
|
241
265
|
* 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30',
|
|
242
266
|
* });
|
|
@@ -337,6 +361,72 @@ export type WalletChainType =
|
|
|
337
361
|
| 'starknet'
|
|
338
362
|
| 'spark';
|
|
339
363
|
|
|
364
|
+
/**
|
|
365
|
+
* The role of an authorization key, controlling what actions it can authorize on a
|
|
366
|
+
* wallet.
|
|
367
|
+
*/
|
|
368
|
+
export type AuthorizationKeyRole = 'root' | 'manager' | 'delegated-actions' | null;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* The entropy type of the wallet.
|
|
372
|
+
*/
|
|
373
|
+
export type WalletEntropyType = 'hd' | 'private-key';
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* The derivation strategy used for Solana wallets.
|
|
377
|
+
*/
|
|
378
|
+
export type SolanaWalletDerivationStrategy = 'ENTROPY_TO_SEED' | 'ENTROPY_TO_MNEMONIC_TO_SEED';
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* An optional list of up to one policy ID to enforce on the wallet.
|
|
382
|
+
*/
|
|
383
|
+
export type PolicyInput = Array<string>;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* A single additional signer for a wallet, with an optional policy override.
|
|
387
|
+
*/
|
|
388
|
+
export interface AdditionalSignerItemInput {
|
|
389
|
+
/**
|
|
390
|
+
* A unique identifier for a key quorum.
|
|
391
|
+
*/
|
|
392
|
+
signer_id: SharedAPI.KeyQuorumID;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* An optional list of up to one policy ID to enforce on the wallet.
|
|
396
|
+
*/
|
|
397
|
+
override_policy_ids?: PolicyInput;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Additional signers for the wallet.
|
|
402
|
+
*/
|
|
403
|
+
export type AdditionalSignerInput = Array<AdditionalSignerItemInput>;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* A single additional signer on a wallet, with an optional policy override.
|
|
407
|
+
*/
|
|
408
|
+
export interface WalletAdditionalSignerItem {
|
|
409
|
+
/**
|
|
410
|
+
* A unique identifier for a key quorum.
|
|
411
|
+
*/
|
|
412
|
+
signer_id: SharedAPI.KeyQuorumID;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* An optional list of up to one policy ID to enforce on the wallet.
|
|
416
|
+
*/
|
|
417
|
+
override_policy_ids?: PolicyInput;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Additional signers for the wallet.
|
|
422
|
+
*/
|
|
423
|
+
export type WalletAdditionalSigner = Array<WalletAdditionalSignerItem>;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* A blockchain wallet address (Ethereum or Solana).
|
|
427
|
+
*/
|
|
428
|
+
export type Address = string;
|
|
429
|
+
|
|
340
430
|
/**
|
|
341
431
|
* Information about the custodian managing this wallet.
|
|
342
432
|
*/
|
|
@@ -360,7 +450,7 @@ export type CustodialWalletProvider = 'bridge';
|
|
|
360
450
|
/**
|
|
361
451
|
* The chain type of the custodial wallet.
|
|
362
452
|
*/
|
|
363
|
-
export type CustodialWalletChainType = 'ethereum';
|
|
453
|
+
export type CustodialWalletChainType = 'ethereum' | 'solana';
|
|
364
454
|
|
|
365
455
|
/**
|
|
366
456
|
* The input for creating a custodial wallet.
|
|
@@ -382,27 +472,21 @@ export interface CustodialWalletCreateInput {
|
|
|
382
472
|
*/
|
|
383
473
|
provider_user_id: string;
|
|
384
474
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
policy_ids?: Array<string>;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export namespace CustodialWalletCreateInput {
|
|
393
|
-
export interface AdditionalSigner {
|
|
394
|
-
signer_id: string;
|
|
395
|
-
|
|
396
|
-
override_policy_ids?: Array<string>;
|
|
397
|
-
}
|
|
475
|
+
/**
|
|
476
|
+
* Additional signers for the wallet.
|
|
477
|
+
*/
|
|
478
|
+
additional_signers?: AdditionalSignerInput;
|
|
398
479
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
480
|
+
/**
|
|
481
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
482
|
+
* null to remove the current owner.
|
|
483
|
+
*/
|
|
484
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
402
485
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
486
|
+
/**
|
|
487
|
+
* An optional list of up to one policy ID to enforce on the wallet.
|
|
488
|
+
*/
|
|
489
|
+
policy_ids?: PolicyInput;
|
|
406
490
|
}
|
|
407
491
|
|
|
408
492
|
/**
|
|
@@ -425,457 +509,608 @@ export interface CustodialWallet {
|
|
|
425
509
|
|
|
426
510
|
owner_id: string | null;
|
|
427
511
|
|
|
428
|
-
|
|
512
|
+
/**
|
|
513
|
+
* Additional signers for the wallet.
|
|
514
|
+
*/
|
|
515
|
+
additional_signers?: WalletAdditionalSigner;
|
|
429
516
|
|
|
430
517
|
policy_ids?: Array<string>;
|
|
431
518
|
}
|
|
432
519
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
520
|
+
/**
|
|
521
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
522
|
+
*/
|
|
523
|
+
export type HpkeEncryption = 'HPKE';
|
|
436
524
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
525
|
+
/**
|
|
526
|
+
* The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
|
|
527
|
+
* format.
|
|
528
|
+
*/
|
|
529
|
+
export type RecipientPublicKey = string;
|
|
440
530
|
|
|
441
531
|
/**
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
* configurations.
|
|
532
|
+
* The export type. 'display' is for showing the key to the user in the UI,
|
|
533
|
+
* 'client' is for exporting to the client application.
|
|
445
534
|
*/
|
|
446
|
-
export
|
|
535
|
+
export type ExportType = 'display' | 'client';
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
|
|
539
|
+
*/
|
|
540
|
+
export interface PrivateKeyExportInput {
|
|
447
541
|
/**
|
|
448
|
-
*
|
|
449
|
-
* base64-encoded bytes.
|
|
542
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
450
543
|
*/
|
|
451
|
-
|
|
544
|
+
encryption_type: HpkeEncryption;
|
|
452
545
|
|
|
453
546
|
/**
|
|
454
|
-
* The
|
|
455
|
-
*
|
|
547
|
+
* The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
|
|
548
|
+
* format.
|
|
456
549
|
*/
|
|
457
|
-
|
|
550
|
+
recipient_public_key: RecipientPublicKey;
|
|
551
|
+
|
|
552
|
+
export_seed_phrase?: boolean;
|
|
458
553
|
|
|
459
554
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
555
|
+
* The export type. 'display' is for showing the key to the user in the UI,
|
|
556
|
+
* 'client' is for exporting to the client application.
|
|
462
557
|
*/
|
|
463
|
-
|
|
558
|
+
export_type?: ExportType;
|
|
464
559
|
}
|
|
465
560
|
|
|
466
561
|
/**
|
|
467
|
-
*
|
|
562
|
+
* Response containing HPKE-encrypted wallet data (private key or seed phrase).
|
|
468
563
|
*/
|
|
469
|
-
export
|
|
564
|
+
export interface PrivateKeyExportResponse {
|
|
565
|
+
ciphertext: string;
|
|
470
566
|
|
|
471
|
-
|
|
472
|
-
* A wallet managed by Privy's wallet infrastructure.
|
|
473
|
-
*/
|
|
474
|
-
export interface Wallet {
|
|
475
|
-
/**
|
|
476
|
-
* Unique ID of the wallet. This will be the primary identifier when using the
|
|
477
|
-
* wallet in the future.
|
|
478
|
-
*/
|
|
479
|
-
id: string;
|
|
567
|
+
encapsulated_key: string;
|
|
480
568
|
|
|
481
569
|
/**
|
|
482
|
-
*
|
|
570
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
483
571
|
*/
|
|
484
|
-
|
|
572
|
+
encryption_type: HpkeEncryption;
|
|
573
|
+
}
|
|
485
574
|
|
|
575
|
+
/**
|
|
576
|
+
* Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
|
|
577
|
+
*/
|
|
578
|
+
export interface SeedPhraseExportInput {
|
|
486
579
|
/**
|
|
487
|
-
*
|
|
580
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
488
581
|
*/
|
|
489
|
-
|
|
582
|
+
encryption_type: HpkeEncryption;
|
|
490
583
|
|
|
491
584
|
/**
|
|
492
|
-
* The
|
|
585
|
+
* The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
|
|
586
|
+
* format.
|
|
493
587
|
*/
|
|
494
|
-
|
|
588
|
+
recipient_public_key: RecipientPublicKey;
|
|
589
|
+
|
|
590
|
+
export_seed_phrase?: boolean;
|
|
495
591
|
|
|
496
592
|
/**
|
|
497
|
-
*
|
|
593
|
+
* The export type. 'display' is for showing the key to the user in the UI,
|
|
594
|
+
* 'client' is for exporting to the client application.
|
|
498
595
|
*/
|
|
499
|
-
|
|
596
|
+
export_type?: ExportType;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Response containing HPKE-encrypted wallet data (private key or seed phrase).
|
|
601
|
+
*/
|
|
602
|
+
export interface SeedPhraseExportResponse {
|
|
603
|
+
ciphertext: string;
|
|
604
|
+
|
|
605
|
+
encapsulated_key: string;
|
|
500
606
|
|
|
501
607
|
/**
|
|
502
|
-
*
|
|
503
|
-
* was exported.
|
|
608
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
504
609
|
*/
|
|
505
|
-
|
|
610
|
+
encryption_type: HpkeEncryption;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
615
|
+
* `solana`.
|
|
616
|
+
*/
|
|
617
|
+
export type WalletImportSupportedChains = 'ethereum' | 'solana';
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* The entropy type of the wallet to import. Supports `private-key` for raw private
|
|
621
|
+
* keys and `hd` for HD wallet seed phrases.
|
|
622
|
+
*/
|
|
623
|
+
export type WalletImportSupportedEntropyTypes = 'private-key' | 'hd';
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Response from initializing a wallet import, containing the encryption public
|
|
627
|
+
* key.
|
|
628
|
+
*/
|
|
629
|
+
export interface WalletImportInitResponse {
|
|
630
|
+
encryption_public_key: string;
|
|
506
631
|
|
|
507
632
|
/**
|
|
508
|
-
*
|
|
509
|
-
* was imported.
|
|
633
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
510
634
|
*/
|
|
511
|
-
|
|
635
|
+
encryption_type: HpkeEncryption;
|
|
636
|
+
}
|
|
512
637
|
|
|
638
|
+
/**
|
|
639
|
+
* The AEAD algorithm used for HPKE encryption.
|
|
640
|
+
*/
|
|
641
|
+
export type HpkeAeadAlgorithm = 'CHACHA20_POLY1305' | 'AES_GCM256';
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Optional HPKE configuration for wallet import decryption. These parameters allow
|
|
645
|
+
* importing wallets encrypted by external providers that use different HPKE
|
|
646
|
+
* configurations.
|
|
647
|
+
*/
|
|
648
|
+
export interface HpkeImportConfig {
|
|
513
649
|
/**
|
|
514
|
-
*
|
|
650
|
+
* Additional Authenticated Data (AAD) used during encryption. Should be
|
|
651
|
+
* base64-encoded bytes.
|
|
515
652
|
*/
|
|
516
|
-
|
|
653
|
+
aad?: string;
|
|
517
654
|
|
|
518
655
|
/**
|
|
519
|
-
*
|
|
656
|
+
* The AEAD algorithm used for HPKE encryption.
|
|
520
657
|
*/
|
|
521
|
-
|
|
658
|
+
aead_algorithm?: HpkeAeadAlgorithm;
|
|
522
659
|
|
|
523
660
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
661
|
+
* Application-specific context information (INFO) used during HPKE encryption.
|
|
662
|
+
* Should be base64-encoded bytes.
|
|
526
663
|
*/
|
|
527
|
-
|
|
664
|
+
info?: string;
|
|
528
665
|
}
|
|
529
666
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
667
|
+
/**
|
|
668
|
+
* The cryptographic curve type used by the wallet.
|
|
669
|
+
*/
|
|
670
|
+
export type CurveType = 'secp256k1' | 'ed25519' | 'starknet';
|
|
533
671
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
override_policy_ids?: Array<string>;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
672
|
+
/**
|
|
673
|
+
* A BIP-32 hierarchical deterministic wallet derivation path.
|
|
674
|
+
*/
|
|
675
|
+
export type HDPath = string;
|
|
541
676
|
|
|
542
677
|
/**
|
|
543
|
-
*
|
|
678
|
+
* The signing algorithm used by the wallet.
|
|
544
679
|
*/
|
|
545
|
-
export
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
680
|
+
export type SigningAlgorithm = 'ECDSA' | 'EdDSA';
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* A hex-encoded string prefixed with '0x'.
|
|
684
|
+
*/
|
|
685
|
+
export type Hex = string;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
689
|
+
* non-negative integer.
|
|
690
|
+
*/
|
|
691
|
+
export type Quantity = Hex | number;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Exports the private key of the wallet.
|
|
695
|
+
*/
|
|
696
|
+
export interface ExportPrivateKeyRpcInput {
|
|
697
|
+
address: string;
|
|
698
|
+
|
|
699
|
+
method: 'exportPrivateKey';
|
|
550
700
|
|
|
551
701
|
/**
|
|
552
|
-
*
|
|
553
|
-
* will be generated automatically. When updating a wallet, you can set the owner
|
|
554
|
-
* to null to remove the owner.
|
|
702
|
+
* Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
|
|
555
703
|
*/
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
owner_id?: string | null;
|
|
704
|
+
params: PrivateKeyExportInput;
|
|
705
|
+
}
|
|
559
706
|
|
|
707
|
+
/**
|
|
708
|
+
* Response to the `exportPrivateKey` RPC.
|
|
709
|
+
*/
|
|
710
|
+
export interface ExportPrivateKeyRpcResponse {
|
|
560
711
|
/**
|
|
561
|
-
*
|
|
562
|
-
* per wallet.
|
|
712
|
+
* Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
|
|
563
713
|
*/
|
|
564
|
-
|
|
714
|
+
data: PrivateKeyExportInput;
|
|
715
|
+
|
|
716
|
+
method: 'exportPrivateKey';
|
|
565
717
|
}
|
|
566
718
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
719
|
+
/**
|
|
720
|
+
* Exports the seed phrase of the wallet.
|
|
721
|
+
*/
|
|
722
|
+
export interface ExportSeedPhraseRpcInput {
|
|
723
|
+
address: string;
|
|
570
724
|
|
|
571
|
-
|
|
572
|
-
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
573
|
-
* this will override the base policy IDs set on the wallet.
|
|
574
|
-
*/
|
|
575
|
-
override_policy_ids?: Array<string>;
|
|
576
|
-
}
|
|
725
|
+
method: 'exportSeedPhrase';
|
|
577
726
|
|
|
578
727
|
/**
|
|
579
|
-
*
|
|
580
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
581
|
-
* automatically.
|
|
728
|
+
* Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
|
|
582
729
|
*/
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
730
|
+
params: SeedPhraseExportInput;
|
|
731
|
+
}
|
|
586
732
|
|
|
733
|
+
/**
|
|
734
|
+
* Response to the `exportSeedPhrase` RPC.
|
|
735
|
+
*/
|
|
736
|
+
export interface ExportSeedPhraseRpcResponse {
|
|
587
737
|
/**
|
|
588
|
-
*
|
|
589
|
-
* value must start with "did:privy:". If you provide this, do not specify an
|
|
590
|
-
* owner_id as it will be generated automatically.
|
|
738
|
+
* Response containing HPKE-encrypted wallet data (private key or seed phrase).
|
|
591
739
|
*/
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
740
|
+
data: SeedPhraseExportResponse;
|
|
741
|
+
|
|
742
|
+
method: 'exportSeedPhrase';
|
|
595
743
|
}
|
|
596
744
|
|
|
597
745
|
/**
|
|
598
|
-
*
|
|
746
|
+
* Parameters for signing a pre-computed hash with the `raw_sign` RPC.
|
|
599
747
|
*/
|
|
600
|
-
export interface
|
|
748
|
+
export interface RawSignHashParams {
|
|
601
749
|
/**
|
|
602
|
-
*
|
|
750
|
+
* A hex-encoded string prefixed with '0x'.
|
|
603
751
|
*/
|
|
604
|
-
|
|
752
|
+
hash: Hex;
|
|
753
|
+
}
|
|
605
754
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
755
|
+
/**
|
|
756
|
+
* Encoding scheme for bytes in the `raw_sign` RPC.
|
|
757
|
+
*/
|
|
758
|
+
export type RawSignBytesEncoding = 'utf-8' | 'hex' | 'base64';
|
|
610
759
|
|
|
760
|
+
/**
|
|
761
|
+
* Hash function for bytes in the `raw_sign` RPC.
|
|
762
|
+
*/
|
|
763
|
+
export type RawSignBytesHashFunction = 'keccak256' | 'sha256' | 'blake2b256';
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Parameters for hashing and signing bytes with the `raw_sign` RPC.
|
|
767
|
+
*/
|
|
768
|
+
export interface RawSignBytesParams {
|
|
611
769
|
/**
|
|
612
|
-
* The
|
|
613
|
-
* will be generated automatically. When updating a wallet, you can set the owner
|
|
614
|
-
* to null to remove the owner.
|
|
770
|
+
* The bytes to hash and sign.
|
|
615
771
|
*/
|
|
616
|
-
|
|
772
|
+
bytes: string;
|
|
617
773
|
|
|
618
774
|
/**
|
|
619
|
-
*
|
|
620
|
-
* not specify an owner.
|
|
775
|
+
* Encoding scheme for bytes in the `raw_sign` RPC.
|
|
621
776
|
*/
|
|
622
|
-
|
|
777
|
+
encoding: RawSignBytesEncoding;
|
|
623
778
|
|
|
624
779
|
/**
|
|
625
|
-
*
|
|
626
|
-
* Currently, only one policy is supported per wallet.
|
|
780
|
+
* Hash function for bytes in the `raw_sign` RPC.
|
|
627
781
|
*/
|
|
628
|
-
|
|
782
|
+
hash_function: RawSignBytesHashFunction;
|
|
629
783
|
}
|
|
630
784
|
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
637
|
-
* this will override the base policy IDs set on the wallet.
|
|
638
|
-
*/
|
|
639
|
-
override_policy_ids?: Array<string>;
|
|
640
|
-
}
|
|
785
|
+
/**
|
|
786
|
+
* Parameters for the `raw_sign` RPC.
|
|
787
|
+
*/
|
|
788
|
+
export type RawSignInputParams = RawSignHashParams | RawSignBytesParams;
|
|
641
789
|
|
|
790
|
+
/**
|
|
791
|
+
* Provide either `hash` (to sign a pre-computed hash) OR `bytes`, `encoding`, and
|
|
792
|
+
* `hash_function` (to hash and then sign). These options are mutually exclusive.
|
|
793
|
+
*/
|
|
794
|
+
export interface RawSignInput {
|
|
642
795
|
/**
|
|
643
|
-
*
|
|
644
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
645
|
-
* automatically.
|
|
796
|
+
* Parameters for the `raw_sign` RPC.
|
|
646
797
|
*/
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
798
|
+
params: RawSignInputParams;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Data returned by the `raw_sign` RPC.
|
|
803
|
+
*/
|
|
804
|
+
export interface RawSignResponseData {
|
|
805
|
+
encoding: 'hex';
|
|
650
806
|
|
|
651
807
|
/**
|
|
652
|
-
*
|
|
653
|
-
* value must start with "did:privy:". If you provide this, do not specify an
|
|
654
|
-
* owner_id as it will be generated automatically.
|
|
808
|
+
* A hex-encoded string prefixed with '0x'.
|
|
655
809
|
*/
|
|
656
|
-
|
|
657
|
-
user_id: string;
|
|
658
|
-
}
|
|
810
|
+
signature: Hex;
|
|
659
811
|
}
|
|
660
812
|
|
|
661
813
|
/**
|
|
662
|
-
*
|
|
814
|
+
* Response to the `raw_sign` RPC.
|
|
663
815
|
*/
|
|
664
|
-
export interface
|
|
816
|
+
export interface RawSignResponse {
|
|
665
817
|
/**
|
|
666
|
-
*
|
|
818
|
+
* Data returned by the `raw_sign` RPC.
|
|
667
819
|
*/
|
|
668
|
-
|
|
820
|
+
data: RawSignResponseData;
|
|
821
|
+
|
|
822
|
+
method: 'raw_sign';
|
|
669
823
|
}
|
|
670
824
|
|
|
671
825
|
/**
|
|
672
|
-
* A
|
|
826
|
+
* A signed EIP-7702 authorization that delegates code execution to a contract
|
|
827
|
+
* address.
|
|
673
828
|
*/
|
|
674
|
-
export
|
|
675
|
-
| WalletBatchCreateResult.WalletBatchCreateSuccess
|
|
676
|
-
| WalletBatchCreateResult.WalletBatchCreateFailure;
|
|
677
|
-
|
|
678
|
-
export namespace WalletBatchCreateResult {
|
|
829
|
+
export interface EthereumSign7702Authorization {
|
|
679
830
|
/**
|
|
680
|
-
* A
|
|
831
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
832
|
+
* non-negative integer.
|
|
681
833
|
*/
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* The index of the wallet in the original request array.
|
|
685
|
-
*/
|
|
686
|
-
index: number;
|
|
687
|
-
|
|
688
|
-
success: true;
|
|
834
|
+
chain_id: Quantity;
|
|
689
835
|
|
|
690
|
-
|
|
691
|
-
* A wallet managed by Privy's wallet infrastructure.
|
|
692
|
-
*/
|
|
693
|
-
wallet: WalletsAPI.Wallet;
|
|
694
|
-
}
|
|
836
|
+
contract: string;
|
|
695
837
|
|
|
696
838
|
/**
|
|
697
|
-
* A
|
|
839
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
840
|
+
* non-negative integer.
|
|
698
841
|
*/
|
|
699
|
-
|
|
700
|
-
/**
|
|
701
|
-
* A PrivyErrorCode string identifying the error type (e.g., "invalid_data",
|
|
702
|
-
* "resource_conflict").
|
|
703
|
-
*/
|
|
704
|
-
code: string;
|
|
842
|
+
nonce: Quantity;
|
|
705
843
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
844
|
+
/**
|
|
845
|
+
* A hex-encoded string prefixed with '0x'.
|
|
846
|
+
*/
|
|
847
|
+
r: Hex;
|
|
710
848
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
849
|
+
/**
|
|
850
|
+
* A hex-encoded string prefixed with '0x'.
|
|
851
|
+
*/
|
|
852
|
+
s: Hex;
|
|
715
853
|
|
|
716
|
-
|
|
717
|
-
}
|
|
854
|
+
y_parity: number;
|
|
718
855
|
}
|
|
719
856
|
|
|
720
857
|
/**
|
|
721
|
-
*
|
|
858
|
+
* An unsigned Ethereum transaction object.
|
|
722
859
|
*/
|
|
723
|
-
export interface
|
|
860
|
+
export interface UnsignedEthereumTransaction {
|
|
861
|
+
authorization_list?: Array<EthereumSign7702Authorization>;
|
|
862
|
+
|
|
724
863
|
/**
|
|
725
|
-
*
|
|
864
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
865
|
+
* non-negative integer.
|
|
726
866
|
*/
|
|
727
|
-
|
|
728
|
-
}
|
|
867
|
+
chain_id?: Quantity;
|
|
729
868
|
|
|
730
|
-
/**
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
method: 'personal_sign';
|
|
869
|
+
/**
|
|
870
|
+
* A hex-encoded string prefixed with '0x'.
|
|
871
|
+
*/
|
|
872
|
+
data?: Hex;
|
|
735
873
|
|
|
736
|
-
|
|
874
|
+
from?: string;
|
|
737
875
|
|
|
738
|
-
|
|
876
|
+
/**
|
|
877
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
878
|
+
* non-negative integer.
|
|
879
|
+
*/
|
|
880
|
+
gas_limit?: Quantity;
|
|
739
881
|
|
|
740
|
-
|
|
741
|
-
|
|
882
|
+
/**
|
|
883
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
884
|
+
* non-negative integer.
|
|
885
|
+
*/
|
|
886
|
+
gas_price?: Quantity;
|
|
742
887
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
888
|
+
/**
|
|
889
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
890
|
+
* non-negative integer.
|
|
891
|
+
*/
|
|
892
|
+
max_fee_per_gas?: Quantity;
|
|
746
893
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
894
|
+
/**
|
|
895
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
896
|
+
* non-negative integer.
|
|
897
|
+
*/
|
|
898
|
+
max_priority_fee_per_gas?: Quantity;
|
|
750
899
|
|
|
751
|
-
/**
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
900
|
+
/**
|
|
901
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
902
|
+
* non-negative integer.
|
|
903
|
+
*/
|
|
904
|
+
nonce?: Quantity;
|
|
756
905
|
|
|
757
|
-
|
|
906
|
+
to?: string;
|
|
758
907
|
|
|
759
|
-
|
|
908
|
+
type?: 0 | 1 | 2 | 4;
|
|
760
909
|
|
|
761
|
-
|
|
910
|
+
/**
|
|
911
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
912
|
+
* non-negative integer.
|
|
913
|
+
*/
|
|
914
|
+
value?: Quantity;
|
|
762
915
|
}
|
|
763
916
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
917
|
+
/**
|
|
918
|
+
* An ERC-4337 user operation.
|
|
919
|
+
*/
|
|
920
|
+
export interface UserOperationInput {
|
|
921
|
+
/**
|
|
922
|
+
* A hex-encoded string prefixed with '0x'.
|
|
923
|
+
*/
|
|
924
|
+
call_data: Hex;
|
|
772
925
|
|
|
773
|
-
|
|
926
|
+
/**
|
|
927
|
+
* A hex-encoded string prefixed with '0x'.
|
|
928
|
+
*/
|
|
929
|
+
call_gas_limit: Hex;
|
|
774
930
|
|
|
775
|
-
|
|
931
|
+
/**
|
|
932
|
+
* A hex-encoded string prefixed with '0x'.
|
|
933
|
+
*/
|
|
934
|
+
max_fee_per_gas: Hex;
|
|
776
935
|
|
|
777
|
-
|
|
936
|
+
/**
|
|
937
|
+
* A hex-encoded string prefixed with '0x'.
|
|
938
|
+
*/
|
|
939
|
+
max_priority_fee_per_gas: Hex;
|
|
778
940
|
|
|
779
|
-
|
|
941
|
+
/**
|
|
942
|
+
* A hex-encoded string prefixed with '0x'.
|
|
943
|
+
*/
|
|
944
|
+
nonce: Hex;
|
|
780
945
|
|
|
781
|
-
|
|
946
|
+
/**
|
|
947
|
+
* A hex-encoded string prefixed with '0x'.
|
|
948
|
+
*/
|
|
949
|
+
pre_verification_gas: Hex;
|
|
782
950
|
|
|
783
|
-
|
|
951
|
+
sender: string;
|
|
784
952
|
|
|
785
|
-
|
|
953
|
+
/**
|
|
954
|
+
* A hex-encoded string prefixed with '0x'.
|
|
955
|
+
*/
|
|
956
|
+
verification_gas_limit: Hex;
|
|
786
957
|
|
|
787
|
-
|
|
958
|
+
paymaster?: string;
|
|
788
959
|
|
|
789
|
-
|
|
960
|
+
/**
|
|
961
|
+
* A hex-encoded string prefixed with '0x'.
|
|
962
|
+
*/
|
|
963
|
+
paymaster_data?: Hex;
|
|
790
964
|
|
|
791
|
-
|
|
965
|
+
/**
|
|
966
|
+
* A hex-encoded string prefixed with '0x'.
|
|
967
|
+
*/
|
|
968
|
+
paymaster_post_op_gas_limit?: Hex;
|
|
792
969
|
|
|
793
|
-
|
|
794
|
-
|
|
970
|
+
/**
|
|
971
|
+
* A hex-encoded string prefixed with '0x'.
|
|
972
|
+
*/
|
|
973
|
+
paymaster_verification_gas_limit?: Hex;
|
|
974
|
+
}
|
|
795
975
|
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
976
|
+
/**
|
|
977
|
+
* The domain parameters for EIP-712 typed data signing.
|
|
978
|
+
*/
|
|
979
|
+
export type TypedDataDomainInputParams = { [key: string]: unknown };
|
|
799
980
|
|
|
800
|
-
|
|
981
|
+
/**
|
|
982
|
+
* A single field definition in an EIP-712 typed data type.
|
|
983
|
+
*/
|
|
984
|
+
export interface TypedDataTypeFieldInput {
|
|
985
|
+
name: string;
|
|
801
986
|
|
|
802
|
-
|
|
987
|
+
type: string;
|
|
988
|
+
}
|
|
803
989
|
|
|
804
|
-
|
|
990
|
+
/**
|
|
991
|
+
* The type definitions for EIP-712 typed data signing.
|
|
992
|
+
*/
|
|
993
|
+
export type TypedDataTypesInputParams = { [key: string]: Array<TypedDataTypeFieldInput> };
|
|
805
994
|
|
|
806
|
-
|
|
995
|
+
/**
|
|
996
|
+
* Parameters for the EVM `personal_sign` RPC.
|
|
997
|
+
*/
|
|
998
|
+
export interface EthereumPersonalSignRpcInputParams {
|
|
999
|
+
encoding: 'utf-8' | 'hex';
|
|
807
1000
|
|
|
808
|
-
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
1001
|
+
message: string;
|
|
812
1002
|
}
|
|
813
1003
|
|
|
814
1004
|
/**
|
|
815
|
-
* Executes the EVM `
|
|
1005
|
+
* Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
|
|
816
1006
|
*/
|
|
817
|
-
export interface
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
method: 'eth_sendTransaction';
|
|
1007
|
+
export interface EthereumPersonalSignRpcInput {
|
|
1008
|
+
method: 'personal_sign';
|
|
821
1009
|
|
|
822
|
-
|
|
1010
|
+
/**
|
|
1011
|
+
* Parameters for the EVM `personal_sign` RPC.
|
|
1012
|
+
*/
|
|
1013
|
+
params: EthereumPersonalSignRpcInputParams;
|
|
823
1014
|
|
|
824
1015
|
address?: string;
|
|
825
1016
|
|
|
826
1017
|
chain_type?: 'ethereum';
|
|
827
1018
|
|
|
828
|
-
|
|
1019
|
+
wallet_id?: string;
|
|
829
1020
|
}
|
|
830
1021
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
1022
|
+
/**
|
|
1023
|
+
* Parameters for the EVM `eth_signTransaction` RPC.
|
|
1024
|
+
*/
|
|
1025
|
+
export interface EthereumSignTransactionRpcInputParams {
|
|
1026
|
+
/**
|
|
1027
|
+
* An unsigned Ethereum transaction object.
|
|
1028
|
+
*/
|
|
1029
|
+
transaction: UnsignedEthereumTransaction;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Executes the EVM `eth_signTransaction` RPC to sign a transaction.
|
|
1034
|
+
*/
|
|
1035
|
+
export interface EthereumSignTransactionRpcInput {
|
|
1036
|
+
method: 'eth_signTransaction';
|
|
835
1037
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1038
|
+
/**
|
|
1039
|
+
* Parameters for the EVM `eth_signTransaction` RPC.
|
|
1040
|
+
*/
|
|
1041
|
+
params: EthereumSignTransactionRpcInputParams;
|
|
839
1042
|
|
|
840
|
-
|
|
1043
|
+
address?: string;
|
|
841
1044
|
|
|
842
|
-
|
|
1045
|
+
chain_type?: 'ethereum';
|
|
843
1046
|
|
|
844
|
-
|
|
1047
|
+
wallet_id?: string;
|
|
1048
|
+
}
|
|
845
1049
|
|
|
846
|
-
|
|
1050
|
+
/**
|
|
1051
|
+
* Parameters for the EVM `eth_sendTransaction` RPC.
|
|
1052
|
+
*/
|
|
1053
|
+
export interface EthereumSendTransactionRpcInputParams {
|
|
1054
|
+
/**
|
|
1055
|
+
* An unsigned Ethereum transaction object.
|
|
1056
|
+
*/
|
|
1057
|
+
transaction: UnsignedEthereumTransaction;
|
|
1058
|
+
}
|
|
847
1059
|
|
|
848
|
-
|
|
1060
|
+
/**
|
|
1061
|
+
* Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
|
|
1062
|
+
*/
|
|
1063
|
+
export interface EthereumSendTransactionRpcInput {
|
|
1064
|
+
/**
|
|
1065
|
+
* A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
1066
|
+
*/
|
|
1067
|
+
caip2: AppsAPI.Caip2;
|
|
849
1068
|
|
|
850
|
-
|
|
1069
|
+
method: 'eth_sendTransaction';
|
|
851
1070
|
|
|
852
|
-
|
|
1071
|
+
/**
|
|
1072
|
+
* Parameters for the EVM `eth_sendTransaction` RPC.
|
|
1073
|
+
*/
|
|
1074
|
+
params: EthereumSendTransactionRpcInputParams;
|
|
853
1075
|
|
|
854
|
-
|
|
1076
|
+
address?: string;
|
|
855
1077
|
|
|
856
|
-
|
|
1078
|
+
chain_type?: 'ethereum';
|
|
857
1079
|
|
|
858
|
-
|
|
1080
|
+
reference_id?: string;
|
|
859
1081
|
|
|
860
|
-
|
|
861
|
-
}
|
|
1082
|
+
sponsor?: boolean;
|
|
862
1083
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
chain_id: string | number;
|
|
1084
|
+
wallet_id?: string;
|
|
1085
|
+
}
|
|
866
1086
|
|
|
867
|
-
|
|
1087
|
+
/**
|
|
1088
|
+
* EIP-712 typed data object.
|
|
1089
|
+
*/
|
|
1090
|
+
export interface EthereumTypedDataInput {
|
|
1091
|
+
/**
|
|
1092
|
+
* The domain parameters for EIP-712 typed data signing.
|
|
1093
|
+
*/
|
|
1094
|
+
domain: TypedDataDomainInputParams;
|
|
868
1095
|
|
|
869
|
-
|
|
1096
|
+
message: { [key: string]: unknown };
|
|
870
1097
|
|
|
871
|
-
|
|
1098
|
+
primary_type: string;
|
|
872
1099
|
|
|
873
|
-
|
|
1100
|
+
/**
|
|
1101
|
+
* The type definitions for EIP-712 typed data signing.
|
|
1102
|
+
*/
|
|
1103
|
+
types: TypedDataTypesInputParams;
|
|
1104
|
+
}
|
|
874
1105
|
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1106
|
+
/**
|
|
1107
|
+
* Parameters for the EVM `eth_signTypedData_v4` RPC.
|
|
1108
|
+
*/
|
|
1109
|
+
export interface EthereumSignTypedDataRpcInputParams {
|
|
1110
|
+
/**
|
|
1111
|
+
* EIP-712 typed data object.
|
|
1112
|
+
*/
|
|
1113
|
+
typed_data: EthereumTypedDataInput;
|
|
879
1114
|
}
|
|
880
1115
|
|
|
881
1116
|
/**
|
|
@@ -885,88 +1120,65 @@ export namespace EthereumSendTransactionRpcInput {
|
|
|
885
1120
|
export interface EthereumSignTypedDataRpcInput {
|
|
886
1121
|
method: 'eth_signTypedData_v4';
|
|
887
1122
|
|
|
888
|
-
|
|
1123
|
+
/**
|
|
1124
|
+
* Parameters for the EVM `eth_signTypedData_v4` RPC.
|
|
1125
|
+
*/
|
|
1126
|
+
params: EthereumSignTypedDataRpcInputParams;
|
|
889
1127
|
|
|
890
1128
|
address?: string;
|
|
891
1129
|
|
|
892
1130
|
chain_type?: 'ethereum';
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
export namespace EthereumSignTypedDataRpcInput {
|
|
896
|
-
export interface Params {
|
|
897
|
-
typed_data: Params.TypedData;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
export namespace Params {
|
|
901
|
-
export interface TypedData {
|
|
902
|
-
domain: { [key: string]: unknown };
|
|
903
|
-
|
|
904
|
-
message: { [key: string]: unknown };
|
|
905
|
-
|
|
906
|
-
primary_type: string;
|
|
907
1131
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
export namespace TypedData {
|
|
912
|
-
export interface Type {
|
|
913
|
-
name: string;
|
|
1132
|
+
wallet_id?: string;
|
|
1133
|
+
}
|
|
914
1134
|
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1135
|
+
/**
|
|
1136
|
+
* Parameters for the EVM `secp256k1_sign` RPC.
|
|
1137
|
+
*/
|
|
1138
|
+
export interface EthereumSecp256k1SignRpcInputParams {
|
|
1139
|
+
/**
|
|
1140
|
+
* A hex-encoded string prefixed with '0x'.
|
|
1141
|
+
*/
|
|
1142
|
+
hash: Hex;
|
|
919
1143
|
}
|
|
920
1144
|
|
|
921
1145
|
/**
|
|
922
|
-
*
|
|
1146
|
+
* Signs a raw hash on the secp256k1 curve.
|
|
923
1147
|
*/
|
|
924
|
-
export interface
|
|
925
|
-
method: '
|
|
1148
|
+
export interface EthereumSecp256k1SignRpcInput {
|
|
1149
|
+
method: 'secp256k1_sign';
|
|
926
1150
|
|
|
927
|
-
|
|
1151
|
+
/**
|
|
1152
|
+
* Parameters for the EVM `secp256k1_sign` RPC.
|
|
1153
|
+
*/
|
|
1154
|
+
params: EthereumSecp256k1SignRpcInputParams;
|
|
928
1155
|
|
|
929
1156
|
address?: string;
|
|
930
1157
|
|
|
931
1158
|
chain_type?: 'ethereum';
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
export namespace EthereumSignUserOperationRpcInput {
|
|
935
|
-
export interface Params {
|
|
936
|
-
chain_id: string | number;
|
|
937
|
-
|
|
938
|
-
contract: string;
|
|
939
|
-
|
|
940
|
-
user_operation: Params.UserOperation;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
export namespace Params {
|
|
944
|
-
export interface UserOperation {
|
|
945
|
-
call_data: string;
|
|
946
|
-
|
|
947
|
-
call_gas_limit: string;
|
|
948
1159
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
max_priority_fee_per_gas: string;
|
|
952
|
-
|
|
953
|
-
nonce: string;
|
|
954
|
-
|
|
955
|
-
paymaster: string;
|
|
956
|
-
|
|
957
|
-
paymaster_data: string;
|
|
958
|
-
|
|
959
|
-
paymaster_post_op_gas_limit: string;
|
|
1160
|
+
wallet_id?: string;
|
|
1161
|
+
}
|
|
960
1162
|
|
|
961
|
-
|
|
1163
|
+
/**
|
|
1164
|
+
* Parameters for the EVM `eth_sign7702Authorization` RPC.
|
|
1165
|
+
*/
|
|
1166
|
+
export interface EthereumSign7702AuthorizationRpcInputParams {
|
|
1167
|
+
/**
|
|
1168
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
1169
|
+
* non-negative integer.
|
|
1170
|
+
*/
|
|
1171
|
+
chain_id: Quantity;
|
|
962
1172
|
|
|
963
|
-
|
|
1173
|
+
contract: string;
|
|
964
1174
|
|
|
965
|
-
|
|
1175
|
+
executor?: 'self';
|
|
966
1176
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1177
|
+
/**
|
|
1178
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
1179
|
+
* non-negative integer.
|
|
1180
|
+
*/
|
|
1181
|
+
nonce?: Quantity;
|
|
970
1182
|
}
|
|
971
1183
|
|
|
972
1184
|
/**
|
|
@@ -975,375 +1187,1593 @@ export namespace EthereumSignUserOperationRpcInput {
|
|
|
975
1187
|
export interface EthereumSign7702AuthorizationRpcInput {
|
|
976
1188
|
method: 'eth_sign7702Authorization';
|
|
977
1189
|
|
|
978
|
-
|
|
1190
|
+
/**
|
|
1191
|
+
* Parameters for the EVM `eth_sign7702Authorization` RPC.
|
|
1192
|
+
*/
|
|
1193
|
+
params: EthereumSign7702AuthorizationRpcInputParams;
|
|
979
1194
|
|
|
980
1195
|
address?: string;
|
|
981
1196
|
|
|
982
1197
|
chain_type?: 'ethereum';
|
|
1198
|
+
|
|
1199
|
+
wallet_id?: string;
|
|
983
1200
|
}
|
|
984
1201
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1202
|
+
/**
|
|
1203
|
+
* Parameters for the EVM `eth_signUserOperation` RPC.
|
|
1204
|
+
*/
|
|
1205
|
+
export interface EthereumSignUserOperationRpcInputParams {
|
|
1206
|
+
/**
|
|
1207
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
1208
|
+
* non-negative integer.
|
|
1209
|
+
*/
|
|
1210
|
+
chain_id: Quantity;
|
|
988
1211
|
|
|
989
|
-
|
|
1212
|
+
contract: string;
|
|
990
1213
|
|
|
991
|
-
|
|
992
|
-
|
|
1214
|
+
/**
|
|
1215
|
+
* An ERC-4337 user operation.
|
|
1216
|
+
*/
|
|
1217
|
+
user_operation: UserOperationInput;
|
|
993
1218
|
}
|
|
994
1219
|
|
|
995
1220
|
/**
|
|
996
|
-
*
|
|
1221
|
+
* Executes an RPC method to hash and sign a UserOperation.
|
|
997
1222
|
*/
|
|
998
|
-
export interface
|
|
999
|
-
method: '
|
|
1223
|
+
export interface EthereumSignUserOperationRpcInput {
|
|
1224
|
+
method: 'eth_signUserOperation';
|
|
1000
1225
|
|
|
1001
|
-
|
|
1226
|
+
/**
|
|
1227
|
+
* Parameters for the EVM `eth_signUserOperation` RPC.
|
|
1228
|
+
*/
|
|
1229
|
+
params: EthereumSignUserOperationRpcInputParams;
|
|
1002
1230
|
|
|
1003
1231
|
address?: string;
|
|
1004
1232
|
|
|
1005
1233
|
chain_type?: 'ethereum';
|
|
1006
|
-
}
|
|
1007
1234
|
|
|
1008
|
-
|
|
1009
|
-
export interface Params {
|
|
1010
|
-
hash: string;
|
|
1011
|
-
}
|
|
1235
|
+
wallet_id?: string;
|
|
1012
1236
|
}
|
|
1013
1237
|
|
|
1014
1238
|
/**
|
|
1015
|
-
*
|
|
1239
|
+
* A single call within a batched wallet_sendCalls request.
|
|
1016
1240
|
*/
|
|
1017
|
-
export interface
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
params: SolanaSignTransactionRpcInput.Params;
|
|
1241
|
+
export interface EthereumSendCallsCall {
|
|
1242
|
+
to: string;
|
|
1021
1243
|
|
|
1022
|
-
|
|
1244
|
+
/**
|
|
1245
|
+
* A hex-encoded string prefixed with '0x'.
|
|
1246
|
+
*/
|
|
1247
|
+
data?: Hex;
|
|
1023
1248
|
|
|
1024
|
-
|
|
1249
|
+
/**
|
|
1250
|
+
* A quantity value that can be either a hex string starting with '0x' or a
|
|
1251
|
+
* non-negative integer.
|
|
1252
|
+
*/
|
|
1253
|
+
value?: Quantity;
|
|
1025
1254
|
}
|
|
1026
1255
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Parameters for the `wallet_sendCalls` RPC.
|
|
1258
|
+
*/
|
|
1259
|
+
export interface EthereumSendCallsRpcInputParams {
|
|
1260
|
+
calls: Array<EthereumSendCallsCall>;
|
|
1033
1261
|
}
|
|
1034
1262
|
|
|
1035
1263
|
/**
|
|
1036
|
-
* Executes the
|
|
1037
|
-
* transaction.
|
|
1264
|
+
* Executes the `wallet_sendCalls` RPC (EIP-5792) to batch multiple calls into a
|
|
1265
|
+
* single atomic transaction.
|
|
1038
1266
|
*/
|
|
1039
|
-
export interface
|
|
1040
|
-
|
|
1267
|
+
export interface EthereumSendCallsRpcInput {
|
|
1268
|
+
/**
|
|
1269
|
+
* A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
1270
|
+
*/
|
|
1271
|
+
caip2: AppsAPI.Caip2;
|
|
1041
1272
|
|
|
1042
|
-
method: '
|
|
1273
|
+
method: 'wallet_sendCalls';
|
|
1043
1274
|
|
|
1044
|
-
|
|
1275
|
+
/**
|
|
1276
|
+
* Parameters for the `wallet_sendCalls` RPC.
|
|
1277
|
+
*/
|
|
1278
|
+
params: EthereumSendCallsRpcInputParams;
|
|
1045
1279
|
|
|
1046
1280
|
address?: string;
|
|
1047
1281
|
|
|
1048
|
-
chain_type?: '
|
|
1282
|
+
chain_type?: 'ethereum';
|
|
1049
1283
|
|
|
1050
1284
|
sponsor?: boolean;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
export namespace SolanaSignAndSendTransactionRpcInput {
|
|
1054
|
-
export interface Params {
|
|
1055
|
-
encoding: 'base64';
|
|
1056
1285
|
|
|
1057
|
-
|
|
1058
|
-
}
|
|
1286
|
+
wallet_id?: string;
|
|
1059
1287
|
}
|
|
1060
1288
|
|
|
1061
1289
|
/**
|
|
1062
|
-
*
|
|
1290
|
+
* Request body for Ethereum wallet RPC operations, discriminated by method.
|
|
1063
1291
|
*/
|
|
1064
|
-
export
|
|
1065
|
-
|
|
1292
|
+
export type EthereumRpcInput =
|
|
1293
|
+
| EthereumSignTransactionRpcInput
|
|
1294
|
+
| EthereumSendTransactionRpcInput
|
|
1295
|
+
| EthereumPersonalSignRpcInput
|
|
1296
|
+
| EthereumSignTypedDataRpcInput
|
|
1297
|
+
| EthereumSecp256k1SignRpcInput
|
|
1298
|
+
| EthereumSign7702AuthorizationRpcInput
|
|
1299
|
+
| EthereumSignUserOperationRpcInput
|
|
1300
|
+
| EthereumSendCallsRpcInput;
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Data returned by the EVM `personal_sign` RPC.
|
|
1304
|
+
*/
|
|
1305
|
+
export interface EthereumPersonalSignRpcResponseData {
|
|
1306
|
+
encoding: 'hex';
|
|
1066
1307
|
|
|
1067
|
-
|
|
1308
|
+
signature: string;
|
|
1309
|
+
}
|
|
1068
1310
|
|
|
1069
|
-
|
|
1311
|
+
/**
|
|
1312
|
+
* Response to the EVM `personal_sign` RPC.
|
|
1313
|
+
*/
|
|
1314
|
+
export interface EthereumPersonalSignRpcResponse {
|
|
1315
|
+
/**
|
|
1316
|
+
* Data returned by the EVM `personal_sign` RPC.
|
|
1317
|
+
*/
|
|
1318
|
+
data: EthereumPersonalSignRpcResponseData;
|
|
1070
1319
|
|
|
1071
|
-
|
|
1320
|
+
method: 'personal_sign';
|
|
1072
1321
|
}
|
|
1073
1322
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1323
|
+
/**
|
|
1324
|
+
* Data returned by the EVM `eth_signTransaction` RPC.
|
|
1325
|
+
*/
|
|
1326
|
+
export interface EthereumSignTransactionRpcResponseData {
|
|
1327
|
+
encoding: 'rlp';
|
|
1077
1328
|
|
|
1078
|
-
|
|
1079
|
-
}
|
|
1329
|
+
signed_transaction: string;
|
|
1080
1330
|
}
|
|
1081
1331
|
|
|
1082
1332
|
/**
|
|
1083
1333
|
* Response to the EVM `eth_signTransaction` RPC.
|
|
1084
1334
|
*/
|
|
1085
1335
|
export interface EthereumSignTransactionRpcResponse {
|
|
1086
|
-
|
|
1336
|
+
/**
|
|
1337
|
+
* Data returned by the EVM `eth_signTransaction` RPC.
|
|
1338
|
+
*/
|
|
1339
|
+
data: EthereumSignTransactionRpcResponseData;
|
|
1087
1340
|
|
|
1088
1341
|
method: 'eth_signTransaction';
|
|
1089
1342
|
}
|
|
1090
1343
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1344
|
+
/**
|
|
1345
|
+
* Data returned by the EVM `eth_sendTransaction` RPC.
|
|
1346
|
+
*/
|
|
1347
|
+
export interface EthereumSendTransactionRpcResponseData {
|
|
1348
|
+
/**
|
|
1349
|
+
* A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
1350
|
+
*/
|
|
1351
|
+
caip2: AppsAPI.Caip2;
|
|
1352
|
+
|
|
1353
|
+
hash: string;
|
|
1094
1354
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1355
|
+
reference_id?: string | null;
|
|
1356
|
+
|
|
1357
|
+
transaction_id?: string;
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* An unsigned Ethereum transaction object.
|
|
1361
|
+
*/
|
|
1362
|
+
transaction_request?: UnsignedEthereumTransaction;
|
|
1363
|
+
|
|
1364
|
+
user_operation_hash?: string;
|
|
1097
1365
|
}
|
|
1098
1366
|
|
|
1099
1367
|
/**
|
|
1100
1368
|
* Response to the EVM `eth_sendTransaction` RPC.
|
|
1101
1369
|
*/
|
|
1102
1370
|
export interface EthereumSendTransactionRpcResponse {
|
|
1103
|
-
|
|
1371
|
+
/**
|
|
1372
|
+
* Data returned by the EVM `eth_sendTransaction` RPC.
|
|
1373
|
+
*/
|
|
1374
|
+
data: EthereumSendTransactionRpcResponseData;
|
|
1104
1375
|
|
|
1105
1376
|
method: 'eth_sendTransaction';
|
|
1106
1377
|
}
|
|
1107
1378
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1379
|
+
/**
|
|
1380
|
+
* Data returned by the EVM `eth_signTypedData_v4` RPC.
|
|
1381
|
+
*/
|
|
1382
|
+
export interface EthereumSignTypedDataRpcResponseData {
|
|
1383
|
+
encoding: 'hex';
|
|
1113
1384
|
|
|
1114
|
-
|
|
1385
|
+
signature: string;
|
|
1386
|
+
}
|
|
1115
1387
|
|
|
1116
|
-
|
|
1388
|
+
/**
|
|
1389
|
+
* Response to the EVM `eth_signTypedData_v4` RPC.
|
|
1390
|
+
*/
|
|
1391
|
+
export interface EthereumSignTypedDataRpcResponse {
|
|
1392
|
+
/**
|
|
1393
|
+
* Data returned by the EVM `eth_signTypedData_v4` RPC.
|
|
1394
|
+
*/
|
|
1395
|
+
data: EthereumSignTypedDataRpcResponseData;
|
|
1117
1396
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1397
|
+
method: 'eth_signTypedData_v4';
|
|
1398
|
+
}
|
|
1120
1399
|
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1400
|
+
/**
|
|
1401
|
+
* Data returned by the EVM `secp256k1_sign` RPC.
|
|
1402
|
+
*/
|
|
1403
|
+
export interface EthereumSecp256k1SignRpcResponseData {
|
|
1404
|
+
encoding: 'hex';
|
|
1124
1405
|
|
|
1125
|
-
|
|
1406
|
+
/**
|
|
1407
|
+
* A hex-encoded string prefixed with '0x'.
|
|
1408
|
+
*/
|
|
1409
|
+
signature: Hex;
|
|
1410
|
+
}
|
|
1126
1411
|
|
|
1127
|
-
|
|
1412
|
+
/**
|
|
1413
|
+
* Response to the EVM `secp256k1_sign` RPC.
|
|
1414
|
+
*/
|
|
1415
|
+
export interface EthereumSecp256k1SignRpcResponse {
|
|
1416
|
+
/**
|
|
1417
|
+
* Data returned by the EVM `secp256k1_sign` RPC.
|
|
1418
|
+
*/
|
|
1419
|
+
data: EthereumSecp256k1SignRpcResponseData;
|
|
1128
1420
|
|
|
1129
|
-
|
|
1421
|
+
method: 'secp256k1_sign';
|
|
1422
|
+
}
|
|
1130
1423
|
|
|
1131
|
-
|
|
1424
|
+
/**
|
|
1425
|
+
* Data returned by the EVM `eth_sign7702Authorization` RPC.
|
|
1426
|
+
*/
|
|
1427
|
+
export interface EthereumSign7702AuthorizationRpcResponseData {
|
|
1428
|
+
/**
|
|
1429
|
+
* A signed EIP-7702 authorization that delegates code execution to a contract
|
|
1430
|
+
* address.
|
|
1431
|
+
*/
|
|
1432
|
+
authorization: EthereumSign7702Authorization;
|
|
1433
|
+
}
|
|
1132
1434
|
|
|
1133
|
-
|
|
1435
|
+
/**
|
|
1436
|
+
* Response to the EVM `eth_sign7702Authorization` RPC.
|
|
1437
|
+
*/
|
|
1438
|
+
export interface EthereumSign7702AuthorizationRpcResponse {
|
|
1439
|
+
/**
|
|
1440
|
+
* Data returned by the EVM `eth_sign7702Authorization` RPC.
|
|
1441
|
+
*/
|
|
1442
|
+
data: EthereumSign7702AuthorizationRpcResponseData;
|
|
1134
1443
|
|
|
1135
|
-
|
|
1444
|
+
method: 'eth_sign7702Authorization';
|
|
1445
|
+
}
|
|
1136
1446
|
|
|
1137
|
-
|
|
1447
|
+
/**
|
|
1448
|
+
* Data returned by the EVM `eth_signUserOperation` RPC.
|
|
1449
|
+
*/
|
|
1450
|
+
export interface EthereumSignUserOperationRpcResponseData {
|
|
1451
|
+
encoding: 'hex';
|
|
1138
1452
|
|
|
1139
|
-
|
|
1453
|
+
signature: string;
|
|
1454
|
+
}
|
|
1140
1455
|
|
|
1141
|
-
|
|
1456
|
+
/**
|
|
1457
|
+
* Response to the EVM `eth_signUserOperation` RPC.
|
|
1458
|
+
*/
|
|
1459
|
+
export interface EthereumSignUserOperationRpcResponse {
|
|
1460
|
+
/**
|
|
1461
|
+
* Data returned by the EVM `eth_signUserOperation` RPC.
|
|
1462
|
+
*/
|
|
1463
|
+
data: EthereumSignUserOperationRpcResponseData;
|
|
1142
1464
|
|
|
1143
|
-
|
|
1465
|
+
method: 'eth_signUserOperation';
|
|
1466
|
+
}
|
|
1144
1467
|
|
|
1145
|
-
|
|
1146
|
-
|
|
1468
|
+
/**
|
|
1469
|
+
* Data returned by the `wallet_sendCalls` RPC.
|
|
1470
|
+
*/
|
|
1471
|
+
export interface EthereumSendCallsRpcResponseData {
|
|
1472
|
+
/**
|
|
1473
|
+
* A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
1474
|
+
*/
|
|
1475
|
+
caip2: AppsAPI.Caip2;
|
|
1147
1476
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
chain_id: string | number;
|
|
1477
|
+
transaction_id: string;
|
|
1478
|
+
}
|
|
1151
1479
|
|
|
1152
|
-
|
|
1480
|
+
/**
|
|
1481
|
+
* Response to the `wallet_sendCalls` RPC.
|
|
1482
|
+
*/
|
|
1483
|
+
export interface EthereumSendCallsRpcResponse {
|
|
1484
|
+
/**
|
|
1485
|
+
* Data returned by the `wallet_sendCalls` RPC.
|
|
1486
|
+
*/
|
|
1487
|
+
data: EthereumSendCallsRpcResponseData;
|
|
1153
1488
|
|
|
1154
|
-
|
|
1489
|
+
method: 'wallet_sendCalls';
|
|
1490
|
+
}
|
|
1155
1491
|
|
|
1156
|
-
|
|
1492
|
+
/**
|
|
1493
|
+
* Response body for Ethereum wallet RPC operations, discriminated by method.
|
|
1494
|
+
*/
|
|
1495
|
+
export type EthereumRpcResponse =
|
|
1496
|
+
| EthereumPersonalSignRpcResponse
|
|
1497
|
+
| EthereumSignTypedDataRpcResponse
|
|
1498
|
+
| EthereumSignTransactionRpcResponse
|
|
1499
|
+
| EthereumSendTransactionRpcResponse
|
|
1500
|
+
| EthereumSignUserOperationRpcResponse
|
|
1501
|
+
| EthereumSign7702AuthorizationRpcResponse
|
|
1502
|
+
| EthereumSecp256k1SignRpcResponse
|
|
1503
|
+
| EthereumSendCallsRpcResponse;
|
|
1157
1504
|
|
|
1158
|
-
|
|
1505
|
+
/**
|
|
1506
|
+
* Parameters for the SVM `signTransaction` RPC.
|
|
1507
|
+
*/
|
|
1508
|
+
export interface SolanaSignTransactionRpcInputParams {
|
|
1509
|
+
encoding: 'base64';
|
|
1159
1510
|
|
|
1160
|
-
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1511
|
+
transaction: string;
|
|
1164
1512
|
}
|
|
1165
1513
|
|
|
1166
1514
|
/**
|
|
1167
|
-
*
|
|
1515
|
+
* Executes the SVM `signTransaction` RPC to sign a transaction.
|
|
1168
1516
|
*/
|
|
1169
|
-
export interface
|
|
1170
|
-
|
|
1517
|
+
export interface SolanaSignTransactionRpcInput {
|
|
1518
|
+
method: 'signTransaction';
|
|
1171
1519
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1520
|
+
/**
|
|
1521
|
+
* Parameters for the SVM `signTransaction` RPC.
|
|
1522
|
+
*/
|
|
1523
|
+
params: SolanaSignTransactionRpcInputParams;
|
|
1174
1524
|
|
|
1175
|
-
|
|
1176
|
-
export interface Data {
|
|
1177
|
-
encoding: 'hex';
|
|
1525
|
+
address?: string;
|
|
1178
1526
|
|
|
1179
|
-
|
|
1180
|
-
|
|
1527
|
+
chain_type?: 'solana';
|
|
1528
|
+
|
|
1529
|
+
wallet_id?: string;
|
|
1181
1530
|
}
|
|
1182
1531
|
|
|
1183
1532
|
/**
|
|
1184
|
-
*
|
|
1533
|
+
* Parameters for the SVM `signAndSendTransaction` RPC.
|
|
1185
1534
|
*/
|
|
1186
|
-
export interface
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
method: 'eth_signTypedData_v4';
|
|
1190
|
-
}
|
|
1535
|
+
export interface SolanaSignAndSendTransactionRpcInputParams {
|
|
1536
|
+
encoding: 'base64';
|
|
1191
1537
|
|
|
1192
|
-
|
|
1193
|
-
export interface Data {
|
|
1194
|
-
encoding: 'hex';
|
|
1195
|
-
|
|
1196
|
-
signature: string;
|
|
1197
|
-
}
|
|
1538
|
+
transaction: string;
|
|
1198
1539
|
}
|
|
1199
1540
|
|
|
1200
1541
|
/**
|
|
1201
|
-
*
|
|
1542
|
+
* Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
|
|
1543
|
+
* transaction.
|
|
1202
1544
|
*/
|
|
1203
|
-
export interface
|
|
1204
|
-
|
|
1545
|
+
export interface SolanaSignAndSendTransactionRpcInput {
|
|
1546
|
+
/**
|
|
1547
|
+
* A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
1548
|
+
*/
|
|
1549
|
+
caip2: AppsAPI.Caip2;
|
|
1205
1550
|
|
|
1206
|
-
method: '
|
|
1207
|
-
|
|
1551
|
+
method: 'signAndSendTransaction';
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* Parameters for the SVM `signAndSendTransaction` RPC.
|
|
1555
|
+
*/
|
|
1556
|
+
params: SolanaSignAndSendTransactionRpcInputParams;
|
|
1208
1557
|
|
|
1209
|
-
|
|
1210
|
-
export interface Data {
|
|
1211
|
-
encoding: 'hex';
|
|
1558
|
+
address?: string;
|
|
1212
1559
|
|
|
1213
|
-
|
|
1214
|
-
|
|
1560
|
+
chain_type?: 'solana';
|
|
1561
|
+
|
|
1562
|
+
reference_id?: string;
|
|
1563
|
+
|
|
1564
|
+
sponsor?: boolean;
|
|
1565
|
+
|
|
1566
|
+
wallet_id?: string;
|
|
1215
1567
|
}
|
|
1216
1568
|
|
|
1217
1569
|
/**
|
|
1218
|
-
*
|
|
1570
|
+
* Parameters for the SVM `signMessage` RPC.
|
|
1219
1571
|
*/
|
|
1220
|
-
export interface
|
|
1221
|
-
|
|
1572
|
+
export interface SolanaSignMessageRpcInputParams {
|
|
1573
|
+
encoding: 'base64';
|
|
1222
1574
|
|
|
1223
|
-
|
|
1575
|
+
message: string;
|
|
1224
1576
|
}
|
|
1225
1577
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
export namespace Data {
|
|
1232
|
-
export interface Authorization {
|
|
1233
|
-
chain_id: string | number;
|
|
1234
|
-
|
|
1235
|
-
contract: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* Executes the SVM `signMessage` RPC to sign a message.
|
|
1580
|
+
*/
|
|
1581
|
+
export interface SolanaSignMessageRpcInput {
|
|
1582
|
+
method: 'signMessage';
|
|
1236
1583
|
|
|
1237
|
-
|
|
1584
|
+
/**
|
|
1585
|
+
* Parameters for the SVM `signMessage` RPC.
|
|
1586
|
+
*/
|
|
1587
|
+
params: SolanaSignMessageRpcInputParams;
|
|
1238
1588
|
|
|
1239
|
-
|
|
1589
|
+
address?: string;
|
|
1240
1590
|
|
|
1241
|
-
|
|
1591
|
+
chain_type?: 'solana';
|
|
1242
1592
|
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1593
|
+
wallet_id?: string;
|
|
1246
1594
|
}
|
|
1247
1595
|
|
|
1248
1596
|
/**
|
|
1249
|
-
*
|
|
1597
|
+
* Request body for Solana wallet RPC operations, discriminated by method.
|
|
1250
1598
|
*/
|
|
1251
|
-
export
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}
|
|
1599
|
+
export type SolanaRpcInput =
|
|
1600
|
+
| SolanaSignTransactionRpcInput
|
|
1601
|
+
| SolanaSignAndSendTransactionRpcInput
|
|
1602
|
+
| SolanaSignMessageRpcInput;
|
|
1256
1603
|
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1604
|
+
/**
|
|
1605
|
+
* Data returned by the SVM `signTransaction` RPC.
|
|
1606
|
+
*/
|
|
1607
|
+
export interface SolanaSignTransactionRpcResponseData {
|
|
1608
|
+
encoding: 'base64';
|
|
1260
1609
|
|
|
1261
|
-
|
|
1262
|
-
}
|
|
1610
|
+
signed_transaction: string;
|
|
1263
1611
|
}
|
|
1264
1612
|
|
|
1265
1613
|
/**
|
|
1266
1614
|
* Response to the SVM `signTransaction` RPC.
|
|
1267
1615
|
*/
|
|
1268
1616
|
export interface SolanaSignTransactionRpcResponse {
|
|
1269
|
-
|
|
1617
|
+
/**
|
|
1618
|
+
* Data returned by the SVM `signTransaction` RPC.
|
|
1619
|
+
*/
|
|
1620
|
+
data: SolanaSignTransactionRpcResponseData;
|
|
1270
1621
|
|
|
1271
1622
|
method: 'signTransaction';
|
|
1272
1623
|
}
|
|
1273
1624
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1625
|
+
/**
|
|
1626
|
+
* Data returned by the SVM `signAndSendTransaction` RPC.
|
|
1627
|
+
*/
|
|
1628
|
+
export interface SolanaSignAndSendTransactionRpcResponseData {
|
|
1629
|
+
/**
|
|
1630
|
+
* A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
1631
|
+
*/
|
|
1632
|
+
caip2: AppsAPI.Caip2;
|
|
1633
|
+
|
|
1634
|
+
hash: string;
|
|
1277
1635
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1636
|
+
reference_id?: string | null;
|
|
1637
|
+
|
|
1638
|
+
transaction_id?: string;
|
|
1280
1639
|
}
|
|
1281
1640
|
|
|
1282
1641
|
/**
|
|
1283
1642
|
* Response to the SVM `signAndSendTransaction` RPC.
|
|
1284
1643
|
*/
|
|
1285
1644
|
export interface SolanaSignAndSendTransactionRpcResponse {
|
|
1286
|
-
|
|
1645
|
+
/**
|
|
1646
|
+
* Data returned by the SVM `signAndSendTransaction` RPC.
|
|
1647
|
+
*/
|
|
1648
|
+
data: SolanaSignAndSendTransactionRpcResponseData;
|
|
1287
1649
|
|
|
1288
1650
|
method: 'signAndSendTransaction';
|
|
1289
1651
|
}
|
|
1290
1652
|
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1653
|
+
/**
|
|
1654
|
+
* Data returned by the SVM `signMessage` RPC.
|
|
1655
|
+
*/
|
|
1656
|
+
export interface SolanaSignMessageRpcResponseData {
|
|
1657
|
+
encoding: 'base64';
|
|
1296
1658
|
|
|
1297
|
-
|
|
1298
|
-
}
|
|
1659
|
+
signature: string;
|
|
1299
1660
|
}
|
|
1300
1661
|
|
|
1301
1662
|
/**
|
|
1302
1663
|
* Response to the SVM `signMessage` RPC.
|
|
1303
1664
|
*/
|
|
1304
1665
|
export interface SolanaSignMessageRpcResponse {
|
|
1305
|
-
|
|
1666
|
+
/**
|
|
1667
|
+
* Data returned by the SVM `signMessage` RPC.
|
|
1668
|
+
*/
|
|
1669
|
+
data: SolanaSignMessageRpcResponseData;
|
|
1306
1670
|
|
|
1307
1671
|
method: 'signMessage';
|
|
1308
1672
|
}
|
|
1309
1673
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1674
|
+
/**
|
|
1675
|
+
* Response body for Solana wallet RPC operations, discriminated by method.
|
|
1676
|
+
*/
|
|
1677
|
+
export type SolanaRpcResponse =
|
|
1678
|
+
| SolanaSignMessageRpcResponse
|
|
1679
|
+
| SolanaSignTransactionRpcResponse
|
|
1680
|
+
| SolanaSignAndSendTransactionRpcResponse;
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* The Spark network.
|
|
1684
|
+
*/
|
|
1685
|
+
export type SparkNetwork = 'MAINNET' | 'REGTEST';
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* A Spark signing keyshare.
|
|
1689
|
+
*/
|
|
1690
|
+
export interface SparkSigningKeyshare {
|
|
1691
|
+
owner_identifiers: Array<string>;
|
|
1313
1692
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1693
|
+
public_key: string;
|
|
1694
|
+
|
|
1695
|
+
public_shares: { [key: string]: string };
|
|
1696
|
+
|
|
1697
|
+
threshold: number;
|
|
1698
|
+
|
|
1699
|
+
updated_time: string;
|
|
1316
1700
|
}
|
|
1317
1701
|
|
|
1318
1702
|
/**
|
|
1319
|
-
*
|
|
1703
|
+
* A Spark wallet leaf node.
|
|
1320
1704
|
*/
|
|
1321
|
-
export
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1705
|
+
export interface SparkWalletLeaf {
|
|
1706
|
+
id: string;
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* The Spark network.
|
|
1710
|
+
*/
|
|
1711
|
+
network: SparkNetwork;
|
|
1712
|
+
|
|
1713
|
+
node_tx: string;
|
|
1714
|
+
|
|
1715
|
+
owner_identity_public_key: string;
|
|
1716
|
+
|
|
1717
|
+
refund_tx: string;
|
|
1718
|
+
|
|
1719
|
+
status: string;
|
|
1720
|
+
|
|
1721
|
+
tree_id: string;
|
|
1722
|
+
|
|
1723
|
+
value: number;
|
|
1724
|
+
|
|
1725
|
+
verifying_public_key: string;
|
|
1726
|
+
|
|
1727
|
+
vout: number;
|
|
1728
|
+
|
|
1729
|
+
parent_node_id?: string;
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* A Spark signing keyshare.
|
|
1733
|
+
*/
|
|
1734
|
+
signing_keyshare?: SparkSigningKeyshare;
|
|
1735
|
+
}
|
|
1332
1736
|
|
|
1333
1737
|
/**
|
|
1334
|
-
*
|
|
1738
|
+
* A Spark transfer leaf.
|
|
1335
1739
|
*/
|
|
1336
|
-
export
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1740
|
+
export interface SparkTransferLeaf {
|
|
1741
|
+
intermediate_refund_tx: string;
|
|
1742
|
+
|
|
1743
|
+
secret_cipher: string;
|
|
1744
|
+
|
|
1745
|
+
signature: string;
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* A Spark wallet leaf node.
|
|
1749
|
+
*/
|
|
1750
|
+
leaf?: SparkWalletLeaf;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* A Spark transfer.
|
|
1755
|
+
*/
|
|
1756
|
+
export interface SparkTransfer {
|
|
1757
|
+
id: string;
|
|
1758
|
+
|
|
1759
|
+
leaves: Array<SparkTransferLeaf>;
|
|
1760
|
+
|
|
1761
|
+
receiver_identity_public_key: string;
|
|
1762
|
+
|
|
1763
|
+
sender_identity_public_key: string;
|
|
1764
|
+
|
|
1765
|
+
status: string;
|
|
1766
|
+
|
|
1767
|
+
total_value: number;
|
|
1768
|
+
|
|
1769
|
+
transfer_direction: string;
|
|
1770
|
+
|
|
1771
|
+
type: string;
|
|
1772
|
+
|
|
1773
|
+
created_time?: string;
|
|
1774
|
+
|
|
1775
|
+
expiry_time?: string;
|
|
1776
|
+
|
|
1777
|
+
updated_time?: string;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* Metadata for a Spark user token.
|
|
1782
|
+
*/
|
|
1783
|
+
export interface SparkUserTokenMetadata {
|
|
1784
|
+
decimals: number;
|
|
1785
|
+
|
|
1786
|
+
max_supply: string;
|
|
1787
|
+
|
|
1788
|
+
raw_token_identifier: string;
|
|
1789
|
+
|
|
1790
|
+
token_name: string;
|
|
1791
|
+
|
|
1792
|
+
token_public_key: string;
|
|
1793
|
+
|
|
1794
|
+
token_ticker: string;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Balance of a Spark token.
|
|
1799
|
+
*/
|
|
1800
|
+
export interface SparkTokenBalance {
|
|
1801
|
+
balance: string;
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* Metadata for a Spark user token.
|
|
1805
|
+
*/
|
|
1806
|
+
token_metadata: SparkUserTokenMetadata;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
* The balance of a Spark wallet.
|
|
1811
|
+
*/
|
|
1812
|
+
export interface SparkBalance {
|
|
1813
|
+
balance: string;
|
|
1814
|
+
|
|
1815
|
+
token_balances: { [key: string]: SparkTokenBalance };
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* A Spark token output.
|
|
1820
|
+
*/
|
|
1821
|
+
export interface TokenOutput {
|
|
1822
|
+
owner_public_key: string;
|
|
1823
|
+
|
|
1824
|
+
token_amount: string;
|
|
1825
|
+
|
|
1826
|
+
id?: string;
|
|
1827
|
+
|
|
1828
|
+
revocation_commitment?: string;
|
|
1829
|
+
|
|
1830
|
+
token_identifier?: string;
|
|
1831
|
+
|
|
1832
|
+
token_public_key?: string;
|
|
1833
|
+
|
|
1834
|
+
withdraw_bond_sats?: number;
|
|
1835
|
+
|
|
1836
|
+
withdraw_relative_block_locktime?: number;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* A Spark token output with its previous transaction data.
|
|
1841
|
+
*/
|
|
1842
|
+
export interface OutputWithPreviousTransactionData {
|
|
1843
|
+
previous_transaction_hash: string;
|
|
1844
|
+
|
|
1845
|
+
previous_transaction_vout: number;
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* A Spark token output.
|
|
1849
|
+
*/
|
|
1850
|
+
output?: TokenOutput;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
/**
|
|
1854
|
+
* The fee for a Spark Lightning payment.
|
|
1855
|
+
*/
|
|
1856
|
+
export interface SparkLightningFee {
|
|
1857
|
+
original_unit: string;
|
|
1858
|
+
|
|
1859
|
+
original_value: number;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
/**
|
|
1863
|
+
* A Spark Lightning receive request.
|
|
1864
|
+
*/
|
|
1865
|
+
export interface SparkLightningReceiveRequest {
|
|
1866
|
+
id: string;
|
|
1867
|
+
|
|
1868
|
+
created_at: string;
|
|
1869
|
+
|
|
1870
|
+
network: string;
|
|
1871
|
+
|
|
1872
|
+
status: string;
|
|
1873
|
+
|
|
1874
|
+
typename: string;
|
|
1875
|
+
|
|
1876
|
+
updated_at: string;
|
|
1877
|
+
|
|
1878
|
+
invoice?: unknown;
|
|
1879
|
+
|
|
1880
|
+
payment_preimage?: string;
|
|
1881
|
+
|
|
1882
|
+
receiver_identity_public_key?: string;
|
|
1883
|
+
|
|
1884
|
+
transfer?: unknown;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* A Spark Lightning send request.
|
|
1889
|
+
*/
|
|
1890
|
+
export interface SparkLightningSendRequest {
|
|
1891
|
+
id: string;
|
|
1892
|
+
|
|
1893
|
+
created_at: string;
|
|
1894
|
+
|
|
1895
|
+
encoded_invoice: string;
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* The fee for a Spark Lightning payment.
|
|
1899
|
+
*/
|
|
1900
|
+
fee: SparkLightningFee;
|
|
1901
|
+
|
|
1902
|
+
idempotency_key: string;
|
|
1903
|
+
|
|
1904
|
+
network: string;
|
|
1905
|
+
|
|
1906
|
+
status: string;
|
|
1907
|
+
|
|
1908
|
+
typename: string;
|
|
1909
|
+
|
|
1910
|
+
updated_at: string;
|
|
1911
|
+
|
|
1912
|
+
payment_preimage?: string;
|
|
1913
|
+
|
|
1914
|
+
transfer?: unknown;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* Parameters for the Spark `transfer` RPC.
|
|
1919
|
+
*/
|
|
1920
|
+
export interface SparkTransferRpcInputParams {
|
|
1921
|
+
amount_sats: number;
|
|
1922
|
+
|
|
1923
|
+
receiver_spark_address: string;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* Transfers satoshis to a Spark address.
|
|
1928
|
+
*/
|
|
1929
|
+
export interface SparkTransferRpcInput {
|
|
1930
|
+
method: 'transfer';
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Parameters for the Spark `transfer` RPC.
|
|
1934
|
+
*/
|
|
1935
|
+
params: SparkTransferRpcInputParams;
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* The Spark network.
|
|
1939
|
+
*/
|
|
1940
|
+
network?: SparkNetwork;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* Gets the balance of the Spark wallet.
|
|
1945
|
+
*/
|
|
1946
|
+
export interface SparkGetBalanceRpcInput {
|
|
1947
|
+
method: 'getBalance';
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* The Spark network.
|
|
1951
|
+
*/
|
|
1952
|
+
network?: SparkNetwork;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* Strategy for selecting outputs in a Spark token transfer.
|
|
1957
|
+
*/
|
|
1958
|
+
export type SparkOutputSelectionStrategy = 'SMALL_FIRST' | 'LARGE_FIRST';
|
|
1959
|
+
|
|
1960
|
+
/**
|
|
1961
|
+
* Parameters for the Spark `transferTokens` RPC.
|
|
1962
|
+
*/
|
|
1963
|
+
export interface SparkTransferTokensRpcInputParams {
|
|
1964
|
+
receiver_spark_address: string;
|
|
1965
|
+
|
|
1966
|
+
token_amount: number;
|
|
1967
|
+
|
|
1968
|
+
token_identifier: string;
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* Strategy for selecting outputs in a Spark token transfer.
|
|
1972
|
+
*/
|
|
1973
|
+
output_selection_strategy?: SparkOutputSelectionStrategy;
|
|
1974
|
+
|
|
1975
|
+
selected_outputs?: Array<OutputWithPreviousTransactionData>;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* Transfers tokens to a Spark address.
|
|
1980
|
+
*/
|
|
1981
|
+
export interface SparkTransferTokensRpcInput {
|
|
1982
|
+
method: 'transferTokens';
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* Parameters for the Spark `transferTokens` RPC.
|
|
1986
|
+
*/
|
|
1987
|
+
params: SparkTransferTokensRpcInputParams;
|
|
1988
|
+
|
|
1989
|
+
/**
|
|
1990
|
+
* The Spark network.
|
|
1991
|
+
*/
|
|
1992
|
+
network?: SparkNetwork;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* Gets a static deposit address for the Spark wallet.
|
|
1997
|
+
*/
|
|
1998
|
+
export interface SparkGetStaticDepositAddressRpcInput {
|
|
1999
|
+
method: 'getStaticDepositAddress';
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* The Spark network.
|
|
2003
|
+
*/
|
|
2004
|
+
network?: SparkNetwork;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Parameters for the Spark `getClaimStaticDepositQuote` RPC.
|
|
2009
|
+
*/
|
|
2010
|
+
export interface SparkGetClaimStaticDepositQuoteRpcInputParams {
|
|
2011
|
+
transaction_id: string;
|
|
2012
|
+
|
|
2013
|
+
output_index?: number;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* Gets a quote for claiming a static deposit.
|
|
2018
|
+
*/
|
|
2019
|
+
export interface SparkGetClaimStaticDepositQuoteRpcInput {
|
|
2020
|
+
method: 'getClaimStaticDepositQuote';
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* Parameters for the Spark `getClaimStaticDepositQuote` RPC.
|
|
2024
|
+
*/
|
|
2025
|
+
params: SparkGetClaimStaticDepositQuoteRpcInputParams;
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* The Spark network.
|
|
2029
|
+
*/
|
|
2030
|
+
network?: SparkNetwork;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
/**
|
|
2034
|
+
* Parameters for the Spark `claimStaticDeposit` RPC.
|
|
2035
|
+
*/
|
|
2036
|
+
export interface SparkClaimStaticDepositRpcInputParams {
|
|
2037
|
+
credit_amount_sats: number;
|
|
2038
|
+
|
|
2039
|
+
signature: string;
|
|
2040
|
+
|
|
2041
|
+
transaction_id: string;
|
|
2042
|
+
|
|
2043
|
+
output_index?: number;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* Claims a static deposit into the Spark wallet.
|
|
2048
|
+
*/
|
|
2049
|
+
export interface SparkClaimStaticDepositRpcInput {
|
|
2050
|
+
method: 'claimStaticDeposit';
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* Parameters for the Spark `claimStaticDeposit` RPC.
|
|
2054
|
+
*/
|
|
2055
|
+
params: SparkClaimStaticDepositRpcInputParams;
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* The Spark network.
|
|
2059
|
+
*/
|
|
2060
|
+
network?: SparkNetwork;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* Parameters for the Spark `createLightningInvoice` RPC.
|
|
2065
|
+
*/
|
|
2066
|
+
export interface SparkCreateLightningInvoiceRpcInputParams {
|
|
2067
|
+
amount_sats: number;
|
|
2068
|
+
|
|
2069
|
+
description_hash?: string;
|
|
2070
|
+
|
|
2071
|
+
expiry_seconds?: number;
|
|
2072
|
+
|
|
2073
|
+
include_spark_address?: boolean;
|
|
2074
|
+
|
|
2075
|
+
memo?: string;
|
|
2076
|
+
|
|
2077
|
+
receiver_identity_pubkey?: string;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
/**
|
|
2081
|
+
* Creates a Lightning invoice for the Spark wallet.
|
|
2082
|
+
*/
|
|
2083
|
+
export interface SparkCreateLightningInvoiceRpcInput {
|
|
2084
|
+
method: 'createLightningInvoice';
|
|
2085
|
+
|
|
2086
|
+
/**
|
|
2087
|
+
* Parameters for the Spark `createLightningInvoice` RPC.
|
|
2088
|
+
*/
|
|
2089
|
+
params: SparkCreateLightningInvoiceRpcInputParams;
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* The Spark network.
|
|
2093
|
+
*/
|
|
2094
|
+
network?: SparkNetwork;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* Parameters for the Spark `payLightningInvoice` RPC.
|
|
2099
|
+
*/
|
|
2100
|
+
export interface SparkPayLightningInvoiceRpcInputParams {
|
|
2101
|
+
invoice: string;
|
|
2102
|
+
|
|
2103
|
+
max_fee_sats: number;
|
|
2104
|
+
|
|
2105
|
+
amount_sats_to_send?: number;
|
|
2106
|
+
|
|
2107
|
+
prefer_spark?: boolean;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* Pays a Lightning invoice from the Spark wallet.
|
|
2112
|
+
*/
|
|
2113
|
+
export interface SparkPayLightningInvoiceRpcInput {
|
|
2114
|
+
method: 'payLightningInvoice';
|
|
2115
|
+
|
|
2116
|
+
/**
|
|
2117
|
+
* Parameters for the Spark `payLightningInvoice` RPC.
|
|
2118
|
+
*/
|
|
2119
|
+
params: SparkPayLightningInvoiceRpcInputParams;
|
|
2120
|
+
|
|
2121
|
+
/**
|
|
2122
|
+
* The Spark network.
|
|
2123
|
+
*/
|
|
2124
|
+
network?: SparkNetwork;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
* Parameters for the Spark `signMessageWithIdentityKey` RPC.
|
|
2129
|
+
*/
|
|
2130
|
+
export interface SparkSignMessageWithIdentityKeyRpcInputParams {
|
|
2131
|
+
message: string;
|
|
2132
|
+
|
|
2133
|
+
compact?: boolean;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
/**
|
|
2137
|
+
* Signs a message with the Spark identity key.
|
|
2138
|
+
*/
|
|
2139
|
+
export interface SparkSignMessageWithIdentityKeyRpcInput {
|
|
2140
|
+
method: 'signMessageWithIdentityKey';
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* Parameters for the Spark `signMessageWithIdentityKey` RPC.
|
|
2144
|
+
*/
|
|
2145
|
+
params: SparkSignMessageWithIdentityKeyRpcInputParams;
|
|
2146
|
+
|
|
2147
|
+
/**
|
|
2148
|
+
* The Spark network.
|
|
2149
|
+
*/
|
|
2150
|
+
network?: SparkNetwork;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
/**
|
|
2154
|
+
* Request body for Spark wallet RPC operations, discriminated by method.
|
|
2155
|
+
*/
|
|
2156
|
+
export type SparkRpcInput =
|
|
2157
|
+
| SparkTransferRpcInput
|
|
2158
|
+
| SparkGetBalanceRpcInput
|
|
2159
|
+
| SparkTransferTokensRpcInput
|
|
2160
|
+
| SparkGetStaticDepositAddressRpcInput
|
|
2161
|
+
| SparkGetClaimStaticDepositQuoteRpcInput
|
|
2162
|
+
| SparkClaimStaticDepositRpcInput
|
|
2163
|
+
| SparkCreateLightningInvoiceRpcInput
|
|
2164
|
+
| SparkPayLightningInvoiceRpcInput
|
|
2165
|
+
| SparkSignMessageWithIdentityKeyRpcInput;
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* Response to the Spark `transfer` RPC.
|
|
2169
|
+
*/
|
|
2170
|
+
export interface SparkTransferRpcResponse {
|
|
2171
|
+
method: 'transfer';
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
* A Spark transfer.
|
|
2175
|
+
*/
|
|
2176
|
+
data?: SparkTransfer;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
/**
|
|
2180
|
+
* Response to the Spark `getBalance` RPC.
|
|
2181
|
+
*/
|
|
2182
|
+
export interface SparkGetBalanceRpcResponse {
|
|
2183
|
+
method: 'getBalance';
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* The balance of a Spark wallet.
|
|
2187
|
+
*/
|
|
2188
|
+
data?: SparkBalance;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* Data returned by the Spark `transferTokens` RPC.
|
|
2193
|
+
*/
|
|
2194
|
+
export interface SparkTransferTokensRpcResponseData {
|
|
2195
|
+
id: string;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* Response to the Spark `transferTokens` RPC.
|
|
2200
|
+
*/
|
|
2201
|
+
export interface SparkTransferTokensRpcResponse {
|
|
2202
|
+
method: 'transferTokens';
|
|
2203
|
+
|
|
2204
|
+
/**
|
|
2205
|
+
* Data returned by the Spark `transferTokens` RPC.
|
|
2206
|
+
*/
|
|
2207
|
+
data?: SparkTransferTokensRpcResponseData;
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
/**
|
|
2211
|
+
* Data returned by the Spark `getStaticDepositAddress` RPC.
|
|
2212
|
+
*/
|
|
2213
|
+
export interface SparkGetStaticDepositAddressRpcResponseData {
|
|
2214
|
+
address: string;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Response to the Spark `getStaticDepositAddress` RPC.
|
|
2219
|
+
*/
|
|
2220
|
+
export interface SparkGetStaticDepositAddressRpcResponse {
|
|
2221
|
+
method: 'getStaticDepositAddress';
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* Data returned by the Spark `getStaticDepositAddress` RPC.
|
|
2225
|
+
*/
|
|
2226
|
+
data?: SparkGetStaticDepositAddressRpcResponseData;
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* Data returned by the Spark `getClaimStaticDepositQuote` RPC.
|
|
2231
|
+
*/
|
|
2232
|
+
export interface SparkGetClaimStaticDepositQuoteRpcResponseData {
|
|
2233
|
+
credit_amount_sats: number;
|
|
2234
|
+
|
|
2235
|
+
network: string;
|
|
2236
|
+
|
|
2237
|
+
output_index: number;
|
|
2238
|
+
|
|
2239
|
+
signature: string;
|
|
2240
|
+
|
|
2241
|
+
transaction_id: string;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
/**
|
|
2245
|
+
* Response to the Spark `getClaimStaticDepositQuote` RPC.
|
|
2246
|
+
*/
|
|
2247
|
+
export interface SparkGetClaimStaticDepositQuoteRpcResponse {
|
|
2248
|
+
method: 'getClaimStaticDepositQuote';
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Data returned by the Spark `getClaimStaticDepositQuote` RPC.
|
|
2252
|
+
*/
|
|
2253
|
+
data?: SparkGetClaimStaticDepositQuoteRpcResponseData;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* Data returned by the Spark `claimStaticDeposit` RPC.
|
|
2258
|
+
*/
|
|
2259
|
+
export interface SparkClaimStaticDepositRpcResponseData {
|
|
2260
|
+
transfer_id: string;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
/**
|
|
2264
|
+
* Response to the Spark `claimStaticDeposit` RPC.
|
|
2265
|
+
*/
|
|
2266
|
+
export interface SparkClaimStaticDepositRpcResponse {
|
|
2267
|
+
method: 'claimStaticDeposit';
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* Data returned by the Spark `claimStaticDeposit` RPC.
|
|
2271
|
+
*/
|
|
2272
|
+
data?: SparkClaimStaticDepositRpcResponseData;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* Response to the Spark `createLightningInvoice` RPC.
|
|
2277
|
+
*/
|
|
2278
|
+
export interface SparkCreateLightningInvoiceRpcResponse {
|
|
2279
|
+
method: 'createLightningInvoice';
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* A Spark Lightning receive request.
|
|
2283
|
+
*/
|
|
2284
|
+
data?: SparkLightningReceiveRequest;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* Response to the Spark `payLightningInvoice` RPC.
|
|
2289
|
+
*/
|
|
2290
|
+
export interface SparkPayLightningInvoiceRpcResponse {
|
|
2291
|
+
method: 'payLightningInvoice';
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* A Spark transfer.
|
|
2295
|
+
*/
|
|
2296
|
+
data?: SparkTransfer | SparkLightningSendRequest;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
/**
|
|
2300
|
+
* Data returned by the Spark `signMessageWithIdentityKey` RPC.
|
|
2301
|
+
*/
|
|
2302
|
+
export interface SparkSignMessageWithIdentityKeyRpcResponseData {
|
|
2303
|
+
signature: string;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
/**
|
|
2307
|
+
* Response to the Spark `signMessageWithIdentityKey` RPC.
|
|
2308
|
+
*/
|
|
2309
|
+
export interface SparkSignMessageWithIdentityKeyRpcResponse {
|
|
2310
|
+
method: 'signMessageWithIdentityKey';
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Data returned by the Spark `signMessageWithIdentityKey` RPC.
|
|
2314
|
+
*/
|
|
2315
|
+
data?: SparkSignMessageWithIdentityKeyRpcResponseData;
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
/**
|
|
2319
|
+
* Response body for Spark wallet RPC operations, discriminated by method.
|
|
2320
|
+
*/
|
|
2321
|
+
export type SparkRpcResponse =
|
|
2322
|
+
| SparkTransferRpcResponse
|
|
2323
|
+
| SparkGetBalanceRpcResponse
|
|
2324
|
+
| SparkTransferTokensRpcResponse
|
|
2325
|
+
| SparkGetStaticDepositAddressRpcResponse
|
|
2326
|
+
| SparkGetClaimStaticDepositQuoteRpcResponse
|
|
2327
|
+
| SparkClaimStaticDepositRpcResponse
|
|
2328
|
+
| SparkCreateLightningInvoiceRpcResponse
|
|
2329
|
+
| SparkPayLightningInvoiceRpcResponse
|
|
2330
|
+
| SparkSignMessageWithIdentityKeyRpcResponse;
|
|
2331
|
+
|
|
2332
|
+
/**
|
|
2333
|
+
* A wallet managed by Privy's wallet infrastructure.
|
|
2334
|
+
*/
|
|
2335
|
+
export interface Wallet {
|
|
2336
|
+
/**
|
|
2337
|
+
* Unique ID of the wallet. This will be the primary identifier when using the
|
|
2338
|
+
* wallet in the future.
|
|
2339
|
+
*/
|
|
2340
|
+
id: string;
|
|
2341
|
+
|
|
2342
|
+
/**
|
|
2343
|
+
* Additional signers for the wallet.
|
|
2344
|
+
*/
|
|
2345
|
+
additional_signers: WalletAdditionalSigner;
|
|
2346
|
+
|
|
2347
|
+
/**
|
|
2348
|
+
* Address of the wallet.
|
|
2349
|
+
*/
|
|
2350
|
+
address: string;
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* The wallet chain types.
|
|
2354
|
+
*/
|
|
2355
|
+
chain_type: WalletChainType;
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Unix timestamp of when the wallet was created in milliseconds.
|
|
2359
|
+
*/
|
|
2360
|
+
created_at: number;
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* Unix timestamp of when the wallet was exported in milliseconds, if the wallet
|
|
2364
|
+
* was exported.
|
|
2365
|
+
*/
|
|
2366
|
+
exported_at: number | null;
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Unix timestamp of when the wallet was imported in milliseconds, if the wallet
|
|
2370
|
+
* was imported.
|
|
2371
|
+
*/
|
|
2372
|
+
imported_at: number | null;
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* The key quorum ID of the owner of the wallet.
|
|
2376
|
+
*/
|
|
2377
|
+
owner_id: string | null;
|
|
2378
|
+
|
|
2379
|
+
/**
|
|
2380
|
+
* List of policy IDs for policies that are enforced on the wallet.
|
|
2381
|
+
*/
|
|
2382
|
+
policy_ids: Array<string>;
|
|
2383
|
+
|
|
2384
|
+
/**
|
|
2385
|
+
* The number of keys that must sign for an action to be valid.
|
|
2386
|
+
*/
|
|
2387
|
+
authorization_threshold?: number;
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* Information about the custodian managing this wallet.
|
|
2391
|
+
*/
|
|
2392
|
+
custody?: WalletCustodian;
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* A human-readable label for the wallet.
|
|
2396
|
+
*/
|
|
2397
|
+
display_name?: string;
|
|
2398
|
+
|
|
2399
|
+
/**
|
|
2400
|
+
* A customer-provided identifier for mapping to external systems. Write-once, set
|
|
2401
|
+
* only at creation.
|
|
2402
|
+
*/
|
|
2403
|
+
external_id?: string;
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* The compressed, raw public key for the wallet along the chain cryptographic
|
|
2407
|
+
* curve.
|
|
2408
|
+
*/
|
|
2409
|
+
public_key?: string;
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
/**
|
|
2413
|
+
* Request body for looking up a wallet by its blockchain address.
|
|
2414
|
+
*/
|
|
2415
|
+
export interface GetByWalletAddressRequestBody {
|
|
2416
|
+
/**
|
|
2417
|
+
* A blockchain wallet address (Ethereum or Solana).
|
|
2418
|
+
*/
|
|
2419
|
+
address: Address;
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* Request body for updating a wallet.
|
|
2424
|
+
*/
|
|
2425
|
+
export interface WalletUpdateRequestBody {
|
|
2426
|
+
/**
|
|
2427
|
+
* Additional signers for the wallet.
|
|
2428
|
+
*/
|
|
2429
|
+
additional_signers?: AdditionalSignerInput;
|
|
2430
|
+
|
|
2431
|
+
/**
|
|
2432
|
+
* A human-readable label for the wallet. Set to null to clear.
|
|
2433
|
+
*/
|
|
2434
|
+
display_name?: string | null;
|
|
2435
|
+
|
|
2436
|
+
/**
|
|
2437
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
2438
|
+
* null to remove the current owner.
|
|
2439
|
+
*/
|
|
2440
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
2444
|
+
* not specify an owner.
|
|
2445
|
+
*/
|
|
2446
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
2447
|
+
|
|
2448
|
+
/**
|
|
2449
|
+
* New policy IDs to enforce on the wallet. Currently, only one policy is supported
|
|
2450
|
+
* per wallet.
|
|
2451
|
+
*/
|
|
2452
|
+
policy_ids?: Array<string>;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* Input for a single wallet in a batch creation request.
|
|
2457
|
+
*/
|
|
2458
|
+
export interface WalletBatchItemInput {
|
|
2459
|
+
/**
|
|
2460
|
+
* The wallet chain types.
|
|
2461
|
+
*/
|
|
2462
|
+
chain_type: WalletChainType;
|
|
2463
|
+
|
|
2464
|
+
/**
|
|
2465
|
+
* Additional signers for the wallet.
|
|
2466
|
+
*/
|
|
2467
|
+
additional_signers?: AdditionalSignerInput;
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* A human-readable label for the wallet.
|
|
2471
|
+
*/
|
|
2472
|
+
display_name?: string;
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* A customer-provided identifier for mapping to external systems. URL-safe
|
|
2476
|
+
* characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed
|
|
2477
|
+
* after creation.
|
|
2478
|
+
*/
|
|
2479
|
+
external_id?: string;
|
|
2480
|
+
|
|
2481
|
+
/**
|
|
2482
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
2483
|
+
* null to remove the current owner.
|
|
2484
|
+
*/
|
|
2485
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
2486
|
+
|
|
2487
|
+
/**
|
|
2488
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
2489
|
+
* not specify an owner.
|
|
2490
|
+
*/
|
|
2491
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* List of policy IDs for policies that should be enforced on the wallet.
|
|
2495
|
+
* Currently, only one policy is supported per wallet.
|
|
2496
|
+
*/
|
|
2497
|
+
policy_ids?: Array<string>;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
/**
|
|
2501
|
+
* Request body for batch wallet creation.
|
|
2502
|
+
*/
|
|
2503
|
+
export interface WalletBatchCreateInput {
|
|
2504
|
+
/**
|
|
2505
|
+
* Array of wallet creation requests. Minimum 1, maximum 100.
|
|
2506
|
+
*/
|
|
2507
|
+
wallets: Array<WalletBatchItemInput>;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
/**
|
|
2511
|
+
* A single result from a batch wallet creation operation.
|
|
2512
|
+
*/
|
|
2513
|
+
export type WalletBatchCreateResult =
|
|
2514
|
+
| WalletBatchCreateResult.WalletBatchCreateSuccess
|
|
2515
|
+
| WalletBatchCreateResult.WalletBatchCreateFailure;
|
|
2516
|
+
|
|
2517
|
+
export namespace WalletBatchCreateResult {
|
|
2518
|
+
/**
|
|
2519
|
+
* A successful wallet creation result within a batch operation.
|
|
2520
|
+
*/
|
|
2521
|
+
export interface WalletBatchCreateSuccess {
|
|
2522
|
+
/**
|
|
2523
|
+
* The index of the wallet in the original request array.
|
|
2524
|
+
*/
|
|
2525
|
+
index: number;
|
|
2526
|
+
|
|
2527
|
+
success: true;
|
|
2528
|
+
|
|
2529
|
+
/**
|
|
2530
|
+
* A wallet managed by Privy's wallet infrastructure.
|
|
2531
|
+
*/
|
|
2532
|
+
wallet: WalletsAPI.Wallet;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
/**
|
|
2536
|
+
* A failed wallet creation result within a batch operation.
|
|
2537
|
+
*/
|
|
2538
|
+
export interface WalletBatchCreateFailure {
|
|
2539
|
+
/**
|
|
2540
|
+
* A PrivyErrorCode string identifying the error type (e.g., "invalid_data",
|
|
2541
|
+
* "resource_conflict").
|
|
2542
|
+
*/
|
|
2543
|
+
code: string;
|
|
2544
|
+
|
|
2545
|
+
/**
|
|
2546
|
+
* A human-readable error message with details about what went wrong.
|
|
2547
|
+
*/
|
|
2548
|
+
error: string;
|
|
2549
|
+
|
|
2550
|
+
/**
|
|
2551
|
+
* The index of the wallet in the original request array.
|
|
2552
|
+
*/
|
|
2553
|
+
index: number;
|
|
2554
|
+
|
|
2555
|
+
success: false;
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
/**
|
|
2560
|
+
* Response for a batch wallet creation request.
|
|
2561
|
+
*/
|
|
2562
|
+
export interface WalletBatchCreateResponse {
|
|
2563
|
+
/**
|
|
2564
|
+
* Array of results for each wallet creation request, in the same order as input.
|
|
2565
|
+
*/
|
|
2566
|
+
results: Array<WalletBatchCreateResult>;
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
/**
|
|
2570
|
+
* Request body for wallet RPC operations, discriminated by method.
|
|
2571
|
+
*/
|
|
2572
|
+
export type WalletRpcRequestBody =
|
|
2573
|
+
| EthereumSignTransactionRpcInput
|
|
2574
|
+
| EthereumSendTransactionRpcInput
|
|
2575
|
+
| EthereumPersonalSignRpcInput
|
|
2576
|
+
| EthereumSignTypedDataRpcInput
|
|
2577
|
+
| EthereumSecp256k1SignRpcInput
|
|
2578
|
+
| EthereumSign7702AuthorizationRpcInput
|
|
2579
|
+
| EthereumSignUserOperationRpcInput
|
|
2580
|
+
| EthereumSendCallsRpcInput
|
|
2581
|
+
| SolanaSignTransactionRpcInput
|
|
2582
|
+
| SolanaSignAndSendTransactionRpcInput
|
|
2583
|
+
| SolanaSignMessageRpcInput
|
|
2584
|
+
| SparkTransferRpcInput
|
|
2585
|
+
| SparkGetBalanceRpcInput
|
|
2586
|
+
| SparkTransferTokensRpcInput
|
|
2587
|
+
| SparkGetStaticDepositAddressRpcInput
|
|
2588
|
+
| SparkGetClaimStaticDepositQuoteRpcInput
|
|
2589
|
+
| SparkClaimStaticDepositRpcInput
|
|
2590
|
+
| SparkCreateLightningInvoiceRpcInput
|
|
2591
|
+
| SparkPayLightningInvoiceRpcInput
|
|
2592
|
+
| SparkSignMessageWithIdentityKeyRpcInput
|
|
2593
|
+
| ExportPrivateKeyRpcInput
|
|
2594
|
+
| ExportSeedPhraseRpcInput;
|
|
2595
|
+
|
|
2596
|
+
/**
|
|
2597
|
+
* Response body for wallet RPC operations, discriminated by method.
|
|
2598
|
+
*/
|
|
2599
|
+
export type WalletRpcResponse =
|
|
2600
|
+
| EthereumPersonalSignRpcResponse
|
|
2601
|
+
| EthereumSignTypedDataRpcResponse
|
|
2602
|
+
| EthereumSignTransactionRpcResponse
|
|
2603
|
+
| EthereumSendTransactionRpcResponse
|
|
2604
|
+
| EthereumSignUserOperationRpcResponse
|
|
2605
|
+
| EthereumSign7702AuthorizationRpcResponse
|
|
2606
|
+
| EthereumSecp256k1SignRpcResponse
|
|
2607
|
+
| EthereumSendCallsRpcResponse
|
|
1344
2608
|
| SolanaSignMessageRpcResponse
|
|
1345
2609
|
| SolanaSignTransactionRpcResponse
|
|
1346
|
-
| SolanaSignAndSendTransactionRpcResponse
|
|
2610
|
+
| SolanaSignAndSendTransactionRpcResponse
|
|
2611
|
+
| SparkTransferRpcResponse
|
|
2612
|
+
| SparkGetBalanceRpcResponse
|
|
2613
|
+
| SparkTransferTokensRpcResponse
|
|
2614
|
+
| SparkGetStaticDepositAddressRpcResponse
|
|
2615
|
+
| SparkGetClaimStaticDepositQuoteRpcResponse
|
|
2616
|
+
| SparkClaimStaticDepositRpcResponse
|
|
2617
|
+
| SparkCreateLightningInvoiceRpcResponse
|
|
2618
|
+
| SparkPayLightningInvoiceRpcResponse
|
|
2619
|
+
| SparkSignMessageWithIdentityKeyRpcResponse
|
|
2620
|
+
| ExportPrivateKeyRpcResponse
|
|
2621
|
+
| ExportSeedPhraseRpcResponse;
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* Request body for wallet authentication with HPKE-encrypted response.
|
|
2625
|
+
*/
|
|
2626
|
+
export interface WalletAuthenticateRequestBody {
|
|
2627
|
+
/**
|
|
2628
|
+
* The encryption type for the authentication response. Currently only supports
|
|
2629
|
+
* HPKE.
|
|
2630
|
+
*/
|
|
2631
|
+
encryption_type: 'HPKE';
|
|
2632
|
+
|
|
2633
|
+
/**
|
|
2634
|
+
* The public key of your ECDH keypair, in base64-encoded, SPKI-format, whose
|
|
2635
|
+
* private key will be able to decrypt the session key.
|
|
2636
|
+
*/
|
|
2637
|
+
recipient_public_key: string;
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* The user's JWT, to be used to authenticate the user.
|
|
2641
|
+
*/
|
|
2642
|
+
user_jwt: string;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* The source asset, amount, and chain for a token transfer.
|
|
2647
|
+
*/
|
|
2648
|
+
export interface TokenTransferSource {
|
|
2649
|
+
/**
|
|
2650
|
+
* Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
|
|
2651
|
+
* USDC, "0.01" for 0.01 ETH). Not in the smallest on-chain unit (wei, lamports,
|
|
2652
|
+
* etc.).
|
|
2653
|
+
*/
|
|
2654
|
+
amount: string;
|
|
2655
|
+
|
|
2656
|
+
/**
|
|
2657
|
+
* The asset to transfer. Supported: 'usdc', 'usdb', 'usdt' (stablecoins), 'eth'
|
|
2658
|
+
* (native Ethereum), 'sol' (native Solana).
|
|
2659
|
+
*/
|
|
2660
|
+
asset: string;
|
|
2661
|
+
|
|
2662
|
+
/**
|
|
2663
|
+
* The blockchain network on which to perform the transfer. Supported chains
|
|
2664
|
+
* include: 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and their
|
|
2665
|
+
* respective testnets.
|
|
2666
|
+
*/
|
|
2667
|
+
chain: string;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* The destination address for a token transfer.
|
|
2672
|
+
*/
|
|
2673
|
+
export interface TokenTransferDestination {
|
|
2674
|
+
/**
|
|
2675
|
+
* Recipient address (hex for EVM, base58 for Solana)
|
|
2676
|
+
*/
|
|
2677
|
+
address: string;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* Request body for initiating a sponsored token transfer from an embedded wallet.
|
|
2682
|
+
*/
|
|
2683
|
+
export interface CreateTokenTransferRequest {
|
|
2684
|
+
/**
|
|
2685
|
+
* The destination address for a token transfer.
|
|
2686
|
+
*/
|
|
2687
|
+
destination: TokenTransferDestination;
|
|
2688
|
+
|
|
2689
|
+
/**
|
|
2690
|
+
* The source asset, amount, and chain for a token transfer.
|
|
2691
|
+
*/
|
|
2692
|
+
source: TokenTransferSource;
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
/**
|
|
2696
|
+
* SUI transaction commands allowlist for raw_sign endpoint policy evaluation
|
|
2697
|
+
*/
|
|
2698
|
+
export type SuiCommandName = 'TransferObjects' | 'SplitCoins' | 'MergeCoins';
|
|
2699
|
+
|
|
2700
|
+
/**
|
|
2701
|
+
* Input for registering or updating an application public signing key for
|
|
2702
|
+
* API-based wallet actions.
|
|
2703
|
+
*/
|
|
2704
|
+
export interface WalletAPIRegisterAuthorizationKeyInput {
|
|
2705
|
+
public_key: string;
|
|
2706
|
+
|
|
2707
|
+
display_name?: string;
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* The role of an authorization key, controlling what actions it can authorize on a
|
|
2711
|
+
* wallet.
|
|
2712
|
+
*/
|
|
2713
|
+
role?: AuthorizationKeyRole | null;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
/**
|
|
2717
|
+
* Input for revoking an application authorization key.
|
|
2718
|
+
*/
|
|
2719
|
+
export interface WalletAPIRevokeAuthorizationKeyInput {
|
|
2720
|
+
id: string;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* Dashboard response for a wallet authorization key (includes role, which is an
|
|
2725
|
+
* internal-only concept).
|
|
2726
|
+
*/
|
|
2727
|
+
export interface AuthorizationKeyDashboardResponse {
|
|
2728
|
+
id: string;
|
|
2729
|
+
|
|
2730
|
+
created_at: number;
|
|
2731
|
+
|
|
2732
|
+
display_name: string | null;
|
|
2733
|
+
|
|
2734
|
+
public_key: string;
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* The role of an authorization key, controlling what actions it can authorize on a
|
|
2738
|
+
* wallet.
|
|
2739
|
+
*/
|
|
2740
|
+
role: AuthorizationKeyRole | null;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* Public-facing response for a wallet authorization key.
|
|
2745
|
+
*/
|
|
2746
|
+
export interface AuthorizationKeyResponse {
|
|
2747
|
+
id: string;
|
|
2748
|
+
|
|
2749
|
+
created_at: number;
|
|
2750
|
+
|
|
2751
|
+
display_name: string | null;
|
|
2752
|
+
|
|
2753
|
+
public_key: string;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
/**
|
|
2757
|
+
* Headers required to authorize wallet operations.
|
|
2758
|
+
*/
|
|
2759
|
+
export interface WalletAuthorizationHeaders {
|
|
2760
|
+
/**
|
|
2761
|
+
* ID of your Privy app.
|
|
2762
|
+
*/
|
|
2763
|
+
'privy-app-id': string;
|
|
2764
|
+
|
|
2765
|
+
/**
|
|
2766
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
2767
|
+
* should be comma separated.
|
|
2768
|
+
*/
|
|
2769
|
+
'privy-authorization-signature'?: string;
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
2773
|
+
* deadline by which the request must be processed.
|
|
2774
|
+
*/
|
|
2775
|
+
'privy-request-expiry'?: string;
|
|
2776
|
+
}
|
|
1347
2777
|
|
|
1348
2778
|
export interface WalletExportResponse {
|
|
1349
2779
|
/**
|
|
@@ -1360,7 +2790,7 @@ export interface WalletExportResponse {
|
|
|
1360
2790
|
/**
|
|
1361
2791
|
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
1362
2792
|
*/
|
|
1363
|
-
encryption_type:
|
|
2793
|
+
encryption_type: HpkeEncryption;
|
|
1364
2794
|
}
|
|
1365
2795
|
|
|
1366
2796
|
export interface WalletInitImportResponse {
|
|
@@ -1372,21 +2802,7 @@ export interface WalletInitImportResponse {
|
|
|
1372
2802
|
/**
|
|
1373
2803
|
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
1374
2804
|
*/
|
|
1375
|
-
encryption_type:
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
export interface WalletRawSignResponse {
|
|
1379
|
-
data: WalletRawSignResponse.Data;
|
|
1380
|
-
|
|
1381
|
-
method: 'raw_sign';
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
export namespace WalletRawSignResponse {
|
|
1385
|
-
export interface Data {
|
|
1386
|
-
encoding: 'hex';
|
|
1387
|
-
|
|
1388
|
-
signature: string;
|
|
1389
|
-
}
|
|
2805
|
+
encryption_type: HpkeEncryption;
|
|
1390
2806
|
}
|
|
1391
2807
|
|
|
1392
2808
|
export type WalletAuthenticateWithJwtResponse =
|
|
@@ -1468,62 +2884,42 @@ export interface WalletCreateParams {
|
|
|
1468
2884
|
/**
|
|
1469
2885
|
* Body param: Additional signers for the wallet.
|
|
1470
2886
|
*/
|
|
1471
|
-
additional_signers?:
|
|
2887
|
+
additional_signers?: AdditionalSignerInput;
|
|
1472
2888
|
|
|
1473
2889
|
/**
|
|
1474
|
-
* Body param:
|
|
1475
|
-
* owner_id as it will be generated automatically. When updating a wallet, you can
|
|
1476
|
-
* set the owner to null to remove the owner.
|
|
2890
|
+
* Body param: A human-readable label for the wallet.
|
|
1477
2891
|
*/
|
|
1478
|
-
|
|
2892
|
+
display_name?: string;
|
|
1479
2893
|
|
|
1480
2894
|
/**
|
|
1481
|
-
* Body param:
|
|
1482
|
-
*
|
|
2895
|
+
* Body param: A customer-provided identifier for mapping to external systems.
|
|
2896
|
+
* URL-safe characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be
|
|
2897
|
+
* changed after creation.
|
|
1483
2898
|
*/
|
|
1484
|
-
|
|
2899
|
+
external_id?: string;
|
|
1485
2900
|
|
|
1486
2901
|
/**
|
|
1487
|
-
* Body param:
|
|
1488
|
-
*
|
|
2902
|
+
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
2903
|
+
* public key, or null to remove the current owner.
|
|
1489
2904
|
*/
|
|
1490
|
-
|
|
2905
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
1491
2906
|
|
|
1492
2907
|
/**
|
|
1493
|
-
*
|
|
1494
|
-
*
|
|
2908
|
+
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
2909
|
+
* provide this, do not specify an owner.
|
|
1495
2910
|
*/
|
|
1496
|
-
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
export namespace WalletCreateParams {
|
|
1500
|
-
export interface AdditionalSigner {
|
|
1501
|
-
signer_id: string;
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
1505
|
-
* this will override the base policy IDs set on the wallet.
|
|
1506
|
-
*/
|
|
1507
|
-
override_policy_ids?: Array<string>;
|
|
1508
|
-
}
|
|
2911
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
1509
2912
|
|
|
1510
2913
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
1513
|
-
* automatically.
|
|
2914
|
+
* Body param: An optional list of up to one policy ID to enforce on the wallet.
|
|
1514
2915
|
*/
|
|
1515
|
-
|
|
1516
|
-
public_key: string;
|
|
1517
|
-
}
|
|
2916
|
+
policy_ids?: PolicyInput;
|
|
1518
2917
|
|
|
1519
2918
|
/**
|
|
1520
|
-
*
|
|
1521
|
-
*
|
|
1522
|
-
* owner_id as it will be generated automatically.
|
|
2919
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
2920
|
+
* a 24-hour window.
|
|
1523
2921
|
*/
|
|
1524
|
-
|
|
1525
|
-
user_id: string;
|
|
1526
|
-
}
|
|
2922
|
+
'privy-idempotency-key'?: string;
|
|
1527
2923
|
}
|
|
1528
2924
|
|
|
1529
2925
|
export interface WalletListParams extends CursorParams {
|
|
@@ -1539,6 +2935,11 @@ export interface WalletListParams extends CursorParams {
|
|
|
1539
2935
|
*/
|
|
1540
2936
|
chain_type?: WalletChainType;
|
|
1541
2937
|
|
|
2938
|
+
/**
|
|
2939
|
+
* Filter wallets by external ID.
|
|
2940
|
+
*/
|
|
2941
|
+
external_id?: string;
|
|
2942
|
+
|
|
1542
2943
|
/**
|
|
1543
2944
|
* Filter wallets by user ID. Cannot be used together with authorization_key.
|
|
1544
2945
|
*/
|
|
@@ -1550,7 +2951,7 @@ export interface WalletExportParams {
|
|
|
1550
2951
|
* Body param: The encryption type of the wallet to import. Currently only supports
|
|
1551
2952
|
* `HPKE`.
|
|
1552
2953
|
*/
|
|
1553
|
-
encryption_type:
|
|
2954
|
+
encryption_type: HpkeEncryption;
|
|
1554
2955
|
|
|
1555
2956
|
/**
|
|
1556
2957
|
* Body param: The base64-encoded encryption public key to encrypt the wallet
|
|
@@ -1558,141 +2959,378 @@ export interface WalletExportParams {
|
|
|
1558
2959
|
*/
|
|
1559
2960
|
recipient_public_key: string;
|
|
1560
2961
|
|
|
2962
|
+
/**
|
|
2963
|
+
* Body param
|
|
2964
|
+
*/
|
|
2965
|
+
export_seed_phrase?: boolean;
|
|
2966
|
+
|
|
1561
2967
|
/**
|
|
1562
2968
|
* Header param: Request authorization signature. If multiple signatures are
|
|
1563
2969
|
* required, they should be comma separated.
|
|
1564
2970
|
*/
|
|
1565
2971
|
'privy-authorization-signature'?: string;
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
2975
|
+
* representing the deadline by which the request must be processed.
|
|
2976
|
+
*/
|
|
2977
|
+
'privy-request-expiry'?: string;
|
|
1566
2978
|
}
|
|
1567
2979
|
|
|
1568
2980
|
export type WalletInitImportParams =
|
|
1569
2981
|
| WalletInitImportParams.HDInitInput
|
|
1570
2982
|
| WalletInitImportParams.PrivateKeyInitInput;
|
|
1571
2983
|
|
|
1572
|
-
export declare namespace WalletInitImportParams {
|
|
1573
|
-
export interface HDInitInput {
|
|
2984
|
+
export declare namespace WalletInitImportParams {
|
|
2985
|
+
export interface HDInitInput {
|
|
2986
|
+
/**
|
|
2987
|
+
* The address of the wallet to import.
|
|
2988
|
+
*/
|
|
2989
|
+
address: string;
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
2993
|
+
* `solana`.
|
|
2994
|
+
*/
|
|
2995
|
+
chain_type: WalletImportSupportedChains;
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
2999
|
+
*/
|
|
3000
|
+
encryption_type: HpkeEncryption;
|
|
3001
|
+
|
|
3002
|
+
/**
|
|
3003
|
+
* The entropy type of the wallet to import.
|
|
3004
|
+
*/
|
|
3005
|
+
entropy_type: 'hd';
|
|
3006
|
+
|
|
3007
|
+
/**
|
|
3008
|
+
* The index of the wallet to import.
|
|
3009
|
+
*/
|
|
3010
|
+
index: number;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
export interface PrivateKeyInitInput {
|
|
3014
|
+
/**
|
|
3015
|
+
* The address of the wallet to import.
|
|
3016
|
+
*/
|
|
3017
|
+
address: string;
|
|
3018
|
+
|
|
3019
|
+
/**
|
|
3020
|
+
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
3021
|
+
* `solana`.
|
|
3022
|
+
*/
|
|
3023
|
+
chain_type: WalletImportSupportedChains;
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
3027
|
+
*/
|
|
3028
|
+
encryption_type: HpkeEncryption;
|
|
3029
|
+
|
|
3030
|
+
entropy_type: 'private-key';
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
export interface WalletRawSignParams {
|
|
3035
|
+
/**
|
|
3036
|
+
* Body param: Parameters for the `raw_sign` RPC.
|
|
3037
|
+
*/
|
|
3038
|
+
params: RawSignInputParams;
|
|
3039
|
+
|
|
3040
|
+
/**
|
|
3041
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3042
|
+
* required, they should be comma separated.
|
|
3043
|
+
*/
|
|
3044
|
+
'privy-authorization-signature'?: string;
|
|
3045
|
+
|
|
3046
|
+
/**
|
|
3047
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3048
|
+
* a 24-hour window.
|
|
3049
|
+
*/
|
|
3050
|
+
'privy-idempotency-key'?: string;
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3054
|
+
* representing the deadline by which the request must be processed.
|
|
3055
|
+
*/
|
|
3056
|
+
'privy-request-expiry'?: string;
|
|
3057
|
+
}
|
|
3058
|
+
|
|
3059
|
+
export type WalletRpcParams =
|
|
3060
|
+
| WalletRpcParams.EthereumSignTransactionRpcInput
|
|
3061
|
+
| WalletRpcParams.EthereumSendTransactionRpcInput
|
|
3062
|
+
| WalletRpcParams.EthereumPersonalSignRpcInput
|
|
3063
|
+
| WalletRpcParams.EthereumSignTypedDataRpcInput
|
|
3064
|
+
| WalletRpcParams.EthereumSecp256k1SignRpcInput
|
|
3065
|
+
| WalletRpcParams.EthereumSign7702AuthorizationRpcInput
|
|
3066
|
+
| WalletRpcParams.EthereumSignUserOperationRpcInput
|
|
3067
|
+
| WalletRpcParams.EthereumSendCallsRpcInput
|
|
3068
|
+
| WalletRpcParams.SolanaSignTransactionRpcInput
|
|
3069
|
+
| WalletRpcParams.SolanaSignAndSendTransactionRpcInput
|
|
3070
|
+
| WalletRpcParams.SolanaSignMessageRpcInput
|
|
3071
|
+
| WalletRpcParams.SparkTransferRpcInput
|
|
3072
|
+
| WalletRpcParams.SparkGetBalanceRpcInput
|
|
3073
|
+
| WalletRpcParams.SparkTransferTokensRpcInput
|
|
3074
|
+
| WalletRpcParams.SparkGetStaticDepositAddressRpcInput
|
|
3075
|
+
| WalletRpcParams.SparkGetClaimStaticDepositQuoteRpcInput
|
|
3076
|
+
| WalletRpcParams.SparkClaimStaticDepositRpcInput
|
|
3077
|
+
| WalletRpcParams.SparkCreateLightningInvoiceRpcInput
|
|
3078
|
+
| WalletRpcParams.SparkPayLightningInvoiceRpcInput
|
|
3079
|
+
| WalletRpcParams.SparkSignMessageWithIdentityKeyRpcInput
|
|
3080
|
+
| WalletRpcParams.ExportPrivateKeyRpcInput
|
|
3081
|
+
| WalletRpcParams.ExportSeedPhraseRpcInput;
|
|
3082
|
+
|
|
3083
|
+
export declare namespace WalletRpcParams {
|
|
3084
|
+
export interface EthereumSignTransactionRpcInput {
|
|
3085
|
+
/**
|
|
3086
|
+
* Body param
|
|
3087
|
+
*/
|
|
3088
|
+
method: 'eth_signTransaction';
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* Body param: Parameters for the EVM `eth_signTransaction` RPC.
|
|
3092
|
+
*/
|
|
3093
|
+
params: EthereumSignTransactionRpcInputParams;
|
|
3094
|
+
|
|
3095
|
+
/**
|
|
3096
|
+
* Body param
|
|
3097
|
+
*/
|
|
3098
|
+
address?: string;
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* Body param
|
|
3102
|
+
*/
|
|
3103
|
+
chain_type?: 'ethereum';
|
|
3104
|
+
|
|
3105
|
+
/**
|
|
3106
|
+
* Body param
|
|
3107
|
+
*/
|
|
3108
|
+
wallet_id?: string;
|
|
3109
|
+
|
|
3110
|
+
/**
|
|
3111
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3112
|
+
* required, they should be comma separated.
|
|
3113
|
+
*/
|
|
3114
|
+
'privy-authorization-signature'?: string;
|
|
3115
|
+
|
|
3116
|
+
/**
|
|
3117
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3118
|
+
* a 24-hour window.
|
|
3119
|
+
*/
|
|
3120
|
+
'privy-idempotency-key'?: string;
|
|
3121
|
+
|
|
3122
|
+
/**
|
|
3123
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3124
|
+
* representing the deadline by which the request must be processed.
|
|
3125
|
+
*/
|
|
3126
|
+
'privy-request-expiry'?: string;
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
export interface EthereumSendTransactionRpcInput {
|
|
3130
|
+
/**
|
|
3131
|
+
* Body param: A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
3132
|
+
*/
|
|
3133
|
+
caip2: AppsAPI.Caip2;
|
|
3134
|
+
|
|
3135
|
+
/**
|
|
3136
|
+
* Body param
|
|
3137
|
+
*/
|
|
3138
|
+
method: 'eth_sendTransaction';
|
|
3139
|
+
|
|
3140
|
+
/**
|
|
3141
|
+
* Body param: Parameters for the EVM `eth_sendTransaction` RPC.
|
|
3142
|
+
*/
|
|
3143
|
+
params: EthereumSendTransactionRpcInputParams;
|
|
3144
|
+
|
|
3145
|
+
/**
|
|
3146
|
+
* Body param
|
|
3147
|
+
*/
|
|
3148
|
+
address?: string;
|
|
3149
|
+
|
|
3150
|
+
/**
|
|
3151
|
+
* Body param
|
|
3152
|
+
*/
|
|
3153
|
+
chain_type?: 'ethereum';
|
|
3154
|
+
|
|
3155
|
+
/**
|
|
3156
|
+
* Body param
|
|
3157
|
+
*/
|
|
3158
|
+
reference_id?: string;
|
|
3159
|
+
|
|
3160
|
+
/**
|
|
3161
|
+
* Body param
|
|
3162
|
+
*/
|
|
3163
|
+
sponsor?: boolean;
|
|
3164
|
+
|
|
3165
|
+
/**
|
|
3166
|
+
* Body param
|
|
3167
|
+
*/
|
|
3168
|
+
wallet_id?: string;
|
|
3169
|
+
|
|
3170
|
+
/**
|
|
3171
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3172
|
+
* required, they should be comma separated.
|
|
3173
|
+
*/
|
|
3174
|
+
'privy-authorization-signature'?: string;
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3178
|
+
* a 24-hour window.
|
|
3179
|
+
*/
|
|
3180
|
+
'privy-idempotency-key'?: string;
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3184
|
+
* representing the deadline by which the request must be processed.
|
|
3185
|
+
*/
|
|
3186
|
+
'privy-request-expiry'?: string;
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
export interface EthereumPersonalSignRpcInput {
|
|
3190
|
+
/**
|
|
3191
|
+
* Body param
|
|
3192
|
+
*/
|
|
3193
|
+
method: 'personal_sign';
|
|
3194
|
+
|
|
3195
|
+
/**
|
|
3196
|
+
* Body param: Parameters for the EVM `personal_sign` RPC.
|
|
3197
|
+
*/
|
|
3198
|
+
params: EthereumPersonalSignRpcInputParams;
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* Body param
|
|
3202
|
+
*/
|
|
3203
|
+
address?: string;
|
|
3204
|
+
|
|
3205
|
+
/**
|
|
3206
|
+
* Body param
|
|
3207
|
+
*/
|
|
3208
|
+
chain_type?: 'ethereum';
|
|
3209
|
+
|
|
3210
|
+
/**
|
|
3211
|
+
* Body param
|
|
3212
|
+
*/
|
|
3213
|
+
wallet_id?: string;
|
|
3214
|
+
|
|
3215
|
+
/**
|
|
3216
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3217
|
+
* required, they should be comma separated.
|
|
3218
|
+
*/
|
|
3219
|
+
'privy-authorization-signature'?: string;
|
|
3220
|
+
|
|
3221
|
+
/**
|
|
3222
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3223
|
+
* a 24-hour window.
|
|
3224
|
+
*/
|
|
3225
|
+
'privy-idempotency-key'?: string;
|
|
3226
|
+
|
|
3227
|
+
/**
|
|
3228
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3229
|
+
* representing the deadline by which the request must be processed.
|
|
3230
|
+
*/
|
|
3231
|
+
'privy-request-expiry'?: string;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
export interface EthereumSignTypedDataRpcInput {
|
|
3235
|
+
/**
|
|
3236
|
+
* Body param
|
|
3237
|
+
*/
|
|
3238
|
+
method: 'eth_signTypedData_v4';
|
|
3239
|
+
|
|
1574
3240
|
/**
|
|
1575
|
-
*
|
|
3241
|
+
* Body param: Parameters for the EVM `eth_signTypedData_v4` RPC.
|
|
1576
3242
|
*/
|
|
1577
|
-
|
|
3243
|
+
params: EthereumSignTypedDataRpcInputParams;
|
|
1578
3244
|
|
|
1579
3245
|
/**
|
|
1580
|
-
*
|
|
1581
|
-
* `solana`.
|
|
3246
|
+
* Body param
|
|
1582
3247
|
*/
|
|
1583
|
-
|
|
3248
|
+
address?: string;
|
|
1584
3249
|
|
|
1585
3250
|
/**
|
|
1586
|
-
*
|
|
3251
|
+
* Body param
|
|
1587
3252
|
*/
|
|
1588
|
-
|
|
3253
|
+
chain_type?: 'ethereum';
|
|
1589
3254
|
|
|
1590
3255
|
/**
|
|
1591
|
-
*
|
|
3256
|
+
* Body param
|
|
1592
3257
|
*/
|
|
1593
|
-
|
|
3258
|
+
wallet_id?: string;
|
|
1594
3259
|
|
|
1595
3260
|
/**
|
|
1596
|
-
*
|
|
3261
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3262
|
+
* required, they should be comma separated.
|
|
1597
3263
|
*/
|
|
1598
|
-
|
|
1599
|
-
}
|
|
3264
|
+
'privy-authorization-signature'?: string;
|
|
1600
3265
|
|
|
1601
|
-
export interface PrivateKeyInitInput {
|
|
1602
3266
|
/**
|
|
1603
|
-
*
|
|
3267
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3268
|
+
* a 24-hour window.
|
|
1604
3269
|
*/
|
|
1605
|
-
|
|
3270
|
+
'privy-idempotency-key'?: string;
|
|
1606
3271
|
|
|
1607
3272
|
/**
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
3273
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3274
|
+
* representing the deadline by which the request must be processed.
|
|
1610
3275
|
*/
|
|
1611
|
-
|
|
3276
|
+
'privy-request-expiry'?: string;
|
|
3277
|
+
}
|
|
1612
3278
|
|
|
3279
|
+
export interface EthereumSecp256k1SignRpcInput {
|
|
1613
3280
|
/**
|
|
1614
|
-
*
|
|
3281
|
+
* Body param
|
|
1615
3282
|
*/
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
entropy_type: 'private-key';
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
3283
|
+
method: 'secp256k1_sign';
|
|
1621
3284
|
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
params: WalletRawSignParams.Hash | WalletRawSignParams.Bytes;
|
|
3285
|
+
/**
|
|
3286
|
+
* Body param: Parameters for the EVM `secp256k1_sign` RPC.
|
|
3287
|
+
*/
|
|
3288
|
+
params: EthereumSecp256k1SignRpcInputParams;
|
|
1627
3289
|
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
'privy-authorization-signature'?: string;
|
|
3290
|
+
/**
|
|
3291
|
+
* Body param
|
|
3292
|
+
*/
|
|
3293
|
+
address?: string;
|
|
1633
3294
|
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
'privy-idempotency-key'?: string;
|
|
1639
|
-
}
|
|
3295
|
+
/**
|
|
3296
|
+
* Body param
|
|
3297
|
+
*/
|
|
3298
|
+
chain_type?: 'ethereum';
|
|
1640
3299
|
|
|
1641
|
-
export namespace WalletRawSignParams {
|
|
1642
|
-
/**
|
|
1643
|
-
* Sign a pre-computed hash
|
|
1644
|
-
*/
|
|
1645
|
-
export interface Hash {
|
|
1646
3300
|
/**
|
|
1647
|
-
*
|
|
3301
|
+
* Body param
|
|
1648
3302
|
*/
|
|
1649
|
-
|
|
1650
|
-
}
|
|
3303
|
+
wallet_id?: string;
|
|
1651
3304
|
|
|
1652
|
-
/**
|
|
1653
|
-
* Hash and sign bytes using the specified encoding and hash function.
|
|
1654
|
-
*/
|
|
1655
|
-
export interface Bytes {
|
|
1656
3305
|
/**
|
|
1657
|
-
*
|
|
3306
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3307
|
+
* required, they should be comma separated.
|
|
1658
3308
|
*/
|
|
1659
|
-
|
|
3309
|
+
'privy-authorization-signature'?: string;
|
|
1660
3310
|
|
|
1661
3311
|
/**
|
|
1662
|
-
*
|
|
3312
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3313
|
+
* a 24-hour window.
|
|
1663
3314
|
*/
|
|
1664
|
-
|
|
3315
|
+
'privy-idempotency-key'?: string;
|
|
1665
3316
|
|
|
1666
3317
|
/**
|
|
1667
|
-
*
|
|
3318
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3319
|
+
* representing the deadline by which the request must be processed.
|
|
1668
3320
|
*/
|
|
1669
|
-
|
|
3321
|
+
'privy-request-expiry'?: string;
|
|
1670
3322
|
}
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
export type WalletRpcParams =
|
|
1674
|
-
| WalletRpcParams.EthereumPersonalSignRpcInput
|
|
1675
|
-
| WalletRpcParams.EthereumSignTypedDataRpcInput
|
|
1676
|
-
| WalletRpcParams.EthereumSignTransactionRpcInput
|
|
1677
|
-
| WalletRpcParams.EthereumSignUserOperationRpcInput
|
|
1678
|
-
| WalletRpcParams.EthereumSendTransactionRpcInput
|
|
1679
|
-
| WalletRpcParams.EthereumSign7702AuthorizationRpcInput
|
|
1680
|
-
| WalletRpcParams.EthereumSecp256k1SignRpcInput
|
|
1681
|
-
| WalletRpcParams.SolanaSignMessageRpcInput
|
|
1682
|
-
| WalletRpcParams.SolanaSignTransactionRpcInput
|
|
1683
|
-
| WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
|
|
1684
3323
|
|
|
1685
|
-
export
|
|
1686
|
-
export interface EthereumPersonalSignRpcInput {
|
|
3324
|
+
export interface EthereumSign7702AuthorizationRpcInput {
|
|
1687
3325
|
/**
|
|
1688
3326
|
* Body param
|
|
1689
3327
|
*/
|
|
1690
|
-
method: '
|
|
3328
|
+
method: 'eth_sign7702Authorization';
|
|
1691
3329
|
|
|
1692
3330
|
/**
|
|
1693
|
-
* Body param
|
|
3331
|
+
* Body param: Parameters for the EVM `eth_sign7702Authorization` RPC.
|
|
1694
3332
|
*/
|
|
1695
|
-
params:
|
|
3333
|
+
params: EthereumSign7702AuthorizationRpcInputParams;
|
|
1696
3334
|
|
|
1697
3335
|
/**
|
|
1698
3336
|
* Body param
|
|
@@ -1704,6 +3342,11 @@ export declare namespace WalletRpcParams {
|
|
|
1704
3342
|
*/
|
|
1705
3343
|
chain_type?: 'ethereum';
|
|
1706
3344
|
|
|
3345
|
+
/**
|
|
3346
|
+
* Body param
|
|
3347
|
+
*/
|
|
3348
|
+
wallet_id?: string;
|
|
3349
|
+
|
|
1707
3350
|
/**
|
|
1708
3351
|
* Header param: Request authorization signature. If multiple signatures are
|
|
1709
3352
|
* required, they should be comma separated.
|
|
@@ -1715,26 +3358,24 @@ export declare namespace WalletRpcParams {
|
|
|
1715
3358
|
* a 24-hour window.
|
|
1716
3359
|
*/
|
|
1717
3360
|
'privy-idempotency-key'?: string;
|
|
1718
|
-
}
|
|
1719
3361
|
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
}
|
|
3362
|
+
/**
|
|
3363
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3364
|
+
* representing the deadline by which the request must be processed.
|
|
3365
|
+
*/
|
|
3366
|
+
'privy-request-expiry'?: string;
|
|
1726
3367
|
}
|
|
1727
3368
|
|
|
1728
|
-
export interface
|
|
3369
|
+
export interface EthereumSignUserOperationRpcInput {
|
|
1729
3370
|
/**
|
|
1730
3371
|
* Body param
|
|
1731
3372
|
*/
|
|
1732
|
-
method: '
|
|
3373
|
+
method: 'eth_signUserOperation';
|
|
1733
3374
|
|
|
1734
3375
|
/**
|
|
1735
|
-
* Body param
|
|
3376
|
+
* Body param: Parameters for the EVM `eth_signUserOperation` RPC.
|
|
1736
3377
|
*/
|
|
1737
|
-
params:
|
|
3378
|
+
params: EthereumSignUserOperationRpcInputParams;
|
|
1738
3379
|
|
|
1739
3380
|
/**
|
|
1740
3381
|
* Body param
|
|
@@ -1746,6 +3387,11 @@ export declare namespace WalletRpcParams {
|
|
|
1746
3387
|
*/
|
|
1747
3388
|
chain_type?: 'ethereum';
|
|
1748
3389
|
|
|
3390
|
+
/**
|
|
3391
|
+
* Body param
|
|
3392
|
+
*/
|
|
3393
|
+
wallet_id?: string;
|
|
3394
|
+
|
|
1749
3395
|
/**
|
|
1750
3396
|
* Header param: Request authorization signature. If multiple signatures are
|
|
1751
3397
|
* required, they should be comma separated.
|
|
@@ -1757,44 +3403,79 @@ export declare namespace WalletRpcParams {
|
|
|
1757
3403
|
* a 24-hour window.
|
|
1758
3404
|
*/
|
|
1759
3405
|
'privy-idempotency-key'?: string;
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3409
|
+
* representing the deadline by which the request must be processed.
|
|
3410
|
+
*/
|
|
3411
|
+
'privy-request-expiry'?: string;
|
|
1760
3412
|
}
|
|
1761
3413
|
|
|
1762
|
-
export
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
3414
|
+
export interface EthereumSendCallsRpcInput {
|
|
3415
|
+
/**
|
|
3416
|
+
* Body param: A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
3417
|
+
*/
|
|
3418
|
+
caip2: AppsAPI.Caip2;
|
|
3419
|
+
|
|
3420
|
+
/**
|
|
3421
|
+
* Body param
|
|
3422
|
+
*/
|
|
3423
|
+
method: 'wallet_sendCalls';
|
|
3424
|
+
|
|
3425
|
+
/**
|
|
3426
|
+
* Body param: Parameters for the `wallet_sendCalls` RPC.
|
|
3427
|
+
*/
|
|
3428
|
+
params: EthereumSendCallsRpcInputParams;
|
|
3429
|
+
|
|
3430
|
+
/**
|
|
3431
|
+
* Body param
|
|
3432
|
+
*/
|
|
3433
|
+
address?: string;
|
|
1766
3434
|
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
3435
|
+
/**
|
|
3436
|
+
* Body param
|
|
3437
|
+
*/
|
|
3438
|
+
chain_type?: 'ethereum';
|
|
1770
3439
|
|
|
1771
|
-
|
|
3440
|
+
/**
|
|
3441
|
+
* Body param
|
|
3442
|
+
*/
|
|
3443
|
+
sponsor?: boolean;
|
|
1772
3444
|
|
|
1773
|
-
|
|
3445
|
+
/**
|
|
3446
|
+
* Body param
|
|
3447
|
+
*/
|
|
3448
|
+
wallet_id?: string;
|
|
1774
3449
|
|
|
1775
|
-
|
|
1776
|
-
|
|
3450
|
+
/**
|
|
3451
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3452
|
+
* required, they should be comma separated.
|
|
3453
|
+
*/
|
|
3454
|
+
'privy-authorization-signature'?: string;
|
|
1777
3455
|
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
3456
|
+
/**
|
|
3457
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3458
|
+
* a 24-hour window.
|
|
3459
|
+
*/
|
|
3460
|
+
'privy-idempotency-key'?: string;
|
|
1781
3461
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
3462
|
+
/**
|
|
3463
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3464
|
+
* representing the deadline by which the request must be processed.
|
|
3465
|
+
*/
|
|
3466
|
+
'privy-request-expiry'?: string;
|
|
1786
3467
|
}
|
|
1787
3468
|
|
|
1788
|
-
export interface
|
|
3469
|
+
export interface SolanaSignTransactionRpcInput {
|
|
1789
3470
|
/**
|
|
1790
3471
|
* Body param
|
|
1791
3472
|
*/
|
|
1792
|
-
method: '
|
|
3473
|
+
method: 'signTransaction';
|
|
1793
3474
|
|
|
1794
3475
|
/**
|
|
1795
|
-
* Body param
|
|
3476
|
+
* Body param: Parameters for the SVM `signTransaction` RPC.
|
|
1796
3477
|
*/
|
|
1797
|
-
params:
|
|
3478
|
+
params: SolanaSignTransactionRpcInputParams;
|
|
1798
3479
|
|
|
1799
3480
|
/**
|
|
1800
3481
|
* Body param
|
|
@@ -1804,7 +3485,12 @@ export declare namespace WalletRpcParams {
|
|
|
1804
3485
|
/**
|
|
1805
3486
|
* Body param
|
|
1806
3487
|
*/
|
|
1807
|
-
chain_type?: '
|
|
3488
|
+
chain_type?: 'solana';
|
|
3489
|
+
|
|
3490
|
+
/**
|
|
3491
|
+
* Body param
|
|
3492
|
+
*/
|
|
3493
|
+
wallet_id?: string;
|
|
1808
3494
|
|
|
1809
3495
|
/**
|
|
1810
3496
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -1817,78 +3503,164 @@ export declare namespace WalletRpcParams {
|
|
|
1817
3503
|
* a 24-hour window.
|
|
1818
3504
|
*/
|
|
1819
3505
|
'privy-idempotency-key'?: string;
|
|
3506
|
+
|
|
3507
|
+
/**
|
|
3508
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3509
|
+
* representing the deadline by which the request must be processed.
|
|
3510
|
+
*/
|
|
3511
|
+
'privy-request-expiry'?: string;
|
|
1820
3512
|
}
|
|
1821
3513
|
|
|
1822
|
-
export
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
3514
|
+
export interface SolanaSignAndSendTransactionRpcInput {
|
|
3515
|
+
/**
|
|
3516
|
+
* Body param: A valid CAIP-2 chain ID (e.g. 'eip155:1').
|
|
3517
|
+
*/
|
|
3518
|
+
caip2: AppsAPI.Caip2;
|
|
1826
3519
|
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
3520
|
+
/**
|
|
3521
|
+
* Body param
|
|
3522
|
+
*/
|
|
3523
|
+
method: 'signAndSendTransaction';
|
|
1830
3524
|
|
|
1831
|
-
|
|
3525
|
+
/**
|
|
3526
|
+
* Body param: Parameters for the SVM `signAndSendTransaction` RPC.
|
|
3527
|
+
*/
|
|
3528
|
+
params: SolanaSignAndSendTransactionRpcInputParams;
|
|
1832
3529
|
|
|
1833
|
-
|
|
3530
|
+
/**
|
|
3531
|
+
* Body param
|
|
3532
|
+
*/
|
|
3533
|
+
address?: string;
|
|
1834
3534
|
|
|
1835
|
-
|
|
3535
|
+
/**
|
|
3536
|
+
* Body param
|
|
3537
|
+
*/
|
|
3538
|
+
chain_type?: 'solana';
|
|
1836
3539
|
|
|
1837
|
-
|
|
3540
|
+
/**
|
|
3541
|
+
* Body param
|
|
3542
|
+
*/
|
|
3543
|
+
reference_id?: string;
|
|
1838
3544
|
|
|
1839
|
-
|
|
3545
|
+
/**
|
|
3546
|
+
* Body param
|
|
3547
|
+
*/
|
|
3548
|
+
sponsor?: boolean;
|
|
1840
3549
|
|
|
1841
|
-
|
|
3550
|
+
/**
|
|
3551
|
+
* Body param
|
|
3552
|
+
*/
|
|
3553
|
+
wallet_id?: string;
|
|
1842
3554
|
|
|
1843
|
-
|
|
3555
|
+
/**
|
|
3556
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3557
|
+
* required, they should be comma separated.
|
|
3558
|
+
*/
|
|
3559
|
+
'privy-authorization-signature'?: string;
|
|
1844
3560
|
|
|
1845
|
-
|
|
3561
|
+
/**
|
|
3562
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3563
|
+
* a 24-hour window.
|
|
3564
|
+
*/
|
|
3565
|
+
'privy-idempotency-key'?: string;
|
|
1846
3566
|
|
|
1847
|
-
|
|
3567
|
+
/**
|
|
3568
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3569
|
+
* representing the deadline by which the request must be processed.
|
|
3570
|
+
*/
|
|
3571
|
+
'privy-request-expiry'?: string;
|
|
3572
|
+
}
|
|
1848
3573
|
|
|
1849
|
-
|
|
3574
|
+
export interface SolanaSignMessageRpcInput {
|
|
3575
|
+
/**
|
|
3576
|
+
* Body param
|
|
3577
|
+
*/
|
|
3578
|
+
method: 'signMessage';
|
|
1850
3579
|
|
|
1851
|
-
|
|
1852
|
-
|
|
3580
|
+
/**
|
|
3581
|
+
* Body param: Parameters for the SVM `signMessage` RPC.
|
|
3582
|
+
*/
|
|
3583
|
+
params: SolanaSignMessageRpcInputParams;
|
|
1853
3584
|
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
3585
|
+
/**
|
|
3586
|
+
* Body param
|
|
3587
|
+
*/
|
|
3588
|
+
address?: string;
|
|
1857
3589
|
|
|
1858
|
-
|
|
3590
|
+
/**
|
|
3591
|
+
* Body param
|
|
3592
|
+
*/
|
|
3593
|
+
chain_type?: 'solana';
|
|
1859
3594
|
|
|
1860
|
-
|
|
3595
|
+
/**
|
|
3596
|
+
* Body param
|
|
3597
|
+
*/
|
|
3598
|
+
wallet_id?: string;
|
|
1861
3599
|
|
|
1862
|
-
|
|
3600
|
+
/**
|
|
3601
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3602
|
+
* required, they should be comma separated.
|
|
3603
|
+
*/
|
|
3604
|
+
'privy-authorization-signature'?: string;
|
|
1863
3605
|
|
|
1864
|
-
|
|
3606
|
+
/**
|
|
3607
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3608
|
+
* a 24-hour window.
|
|
3609
|
+
*/
|
|
3610
|
+
'privy-idempotency-key'?: string;
|
|
1865
3611
|
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
3612
|
+
/**
|
|
3613
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3614
|
+
* representing the deadline by which the request must be processed.
|
|
3615
|
+
*/
|
|
3616
|
+
'privy-request-expiry'?: string;
|
|
1870
3617
|
}
|
|
1871
3618
|
|
|
1872
|
-
export interface
|
|
3619
|
+
export interface SparkTransferRpcInput {
|
|
1873
3620
|
/**
|
|
1874
3621
|
* Body param
|
|
1875
3622
|
*/
|
|
1876
|
-
method: '
|
|
3623
|
+
method: 'transfer';
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* Body param: Parameters for the Spark `transfer` RPC.
|
|
3627
|
+
*/
|
|
3628
|
+
params: SparkTransferRpcInputParams;
|
|
3629
|
+
|
|
3630
|
+
/**
|
|
3631
|
+
* Body param: The Spark network.
|
|
3632
|
+
*/
|
|
3633
|
+
network?: SparkNetwork;
|
|
3634
|
+
|
|
3635
|
+
/**
|
|
3636
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3637
|
+
* required, they should be comma separated.
|
|
3638
|
+
*/
|
|
3639
|
+
'privy-authorization-signature'?: string;
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3643
|
+
* a 24-hour window.
|
|
3644
|
+
*/
|
|
3645
|
+
'privy-idempotency-key'?: string;
|
|
1877
3646
|
|
|
1878
3647
|
/**
|
|
1879
|
-
*
|
|
3648
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3649
|
+
* representing the deadline by which the request must be processed.
|
|
1880
3650
|
*/
|
|
1881
|
-
|
|
3651
|
+
'privy-request-expiry'?: string;
|
|
3652
|
+
}
|
|
1882
3653
|
|
|
3654
|
+
export interface SparkGetBalanceRpcInput {
|
|
1883
3655
|
/**
|
|
1884
3656
|
* Body param
|
|
1885
3657
|
*/
|
|
1886
|
-
|
|
3658
|
+
method: 'getBalance';
|
|
1887
3659
|
|
|
1888
3660
|
/**
|
|
1889
|
-
* Body param
|
|
3661
|
+
* Body param: The Spark network.
|
|
1890
3662
|
*/
|
|
1891
|
-
|
|
3663
|
+
network?: SparkNetwork;
|
|
1892
3664
|
|
|
1893
3665
|
/**
|
|
1894
3666
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -1901,76 +3673,59 @@ export declare namespace WalletRpcParams {
|
|
|
1901
3673
|
* a 24-hour window.
|
|
1902
3674
|
*/
|
|
1903
3675
|
'privy-idempotency-key'?: string;
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
export namespace EthereumSignUserOperationRpcInput {
|
|
1907
|
-
export interface Params {
|
|
1908
|
-
chain_id: string | number;
|
|
1909
|
-
|
|
1910
|
-
contract: string;
|
|
1911
|
-
|
|
1912
|
-
user_operation: Params.UserOperation;
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
export namespace Params {
|
|
1916
|
-
export interface UserOperation {
|
|
1917
|
-
call_data: string;
|
|
1918
|
-
|
|
1919
|
-
call_gas_limit: string;
|
|
1920
|
-
|
|
1921
|
-
max_fee_per_gas: string;
|
|
1922
|
-
|
|
1923
|
-
max_priority_fee_per_gas: string;
|
|
1924
|
-
|
|
1925
|
-
nonce: string;
|
|
1926
3676
|
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
paymaster_verification_gas_limit: string;
|
|
1934
|
-
|
|
1935
|
-
pre_verification_gas: string;
|
|
1936
|
-
|
|
1937
|
-
sender: string;
|
|
1938
|
-
|
|
1939
|
-
verification_gas_limit: string;
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
3677
|
+
/**
|
|
3678
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3679
|
+
* representing the deadline by which the request must be processed.
|
|
3680
|
+
*/
|
|
3681
|
+
'privy-request-expiry'?: string;
|
|
1942
3682
|
}
|
|
1943
3683
|
|
|
1944
|
-
export interface
|
|
3684
|
+
export interface SparkTransferTokensRpcInput {
|
|
1945
3685
|
/**
|
|
1946
3686
|
* Body param
|
|
1947
3687
|
*/
|
|
1948
|
-
|
|
3688
|
+
method: 'transferTokens';
|
|
1949
3689
|
|
|
1950
3690
|
/**
|
|
1951
|
-
* Body param
|
|
3691
|
+
* Body param: Parameters for the Spark `transferTokens` RPC.
|
|
1952
3692
|
*/
|
|
1953
|
-
|
|
3693
|
+
params: SparkTransferTokensRpcInputParams;
|
|
1954
3694
|
|
|
1955
3695
|
/**
|
|
1956
|
-
* Body param
|
|
3696
|
+
* Body param: The Spark network.
|
|
1957
3697
|
*/
|
|
1958
|
-
|
|
3698
|
+
network?: SparkNetwork;
|
|
1959
3699
|
|
|
1960
3700
|
/**
|
|
1961
|
-
*
|
|
3701
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3702
|
+
* required, they should be comma separated.
|
|
1962
3703
|
*/
|
|
1963
|
-
|
|
3704
|
+
'privy-authorization-signature'?: string;
|
|
1964
3705
|
|
|
1965
3706
|
/**
|
|
1966
|
-
*
|
|
3707
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3708
|
+
* a 24-hour window.
|
|
1967
3709
|
*/
|
|
1968
|
-
|
|
3710
|
+
'privy-idempotency-key'?: string;
|
|
3711
|
+
|
|
3712
|
+
/**
|
|
3713
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3714
|
+
* representing the deadline by which the request must be processed.
|
|
3715
|
+
*/
|
|
3716
|
+
'privy-request-expiry'?: string;
|
|
3717
|
+
}
|
|
1969
3718
|
|
|
3719
|
+
export interface SparkGetStaticDepositAddressRpcInput {
|
|
1970
3720
|
/**
|
|
1971
3721
|
* Body param
|
|
1972
3722
|
*/
|
|
1973
|
-
|
|
3723
|
+
method: 'getStaticDepositAddress';
|
|
3724
|
+
|
|
3725
|
+
/**
|
|
3726
|
+
* Body param: The Spark network.
|
|
3727
|
+
*/
|
|
3728
|
+
network?: SparkNetwork;
|
|
1974
3729
|
|
|
1975
3730
|
/**
|
|
1976
3731
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -1983,78 +3738,64 @@ export declare namespace WalletRpcParams {
|
|
|
1983
3738
|
* a 24-hour window.
|
|
1984
3739
|
*/
|
|
1985
3740
|
'privy-idempotency-key'?: string;
|
|
1986
|
-
}
|
|
1987
3741
|
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
export interface Transaction {
|
|
1995
|
-
authorization_list?: Array<Transaction.AuthorizationList>;
|
|
1996
|
-
|
|
1997
|
-
chain_id?: string | number;
|
|
1998
|
-
|
|
1999
|
-
data?: string;
|
|
2000
|
-
|
|
2001
|
-
from?: string;
|
|
2002
|
-
|
|
2003
|
-
gas_limit?: string | number;
|
|
2004
|
-
|
|
2005
|
-
gas_price?: string | number;
|
|
2006
|
-
|
|
2007
|
-
max_fee_per_gas?: string | number;
|
|
2008
|
-
|
|
2009
|
-
max_priority_fee_per_gas?: string | number;
|
|
2010
|
-
|
|
2011
|
-
nonce?: string | number;
|
|
2012
|
-
|
|
2013
|
-
to?: string;
|
|
2014
|
-
|
|
2015
|
-
type?: 0 | 1 | 2 | 4;
|
|
2016
|
-
|
|
2017
|
-
value?: string | number;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
export namespace Transaction {
|
|
2021
|
-
export interface AuthorizationList {
|
|
2022
|
-
chain_id: string | number;
|
|
3742
|
+
/**
|
|
3743
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3744
|
+
* representing the deadline by which the request must be processed.
|
|
3745
|
+
*/
|
|
3746
|
+
'privy-request-expiry'?: string;
|
|
3747
|
+
}
|
|
2023
3748
|
|
|
2024
|
-
|
|
3749
|
+
export interface SparkGetClaimStaticDepositQuoteRpcInput {
|
|
3750
|
+
/**
|
|
3751
|
+
* Body param
|
|
3752
|
+
*/
|
|
3753
|
+
method: 'getClaimStaticDepositQuote';
|
|
2025
3754
|
|
|
2026
|
-
|
|
3755
|
+
/**
|
|
3756
|
+
* Body param: Parameters for the Spark `getClaimStaticDepositQuote` RPC.
|
|
3757
|
+
*/
|
|
3758
|
+
params: SparkGetClaimStaticDepositQuoteRpcInputParams;
|
|
2027
3759
|
|
|
2028
|
-
|
|
3760
|
+
/**
|
|
3761
|
+
* Body param: The Spark network.
|
|
3762
|
+
*/
|
|
3763
|
+
network?: SparkNetwork;
|
|
2029
3764
|
|
|
2030
|
-
|
|
3765
|
+
/**
|
|
3766
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3767
|
+
* required, they should be comma separated.
|
|
3768
|
+
*/
|
|
3769
|
+
'privy-authorization-signature'?: string;
|
|
2031
3770
|
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
3771
|
+
/**
|
|
3772
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3773
|
+
* a 24-hour window.
|
|
3774
|
+
*/
|
|
3775
|
+
'privy-idempotency-key'?: string;
|
|
2037
3776
|
|
|
2038
|
-
export interface EthereumSign7702AuthorizationRpcInput {
|
|
2039
3777
|
/**
|
|
2040
|
-
*
|
|
3778
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3779
|
+
* representing the deadline by which the request must be processed.
|
|
2041
3780
|
*/
|
|
2042
|
-
|
|
3781
|
+
'privy-request-expiry'?: string;
|
|
3782
|
+
}
|
|
2043
3783
|
|
|
3784
|
+
export interface SparkClaimStaticDepositRpcInput {
|
|
2044
3785
|
/**
|
|
2045
3786
|
* Body param
|
|
2046
3787
|
*/
|
|
2047
|
-
|
|
3788
|
+
method: 'claimStaticDeposit';
|
|
2048
3789
|
|
|
2049
3790
|
/**
|
|
2050
|
-
* Body param
|
|
3791
|
+
* Body param: Parameters for the Spark `claimStaticDeposit` RPC.
|
|
2051
3792
|
*/
|
|
2052
|
-
|
|
3793
|
+
params: SparkClaimStaticDepositRpcInputParams;
|
|
2053
3794
|
|
|
2054
3795
|
/**
|
|
2055
|
-
* Body param
|
|
3796
|
+
* Body param: The Spark network.
|
|
2056
3797
|
*/
|
|
2057
|
-
|
|
3798
|
+
network?: SparkNetwork;
|
|
2058
3799
|
|
|
2059
3800
|
/**
|
|
2060
3801
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -2067,38 +3808,29 @@ export declare namespace WalletRpcParams {
|
|
|
2067
3808
|
* a 24-hour window.
|
|
2068
3809
|
*/
|
|
2069
3810
|
'privy-idempotency-key'?: string;
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
export namespace EthereumSign7702AuthorizationRpcInput {
|
|
2073
|
-
export interface Params {
|
|
2074
|
-
chain_id: string | number;
|
|
2075
|
-
|
|
2076
|
-
contract: string;
|
|
2077
|
-
|
|
2078
|
-
nonce?: string | number;
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
3811
|
|
|
2082
|
-
export interface EthereumSecp256k1SignRpcInput {
|
|
2083
3812
|
/**
|
|
2084
|
-
*
|
|
3813
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3814
|
+
* representing the deadline by which the request must be processed.
|
|
2085
3815
|
*/
|
|
2086
|
-
|
|
3816
|
+
'privy-request-expiry'?: string;
|
|
3817
|
+
}
|
|
2087
3818
|
|
|
3819
|
+
export interface SparkCreateLightningInvoiceRpcInput {
|
|
2088
3820
|
/**
|
|
2089
3821
|
* Body param
|
|
2090
3822
|
*/
|
|
2091
|
-
|
|
3823
|
+
method: 'createLightningInvoice';
|
|
2092
3824
|
|
|
2093
3825
|
/**
|
|
2094
|
-
* Body param
|
|
3826
|
+
* Body param: Parameters for the Spark `createLightningInvoice` RPC.
|
|
2095
3827
|
*/
|
|
2096
|
-
|
|
3828
|
+
params: SparkCreateLightningInvoiceRpcInputParams;
|
|
2097
3829
|
|
|
2098
3830
|
/**
|
|
2099
|
-
* Body param
|
|
3831
|
+
* Body param: The Spark network.
|
|
2100
3832
|
*/
|
|
2101
|
-
|
|
3833
|
+
network?: SparkNetwork;
|
|
2102
3834
|
|
|
2103
3835
|
/**
|
|
2104
3836
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -2111,34 +3843,29 @@ export declare namespace WalletRpcParams {
|
|
|
2111
3843
|
* a 24-hour window.
|
|
2112
3844
|
*/
|
|
2113
3845
|
'privy-idempotency-key'?: string;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
export namespace EthereumSecp256k1SignRpcInput {
|
|
2117
|
-
export interface Params {
|
|
2118
|
-
hash: string;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
3846
|
|
|
2122
|
-
export interface SolanaSignMessageRpcInput {
|
|
2123
3847
|
/**
|
|
2124
|
-
*
|
|
3848
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3849
|
+
* representing the deadline by which the request must be processed.
|
|
2125
3850
|
*/
|
|
2126
|
-
|
|
3851
|
+
'privy-request-expiry'?: string;
|
|
3852
|
+
}
|
|
2127
3853
|
|
|
3854
|
+
export interface SparkPayLightningInvoiceRpcInput {
|
|
2128
3855
|
/**
|
|
2129
3856
|
* Body param
|
|
2130
3857
|
*/
|
|
2131
|
-
|
|
3858
|
+
method: 'payLightningInvoice';
|
|
2132
3859
|
|
|
2133
3860
|
/**
|
|
2134
|
-
* Body param
|
|
3861
|
+
* Body param: Parameters for the Spark `payLightningInvoice` RPC.
|
|
2135
3862
|
*/
|
|
2136
|
-
|
|
3863
|
+
params: SparkPayLightningInvoiceRpcInputParams;
|
|
2137
3864
|
|
|
2138
3865
|
/**
|
|
2139
|
-
* Body param
|
|
3866
|
+
* Body param: The Spark network.
|
|
2140
3867
|
*/
|
|
2141
|
-
|
|
3868
|
+
network?: SparkNetwork;
|
|
2142
3869
|
|
|
2143
3870
|
/**
|
|
2144
3871
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -2151,36 +3878,29 @@ export declare namespace WalletRpcParams {
|
|
|
2151
3878
|
* a 24-hour window.
|
|
2152
3879
|
*/
|
|
2153
3880
|
'privy-idempotency-key'?: string;
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
export namespace SolanaSignMessageRpcInput {
|
|
2157
|
-
export interface Params {
|
|
2158
|
-
encoding: 'base64';
|
|
2159
3881
|
|
|
2160
|
-
message: string;
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
export interface SolanaSignTransactionRpcInput {
|
|
2165
3882
|
/**
|
|
2166
|
-
*
|
|
3883
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3884
|
+
* representing the deadline by which the request must be processed.
|
|
2167
3885
|
*/
|
|
2168
|
-
|
|
3886
|
+
'privy-request-expiry'?: string;
|
|
3887
|
+
}
|
|
2169
3888
|
|
|
3889
|
+
export interface SparkSignMessageWithIdentityKeyRpcInput {
|
|
2170
3890
|
/**
|
|
2171
3891
|
* Body param
|
|
2172
3892
|
*/
|
|
2173
|
-
|
|
3893
|
+
method: 'signMessageWithIdentityKey';
|
|
2174
3894
|
|
|
2175
3895
|
/**
|
|
2176
|
-
* Body param
|
|
3896
|
+
* Body param: Parameters for the Spark `signMessageWithIdentityKey` RPC.
|
|
2177
3897
|
*/
|
|
2178
|
-
|
|
3898
|
+
params: SparkSignMessageWithIdentityKeyRpcInputParams;
|
|
2179
3899
|
|
|
2180
3900
|
/**
|
|
2181
|
-
* Body param
|
|
3901
|
+
* Body param: The Spark network.
|
|
2182
3902
|
*/
|
|
2183
|
-
|
|
3903
|
+
network?: SparkNetwork;
|
|
2184
3904
|
|
|
2185
3905
|
/**
|
|
2186
3906
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -2193,46 +3913,66 @@ export declare namespace WalletRpcParams {
|
|
|
2193
3913
|
* a 24-hour window.
|
|
2194
3914
|
*/
|
|
2195
3915
|
'privy-idempotency-key'?: string;
|
|
2196
|
-
}
|
|
2197
3916
|
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
}
|
|
3917
|
+
/**
|
|
3918
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3919
|
+
* representing the deadline by which the request must be processed.
|
|
3920
|
+
*/
|
|
3921
|
+
'privy-request-expiry'?: string;
|
|
2204
3922
|
}
|
|
2205
3923
|
|
|
2206
|
-
export interface
|
|
3924
|
+
export interface ExportPrivateKeyRpcInput {
|
|
2207
3925
|
/**
|
|
2208
3926
|
* Body param
|
|
2209
3927
|
*/
|
|
2210
|
-
|
|
3928
|
+
address: string;
|
|
2211
3929
|
|
|
2212
3930
|
/**
|
|
2213
3931
|
* Body param
|
|
2214
3932
|
*/
|
|
2215
|
-
method: '
|
|
3933
|
+
method: 'exportPrivateKey';
|
|
2216
3934
|
|
|
2217
3935
|
/**
|
|
2218
|
-
* Body param
|
|
3936
|
+
* Body param: Input for exporting a wallet (private key or seed phrase) with HPKE
|
|
3937
|
+
* encryption.
|
|
2219
3938
|
*/
|
|
2220
|
-
params:
|
|
3939
|
+
params: PrivateKeyExportInput;
|
|
2221
3940
|
|
|
2222
3941
|
/**
|
|
2223
|
-
*
|
|
3942
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3943
|
+
* required, they should be comma separated.
|
|
2224
3944
|
*/
|
|
2225
|
-
|
|
3945
|
+
'privy-authorization-signature'?: string;
|
|
3946
|
+
|
|
3947
|
+
/**
|
|
3948
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
3949
|
+
* a 24-hour window.
|
|
3950
|
+
*/
|
|
3951
|
+
'privy-idempotency-key'?: string;
|
|
3952
|
+
|
|
3953
|
+
/**
|
|
3954
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3955
|
+
* representing the deadline by which the request must be processed.
|
|
3956
|
+
*/
|
|
3957
|
+
'privy-request-expiry'?: string;
|
|
3958
|
+
}
|
|
2226
3959
|
|
|
3960
|
+
export interface ExportSeedPhraseRpcInput {
|
|
2227
3961
|
/**
|
|
2228
3962
|
* Body param
|
|
2229
3963
|
*/
|
|
2230
|
-
|
|
3964
|
+
address: string;
|
|
2231
3965
|
|
|
2232
3966
|
/**
|
|
2233
3967
|
* Body param
|
|
2234
3968
|
*/
|
|
2235
|
-
|
|
3969
|
+
method: 'exportSeedPhrase';
|
|
3970
|
+
|
|
3971
|
+
/**
|
|
3972
|
+
* Body param: Input for exporting a wallet (private key or seed phrase) with HPKE
|
|
3973
|
+
* encryption.
|
|
3974
|
+
*/
|
|
3975
|
+
params: SeedPhraseExportInput;
|
|
2236
3976
|
|
|
2237
3977
|
/**
|
|
2238
3978
|
* Header param: Request authorization signature. If multiple signatures are
|
|
@@ -2245,27 +3985,51 @@ export declare namespace WalletRpcParams {
|
|
|
2245
3985
|
* a 24-hour window.
|
|
2246
3986
|
*/
|
|
2247
3987
|
'privy-idempotency-key'?: string;
|
|
2248
|
-
}
|
|
2249
3988
|
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
}
|
|
3989
|
+
/**
|
|
3990
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3991
|
+
* representing the deadline by which the request must be processed.
|
|
3992
|
+
*/
|
|
3993
|
+
'privy-request-expiry'?: string;
|
|
2256
3994
|
}
|
|
2257
3995
|
}
|
|
2258
3996
|
|
|
2259
3997
|
export interface WalletSubmitImportParams {
|
|
2260
3998
|
wallet: WalletSubmitImportParams.HDSubmitInput | WalletSubmitImportParams.PrivateKeySubmitInput;
|
|
2261
3999
|
|
|
2262
|
-
|
|
4000
|
+
/**
|
|
4001
|
+
* Additional signers for the wallet.
|
|
4002
|
+
*/
|
|
4003
|
+
additional_signers?: AdditionalSignerInput;
|
|
2263
4004
|
|
|
2264
|
-
|
|
4005
|
+
/**
|
|
4006
|
+
* A human-readable label for the wallet.
|
|
4007
|
+
*/
|
|
4008
|
+
display_name?: string;
|
|
2265
4009
|
|
|
2266
|
-
|
|
4010
|
+
/**
|
|
4011
|
+
* A customer-provided identifier for mapping to external systems. URL-safe
|
|
4012
|
+
* characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed
|
|
4013
|
+
* after creation.
|
|
4014
|
+
*/
|
|
4015
|
+
external_id?: string;
|
|
2267
4016
|
|
|
2268
|
-
|
|
4017
|
+
/**
|
|
4018
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
4019
|
+
* null to remove the current owner.
|
|
4020
|
+
*/
|
|
4021
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
4022
|
+
|
|
4023
|
+
/**
|
|
4024
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
4025
|
+
* not specify an owner.
|
|
4026
|
+
*/
|
|
4027
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
4028
|
+
|
|
4029
|
+
/**
|
|
4030
|
+
* An optional list of up to one policy ID to enforce on the wallet.
|
|
4031
|
+
*/
|
|
4032
|
+
policy_ids?: PolicyInput;
|
|
2269
4033
|
}
|
|
2270
4034
|
|
|
2271
4035
|
export namespace WalletSubmitImportParams {
|
|
@@ -2279,7 +4043,7 @@ export namespace WalletSubmitImportParams {
|
|
|
2279
4043
|
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
2280
4044
|
* `solana`.
|
|
2281
4045
|
*/
|
|
2282
|
-
chain_type:
|
|
4046
|
+
chain_type: WalletsAPI.WalletImportSupportedChains;
|
|
2283
4047
|
|
|
2284
4048
|
/**
|
|
2285
4049
|
* The encrypted entropy of the wallet to import.
|
|
@@ -2295,7 +4059,7 @@ export namespace WalletSubmitImportParams {
|
|
|
2295
4059
|
/**
|
|
2296
4060
|
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
2297
4061
|
*/
|
|
2298
|
-
encryption_type:
|
|
4062
|
+
encryption_type: WalletsAPI.HpkeEncryption;
|
|
2299
4063
|
|
|
2300
4064
|
/**
|
|
2301
4065
|
* The entropy type of the wallet to import.
|
|
@@ -2325,7 +4089,7 @@ export namespace WalletSubmitImportParams {
|
|
|
2325
4089
|
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
2326
4090
|
* `solana`.
|
|
2327
4091
|
*/
|
|
2328
|
-
chain_type:
|
|
4092
|
+
chain_type: WalletsAPI.WalletImportSupportedChains;
|
|
2329
4093
|
|
|
2330
4094
|
/**
|
|
2331
4095
|
* The encrypted entropy of the wallet to import.
|
|
@@ -2341,7 +4105,7 @@ export namespace WalletSubmitImportParams {
|
|
|
2341
4105
|
/**
|
|
2342
4106
|
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
2343
4107
|
*/
|
|
2344
|
-
encryption_type:
|
|
4108
|
+
encryption_type: WalletsAPI.HpkeEncryption;
|
|
2345
4109
|
|
|
2346
4110
|
entropy_type: 'private-key';
|
|
2347
4111
|
|
|
@@ -2352,39 +4116,30 @@ export namespace WalletSubmitImportParams {
|
|
|
2352
4116
|
*/
|
|
2353
4117
|
hpke_config?: WalletsAPI.HpkeImportConfig;
|
|
2354
4118
|
}
|
|
2355
|
-
|
|
2356
|
-
export interface AdditionalSigner {
|
|
2357
|
-
signer_id: string;
|
|
2358
|
-
|
|
2359
|
-
override_policy_ids?: Array<string>;
|
|
2360
|
-
}
|
|
2361
|
-
|
|
2362
|
-
export interface UserID {
|
|
2363
|
-
user_id: string;
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
export interface PublicKey {
|
|
2367
|
-
public_key: string;
|
|
2368
|
-
}
|
|
2369
4119
|
}
|
|
2370
4120
|
|
|
2371
4121
|
export interface WalletUpdateParams {
|
|
2372
4122
|
/**
|
|
2373
4123
|
* Body param: Additional signers for the wallet.
|
|
2374
4124
|
*/
|
|
2375
|
-
additional_signers?:
|
|
4125
|
+
additional_signers?: AdditionalSignerInput;
|
|
2376
4126
|
|
|
2377
4127
|
/**
|
|
2378
|
-
* Body param:
|
|
2379
|
-
* owner_id as it will be generated automatically. When updating a wallet, you can
|
|
2380
|
-
* set the owner to null to remove the owner.
|
|
4128
|
+
* Body param: A human-readable label for the wallet. Set to null to clear.
|
|
2381
4129
|
*/
|
|
2382
|
-
|
|
4130
|
+
display_name?: string | null;
|
|
2383
4131
|
|
|
2384
4132
|
/**
|
|
2385
|
-
* Body param
|
|
4133
|
+
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
4134
|
+
* public key, or null to remove the current owner.
|
|
2386
4135
|
*/
|
|
2387
|
-
|
|
4136
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
4137
|
+
|
|
4138
|
+
/**
|
|
4139
|
+
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
4140
|
+
* provide this, do not specify an owner.
|
|
4141
|
+
*/
|
|
4142
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
2388
4143
|
|
|
2389
4144
|
/**
|
|
2390
4145
|
* Body param: New policy IDs to enforce on the wallet. Currently, only one policy
|
|
@@ -2397,55 +4152,31 @@ export interface WalletUpdateParams {
|
|
|
2397
4152
|
* required, they should be comma separated.
|
|
2398
4153
|
*/
|
|
2399
4154
|
'privy-authorization-signature'?: string;
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
export namespace WalletUpdateParams {
|
|
2403
|
-
export interface AdditionalSigner {
|
|
2404
|
-
signer_id: string;
|
|
2405
|
-
|
|
2406
|
-
/**
|
|
2407
|
-
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
2408
|
-
* this will override the base policy IDs set on the wallet.
|
|
2409
|
-
*/
|
|
2410
|
-
override_policy_ids?: Array<string>;
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
/**
|
|
2414
|
-
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
2415
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
2416
|
-
* automatically.
|
|
2417
|
-
*/
|
|
2418
|
-
export interface PublicKeyOwner {
|
|
2419
|
-
public_key: string;
|
|
2420
|
-
}
|
|
2421
4155
|
|
|
2422
4156
|
/**
|
|
2423
|
-
*
|
|
2424
|
-
*
|
|
2425
|
-
* owner_id as it will be generated automatically.
|
|
4157
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
4158
|
+
* representing the deadline by which the request must be processed.
|
|
2426
4159
|
*/
|
|
2427
|
-
|
|
2428
|
-
user_id: string;
|
|
2429
|
-
}
|
|
4160
|
+
'privy-request-expiry'?: string;
|
|
2430
4161
|
}
|
|
2431
4162
|
|
|
2432
4163
|
export interface WalletAuthenticateWithJwtParams {
|
|
2433
|
-
/**
|
|
2434
|
-
* The user's JWT, to be used to authenticate the user.
|
|
2435
|
-
*/
|
|
2436
|
-
user_jwt: string;
|
|
2437
|
-
|
|
2438
4164
|
/**
|
|
2439
4165
|
* The encryption type for the authentication response. Currently only supports
|
|
2440
4166
|
* HPKE.
|
|
2441
4167
|
*/
|
|
2442
|
-
encryption_type
|
|
4168
|
+
encryption_type: 'HPKE';
|
|
2443
4169
|
|
|
2444
4170
|
/**
|
|
2445
4171
|
* The public key of your ECDH keypair, in base64-encoded, SPKI-format, whose
|
|
2446
4172
|
* private key will be able to decrypt the session key.
|
|
2447
4173
|
*/
|
|
2448
|
-
recipient_public_key
|
|
4174
|
+
recipient_public_key: string;
|
|
4175
|
+
|
|
4176
|
+
/**
|
|
4177
|
+
* The user's JWT, to be used to authenticate the user.
|
|
4178
|
+
*/
|
|
4179
|
+
user_jwt: string;
|
|
2449
4180
|
}
|
|
2450
4181
|
|
|
2451
4182
|
export interface WalletCreateWalletsWithRecoveryParams {
|
|
@@ -2495,10 +4226,21 @@ export namespace WalletCreateWalletsWithRecoveryParams {
|
|
|
2495
4226
|
chain_type: WalletsAPI.WalletChainType;
|
|
2496
4227
|
|
|
2497
4228
|
/**
|
|
2498
|
-
*
|
|
2499
|
-
|
|
4229
|
+
* A human-readable label for the wallet.
|
|
4230
|
+
*/
|
|
4231
|
+
display_name?: string;
|
|
4232
|
+
|
|
4233
|
+
/**
|
|
4234
|
+
* A customer-provided identifier for mapping to external systems. URL-safe
|
|
4235
|
+
* characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed
|
|
4236
|
+
* after creation.
|
|
4237
|
+
*/
|
|
4238
|
+
external_id?: string;
|
|
4239
|
+
|
|
4240
|
+
/**
|
|
4241
|
+
* An optional list of up to one policy ID to enforce on the wallet.
|
|
2500
4242
|
*/
|
|
2501
|
-
policy_ids?:
|
|
4243
|
+
policy_ids?: WalletsAPI.PolicyInput;
|
|
2502
4244
|
}
|
|
2503
4245
|
}
|
|
2504
4246
|
|
|
@@ -2512,44 +4254,172 @@ export declare namespace Wallets {
|
|
|
2512
4254
|
type ExtendedChainType as ExtendedChainType,
|
|
2513
4255
|
type FirstClassChainType as FirstClassChainType,
|
|
2514
4256
|
type WalletChainType as WalletChainType,
|
|
4257
|
+
type AuthorizationKeyRole as AuthorizationKeyRole,
|
|
4258
|
+
type WalletEntropyType as WalletEntropyType,
|
|
4259
|
+
type SolanaWalletDerivationStrategy as SolanaWalletDerivationStrategy,
|
|
4260
|
+
type PolicyInput as PolicyInput,
|
|
4261
|
+
type AdditionalSignerItemInput as AdditionalSignerItemInput,
|
|
4262
|
+
type AdditionalSignerInput as AdditionalSignerInput,
|
|
4263
|
+
type WalletAdditionalSignerItem as WalletAdditionalSignerItem,
|
|
4264
|
+
type WalletAdditionalSigner as WalletAdditionalSigner,
|
|
4265
|
+
type Address as Address,
|
|
2515
4266
|
type WalletCustodian as WalletCustodian,
|
|
2516
4267
|
type CustodialWalletProvider as CustodialWalletProvider,
|
|
2517
4268
|
type CustodialWalletChainType as CustodialWalletChainType,
|
|
2518
4269
|
type CustodialWalletCreateInput as CustodialWalletCreateInput,
|
|
2519
4270
|
type CustodialWallet as CustodialWallet,
|
|
4271
|
+
type HpkeEncryption as HpkeEncryption,
|
|
4272
|
+
type RecipientPublicKey as RecipientPublicKey,
|
|
4273
|
+
type ExportType as ExportType,
|
|
4274
|
+
type PrivateKeyExportInput as PrivateKeyExportInput,
|
|
4275
|
+
type PrivateKeyExportResponse as PrivateKeyExportResponse,
|
|
4276
|
+
type SeedPhraseExportInput as SeedPhraseExportInput,
|
|
4277
|
+
type SeedPhraseExportResponse as SeedPhraseExportResponse,
|
|
4278
|
+
type WalletImportSupportedChains as WalletImportSupportedChains,
|
|
4279
|
+
type WalletImportSupportedEntropyTypes as WalletImportSupportedEntropyTypes,
|
|
4280
|
+
type WalletImportInitResponse as WalletImportInitResponse,
|
|
4281
|
+
type HpkeAeadAlgorithm as HpkeAeadAlgorithm,
|
|
2520
4282
|
type HpkeImportConfig as HpkeImportConfig,
|
|
2521
|
-
type
|
|
2522
|
-
type
|
|
2523
|
-
type
|
|
2524
|
-
type
|
|
2525
|
-
type
|
|
2526
|
-
type
|
|
2527
|
-
type
|
|
4283
|
+
type CurveType as CurveType,
|
|
4284
|
+
type HDPath as HDPath,
|
|
4285
|
+
type SigningAlgorithm as SigningAlgorithm,
|
|
4286
|
+
type Hex as Hex,
|
|
4287
|
+
type Quantity as Quantity,
|
|
4288
|
+
type ExportPrivateKeyRpcInput as ExportPrivateKeyRpcInput,
|
|
4289
|
+
type ExportPrivateKeyRpcResponse as ExportPrivateKeyRpcResponse,
|
|
4290
|
+
type ExportSeedPhraseRpcInput as ExportSeedPhraseRpcInput,
|
|
4291
|
+
type ExportSeedPhraseRpcResponse as ExportSeedPhraseRpcResponse,
|
|
4292
|
+
type RawSignHashParams as RawSignHashParams,
|
|
4293
|
+
type RawSignBytesEncoding as RawSignBytesEncoding,
|
|
4294
|
+
type RawSignBytesHashFunction as RawSignBytesHashFunction,
|
|
4295
|
+
type RawSignBytesParams as RawSignBytesParams,
|
|
4296
|
+
type RawSignInputParams as RawSignInputParams,
|
|
4297
|
+
type RawSignInput as RawSignInput,
|
|
4298
|
+
type RawSignResponseData as RawSignResponseData,
|
|
4299
|
+
type RawSignResponse as RawSignResponse,
|
|
4300
|
+
type EthereumSign7702Authorization as EthereumSign7702Authorization,
|
|
4301
|
+
type UnsignedEthereumTransaction as UnsignedEthereumTransaction,
|
|
4302
|
+
type UserOperationInput as UserOperationInput,
|
|
4303
|
+
type TypedDataDomainInputParams as TypedDataDomainInputParams,
|
|
4304
|
+
type TypedDataTypeFieldInput as TypedDataTypeFieldInput,
|
|
4305
|
+
type TypedDataTypesInputParams as TypedDataTypesInputParams,
|
|
4306
|
+
type EthereumPersonalSignRpcInputParams as EthereumPersonalSignRpcInputParams,
|
|
2528
4307
|
type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput,
|
|
4308
|
+
type EthereumSignTransactionRpcInputParams as EthereumSignTransactionRpcInputParams,
|
|
2529
4309
|
type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput,
|
|
4310
|
+
type EthereumSendTransactionRpcInputParams as EthereumSendTransactionRpcInputParams,
|
|
2530
4311
|
type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput,
|
|
4312
|
+
type EthereumTypedDataInput as EthereumTypedDataInput,
|
|
4313
|
+
type EthereumSignTypedDataRpcInputParams as EthereumSignTypedDataRpcInputParams,
|
|
2531
4314
|
type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput,
|
|
2532
|
-
type
|
|
2533
|
-
type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput,
|
|
4315
|
+
type EthereumSecp256k1SignRpcInputParams as EthereumSecp256k1SignRpcInputParams,
|
|
2534
4316
|
type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput,
|
|
2535
|
-
type
|
|
2536
|
-
type
|
|
2537
|
-
type
|
|
4317
|
+
type EthereumSign7702AuthorizationRpcInputParams as EthereumSign7702AuthorizationRpcInputParams,
|
|
4318
|
+
type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput,
|
|
4319
|
+
type EthereumSignUserOperationRpcInputParams as EthereumSignUserOperationRpcInputParams,
|
|
4320
|
+
type EthereumSignUserOperationRpcInput as EthereumSignUserOperationRpcInput,
|
|
4321
|
+
type EthereumSendCallsCall as EthereumSendCallsCall,
|
|
4322
|
+
type EthereumSendCallsRpcInputParams as EthereumSendCallsRpcInputParams,
|
|
4323
|
+
type EthereumSendCallsRpcInput as EthereumSendCallsRpcInput,
|
|
4324
|
+
type EthereumRpcInput as EthereumRpcInput,
|
|
4325
|
+
type EthereumPersonalSignRpcResponseData as EthereumPersonalSignRpcResponseData,
|
|
4326
|
+
type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse,
|
|
4327
|
+
type EthereumSignTransactionRpcResponseData as EthereumSignTransactionRpcResponseData,
|
|
2538
4328
|
type EthereumSignTransactionRpcResponse as EthereumSignTransactionRpcResponse,
|
|
4329
|
+
type EthereumSendTransactionRpcResponseData as EthereumSendTransactionRpcResponseData,
|
|
2539
4330
|
type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse,
|
|
2540
|
-
type
|
|
4331
|
+
type EthereumSignTypedDataRpcResponseData as EthereumSignTypedDataRpcResponseData,
|
|
2541
4332
|
type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse,
|
|
2542
|
-
type
|
|
2543
|
-
type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse,
|
|
4333
|
+
type EthereumSecp256k1SignRpcResponseData as EthereumSecp256k1SignRpcResponseData,
|
|
2544
4334
|
type EthereumSecp256k1SignRpcResponse as EthereumSecp256k1SignRpcResponse,
|
|
4335
|
+
type EthereumSign7702AuthorizationRpcResponseData as EthereumSign7702AuthorizationRpcResponseData,
|
|
4336
|
+
type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse,
|
|
4337
|
+
type EthereumSignUserOperationRpcResponseData as EthereumSignUserOperationRpcResponseData,
|
|
4338
|
+
type EthereumSignUserOperationRpcResponse as EthereumSignUserOperationRpcResponse,
|
|
4339
|
+
type EthereumSendCallsRpcResponseData as EthereumSendCallsRpcResponseData,
|
|
4340
|
+
type EthereumSendCallsRpcResponse as EthereumSendCallsRpcResponse,
|
|
4341
|
+
type EthereumRpcResponse as EthereumRpcResponse,
|
|
4342
|
+
type SolanaSignTransactionRpcInputParams as SolanaSignTransactionRpcInputParams,
|
|
4343
|
+
type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput,
|
|
4344
|
+
type SolanaSignAndSendTransactionRpcInputParams as SolanaSignAndSendTransactionRpcInputParams,
|
|
4345
|
+
type SolanaSignAndSendTransactionRpcInput as SolanaSignAndSendTransactionRpcInput,
|
|
4346
|
+
type SolanaSignMessageRpcInputParams as SolanaSignMessageRpcInputParams,
|
|
4347
|
+
type SolanaSignMessageRpcInput as SolanaSignMessageRpcInput,
|
|
4348
|
+
type SolanaRpcInput as SolanaRpcInput,
|
|
4349
|
+
type SolanaSignTransactionRpcResponseData as SolanaSignTransactionRpcResponseData,
|
|
2545
4350
|
type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse,
|
|
4351
|
+
type SolanaSignAndSendTransactionRpcResponseData as SolanaSignAndSendTransactionRpcResponseData,
|
|
2546
4352
|
type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse,
|
|
4353
|
+
type SolanaSignMessageRpcResponseData as SolanaSignMessageRpcResponseData,
|
|
2547
4354
|
type SolanaSignMessageRpcResponse as SolanaSignMessageRpcResponse,
|
|
4355
|
+
type SolanaRpcResponse as SolanaRpcResponse,
|
|
4356
|
+
type SparkNetwork as SparkNetwork,
|
|
4357
|
+
type SparkSigningKeyshare as SparkSigningKeyshare,
|
|
4358
|
+
type SparkWalletLeaf as SparkWalletLeaf,
|
|
4359
|
+
type SparkTransferLeaf as SparkTransferLeaf,
|
|
4360
|
+
type SparkTransfer as SparkTransfer,
|
|
4361
|
+
type SparkUserTokenMetadata as SparkUserTokenMetadata,
|
|
4362
|
+
type SparkTokenBalance as SparkTokenBalance,
|
|
4363
|
+
type SparkBalance as SparkBalance,
|
|
4364
|
+
type TokenOutput as TokenOutput,
|
|
4365
|
+
type OutputWithPreviousTransactionData as OutputWithPreviousTransactionData,
|
|
4366
|
+
type SparkLightningFee as SparkLightningFee,
|
|
4367
|
+
type SparkLightningReceiveRequest as SparkLightningReceiveRequest,
|
|
4368
|
+
type SparkLightningSendRequest as SparkLightningSendRequest,
|
|
4369
|
+
type SparkTransferRpcInputParams as SparkTransferRpcInputParams,
|
|
4370
|
+
type SparkTransferRpcInput as SparkTransferRpcInput,
|
|
4371
|
+
type SparkGetBalanceRpcInput as SparkGetBalanceRpcInput,
|
|
4372
|
+
type SparkOutputSelectionStrategy as SparkOutputSelectionStrategy,
|
|
4373
|
+
type SparkTransferTokensRpcInputParams as SparkTransferTokensRpcInputParams,
|
|
4374
|
+
type SparkTransferTokensRpcInput as SparkTransferTokensRpcInput,
|
|
4375
|
+
type SparkGetStaticDepositAddressRpcInput as SparkGetStaticDepositAddressRpcInput,
|
|
4376
|
+
type SparkGetClaimStaticDepositQuoteRpcInputParams as SparkGetClaimStaticDepositQuoteRpcInputParams,
|
|
4377
|
+
type SparkGetClaimStaticDepositQuoteRpcInput as SparkGetClaimStaticDepositQuoteRpcInput,
|
|
4378
|
+
type SparkClaimStaticDepositRpcInputParams as SparkClaimStaticDepositRpcInputParams,
|
|
4379
|
+
type SparkClaimStaticDepositRpcInput as SparkClaimStaticDepositRpcInput,
|
|
4380
|
+
type SparkCreateLightningInvoiceRpcInputParams as SparkCreateLightningInvoiceRpcInputParams,
|
|
4381
|
+
type SparkCreateLightningInvoiceRpcInput as SparkCreateLightningInvoiceRpcInput,
|
|
4382
|
+
type SparkPayLightningInvoiceRpcInputParams as SparkPayLightningInvoiceRpcInputParams,
|
|
4383
|
+
type SparkPayLightningInvoiceRpcInput as SparkPayLightningInvoiceRpcInput,
|
|
4384
|
+
type SparkSignMessageWithIdentityKeyRpcInputParams as SparkSignMessageWithIdentityKeyRpcInputParams,
|
|
4385
|
+
type SparkSignMessageWithIdentityKeyRpcInput as SparkSignMessageWithIdentityKeyRpcInput,
|
|
4386
|
+
type SparkRpcInput as SparkRpcInput,
|
|
4387
|
+
type SparkTransferRpcResponse as SparkTransferRpcResponse,
|
|
4388
|
+
type SparkGetBalanceRpcResponse as SparkGetBalanceRpcResponse,
|
|
4389
|
+
type SparkTransferTokensRpcResponseData as SparkTransferTokensRpcResponseData,
|
|
4390
|
+
type SparkTransferTokensRpcResponse as SparkTransferTokensRpcResponse,
|
|
4391
|
+
type SparkGetStaticDepositAddressRpcResponseData as SparkGetStaticDepositAddressRpcResponseData,
|
|
4392
|
+
type SparkGetStaticDepositAddressRpcResponse as SparkGetStaticDepositAddressRpcResponse,
|
|
4393
|
+
type SparkGetClaimStaticDepositQuoteRpcResponseData as SparkGetClaimStaticDepositQuoteRpcResponseData,
|
|
4394
|
+
type SparkGetClaimStaticDepositQuoteRpcResponse as SparkGetClaimStaticDepositQuoteRpcResponse,
|
|
4395
|
+
type SparkClaimStaticDepositRpcResponseData as SparkClaimStaticDepositRpcResponseData,
|
|
4396
|
+
type SparkClaimStaticDepositRpcResponse as SparkClaimStaticDepositRpcResponse,
|
|
4397
|
+
type SparkCreateLightningInvoiceRpcResponse as SparkCreateLightningInvoiceRpcResponse,
|
|
4398
|
+
type SparkPayLightningInvoiceRpcResponse as SparkPayLightningInvoiceRpcResponse,
|
|
4399
|
+
type SparkSignMessageWithIdentityKeyRpcResponseData as SparkSignMessageWithIdentityKeyRpcResponseData,
|
|
4400
|
+
type SparkSignMessageWithIdentityKeyRpcResponse as SparkSignMessageWithIdentityKeyRpcResponse,
|
|
4401
|
+
type SparkRpcResponse as SparkRpcResponse,
|
|
4402
|
+
type Wallet as Wallet,
|
|
4403
|
+
type GetByWalletAddressRequestBody as GetByWalletAddressRequestBody,
|
|
4404
|
+
type WalletUpdateRequestBody as WalletUpdateRequestBody,
|
|
4405
|
+
type WalletBatchItemInput as WalletBatchItemInput,
|
|
4406
|
+
type WalletBatchCreateInput as WalletBatchCreateInput,
|
|
4407
|
+
type WalletBatchCreateResult as WalletBatchCreateResult,
|
|
4408
|
+
type WalletBatchCreateResponse as WalletBatchCreateResponse,
|
|
2548
4409
|
type WalletRpcRequestBody as WalletRpcRequestBody,
|
|
2549
4410
|
type WalletRpcResponse as WalletRpcResponse,
|
|
4411
|
+
type WalletAuthenticateRequestBody as WalletAuthenticateRequestBody,
|
|
4412
|
+
type TokenTransferSource as TokenTransferSource,
|
|
4413
|
+
type TokenTransferDestination as TokenTransferDestination,
|
|
4414
|
+
type CreateTokenTransferRequest as CreateTokenTransferRequest,
|
|
4415
|
+
type SuiCommandName as SuiCommandName,
|
|
4416
|
+
type WalletAPIRegisterAuthorizationKeyInput as WalletAPIRegisterAuthorizationKeyInput,
|
|
4417
|
+
type WalletAPIRevokeAuthorizationKeyInput as WalletAPIRevokeAuthorizationKeyInput,
|
|
4418
|
+
type AuthorizationKeyDashboardResponse as AuthorizationKeyDashboardResponse,
|
|
4419
|
+
type AuthorizationKeyResponse as AuthorizationKeyResponse,
|
|
4420
|
+
type WalletAuthorizationHeaders as WalletAuthorizationHeaders,
|
|
2550
4421
|
type WalletExportResponse as WalletExportResponse,
|
|
2551
4422
|
type WalletInitImportResponse as WalletInitImportResponse,
|
|
2552
|
-
type WalletRawSignResponse as WalletRawSignResponse,
|
|
2553
4423
|
type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse,
|
|
2554
4424
|
type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse,
|
|
2555
4425
|
type WalletsCursor as WalletsCursor,
|