@privy-io/api-types 0.6.1 → 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.
Files changed (197) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/client.d.mts +53 -29
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +53 -29
  5. package/client.d.ts.map +1 -1
  6. package/client.js +32 -7
  7. package/client.js.map +1 -1
  8. package/client.mjs +34 -9
  9. package/client.mjs.map +1 -1
  10. package/package.json +12 -1
  11. package/resources/accounts.d.mts +146 -4
  12. package/resources/accounts.d.mts.map +1 -1
  13. package/resources/accounts.d.ts +146 -4
  14. package/resources/accounts.d.ts.map +1 -1
  15. package/resources/accounts.js.map +1 -1
  16. package/resources/accounts.mjs.map +1 -1
  17. package/resources/aggregations.d.mts +18 -392
  18. package/resources/aggregations.d.mts.map +1 -1
  19. package/resources/aggregations.d.ts +18 -392
  20. package/resources/aggregations.d.ts.map +1 -1
  21. package/resources/aggregations.js.map +1 -1
  22. package/resources/aggregations.mjs.map +1 -1
  23. package/resources/apps.d.mts +197 -70
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +197 -70
  26. package/resources/apps.d.ts.map +1 -1
  27. package/resources/apps.js.map +1 -1
  28. package/resources/apps.mjs.map +1 -1
  29. package/resources/client-auth.d.mts +975 -463
  30. package/resources/client-auth.d.mts.map +1 -1
  31. package/resources/client-auth.d.ts +975 -463
  32. package/resources/client-auth.d.ts.map +1 -1
  33. package/resources/client-auth.js.map +1 -1
  34. package/resources/client-auth.mjs.map +1 -1
  35. package/resources/cross-app.d.mts +14 -13
  36. package/resources/cross-app.d.mts.map +1 -1
  37. package/resources/cross-app.d.ts +14 -13
  38. package/resources/cross-app.d.ts.map +1 -1
  39. package/resources/embedded-wallets.d.mts +165 -81
  40. package/resources/embedded-wallets.d.mts.map +1 -1
  41. package/resources/embedded-wallets.d.ts +165 -81
  42. package/resources/embedded-wallets.d.ts.map +1 -1
  43. package/resources/embedded-wallets.js.map +1 -1
  44. package/resources/embedded-wallets.mjs.map +1 -1
  45. package/resources/funding.d.mts +150 -64
  46. package/resources/funding.d.mts.map +1 -1
  47. package/resources/funding.d.ts +150 -64
  48. package/resources/funding.d.ts.map +1 -1
  49. package/resources/funding.js.map +1 -1
  50. package/resources/funding.mjs.map +1 -1
  51. package/resources/index.d.mts +18 -14
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +18 -14
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +9 -1
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +6 -2
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/intents.d.mts +446 -31
  60. package/resources/intents.d.mts.map +1 -1
  61. package/resources/intents.d.ts +446 -31
  62. package/resources/intents.d.ts.map +1 -1
  63. package/resources/intents.js.map +1 -1
  64. package/resources/intents.mjs.map +1 -1
  65. package/resources/key-quorums.d.mts +108 -17
  66. package/resources/key-quorums.d.mts.map +1 -1
  67. package/resources/key-quorums.d.ts +108 -17
  68. package/resources/key-quorums.d.ts.map +1 -1
  69. package/resources/key-quorums.js +26 -9
  70. package/resources/key-quorums.js.map +1 -1
  71. package/resources/key-quorums.mjs +26 -9
  72. package/resources/key-quorums.mjs.map +1 -1
  73. package/resources/kraken-embed.d.mts +62 -0
  74. package/resources/kraken-embed.d.mts.map +1 -0
  75. package/resources/kraken-embed.d.ts +62 -0
  76. package/resources/kraken-embed.d.ts.map +1 -0
  77. package/resources/kraken-embed.js +9 -0
  78. package/resources/kraken-embed.js.map +1 -0
  79. package/resources/kraken-embed.mjs +5 -0
  80. package/resources/kraken-embed.mjs.map +1 -0
  81. package/resources/policies.d.mts +342 -926
  82. package/resources/policies.d.mts.map +1 -1
  83. package/resources/policies.d.ts +342 -926
  84. package/resources/policies.d.ts.map +1 -1
  85. package/resources/policies.js +51 -41
  86. package/resources/policies.js.map +1 -1
  87. package/resources/policies.mjs +51 -41
  88. package/resources/policies.mjs.map +1 -1
  89. package/resources/shared.d.mts +59 -0
  90. package/resources/shared.d.mts.map +1 -0
  91. package/resources/shared.d.ts +59 -0
  92. package/resources/shared.d.ts.map +1 -0
  93. package/resources/shared.js +9 -0
  94. package/resources/shared.js.map +1 -0
  95. package/resources/shared.mjs +5 -0
  96. package/resources/shared.mjs.map +1 -0
  97. package/resources/swaps.d.mts +108 -0
  98. package/resources/swaps.d.mts.map +1 -0
  99. package/resources/swaps.d.ts +108 -0
  100. package/resources/swaps.d.ts.map +1 -0
  101. package/resources/swaps.js +9 -0
  102. package/resources/swaps.js.map +1 -0
  103. package/resources/swaps.mjs +5 -0
  104. package/resources/swaps.mjs.map +1 -0
  105. package/resources/transactions.d.mts +158 -93
  106. package/resources/transactions.d.mts.map +1 -1
  107. package/resources/transactions.d.ts +158 -93
  108. package/resources/transactions.d.ts.map +1 -1
  109. package/resources/transactions.js +3 -0
  110. package/resources/transactions.js.map +1 -1
  111. package/resources/transactions.mjs +3 -0
  112. package/resources/transactions.mjs.map +1 -1
  113. package/resources/users.d.mts +64 -94
  114. package/resources/users.d.mts.map +1 -1
  115. package/resources/users.d.ts +64 -94
  116. package/resources/users.d.ts.map +1 -1
  117. package/resources/users.js +3 -0
  118. package/resources/users.js.map +1 -1
  119. package/resources/users.mjs +3 -0
  120. package/resources/users.mjs.map +1 -1
  121. package/resources/wallet-actions.d.mts +187 -0
  122. package/resources/wallet-actions.d.mts.map +1 -0
  123. package/resources/wallet-actions.d.ts +187 -0
  124. package/resources/wallet-actions.d.ts.map +1 -0
  125. package/resources/wallet-actions.js +9 -0
  126. package/resources/wallet-actions.js.map +1 -0
  127. package/resources/wallet-actions.mjs +5 -0
  128. package/resources/wallet-actions.mjs.map +1 -0
  129. package/resources/wallets/balance.d.mts +7 -4
  130. package/resources/wallets/balance.d.mts.map +1 -1
  131. package/resources/wallets/balance.d.ts +7 -4
  132. package/resources/wallets/balance.d.ts.map +1 -1
  133. package/resources/wallets/balance.js +3 -0
  134. package/resources/wallets/balance.js.map +1 -1
  135. package/resources/wallets/balance.mjs +3 -0
  136. package/resources/wallets/balance.mjs.map +1 -1
  137. package/resources/wallets/index.d.mts +1 -1
  138. package/resources/wallets/index.d.mts.map +1 -1
  139. package/resources/wallets/index.d.ts +1 -1
  140. package/resources/wallets/index.d.ts.map +1 -1
  141. package/resources/wallets/index.js.map +1 -1
  142. package/resources/wallets/index.mjs.map +1 -1
  143. package/resources/wallets/transactions.d.mts +10 -6
  144. package/resources/wallets/transactions.d.mts.map +1 -1
  145. package/resources/wallets/transactions.d.ts +10 -6
  146. package/resources/wallets/transactions.d.ts.map +1 -1
  147. package/resources/wallets/transactions.js +3 -0
  148. package/resources/wallets/transactions.js.map +1 -1
  149. package/resources/wallets/transactions.mjs +3 -0
  150. package/resources/wallets/transactions.mjs.map +1 -1
  151. package/resources/wallets/wallets.d.mts +2399 -936
  152. package/resources/wallets/wallets.d.mts.map +1 -1
  153. package/resources/wallets/wallets.d.ts +2399 -936
  154. package/resources/wallets/wallets.d.ts.map +1 -1
  155. package/resources/wallets/wallets.js +28 -10
  156. package/resources/wallets/wallets.js.map +1 -1
  157. package/resources/wallets/wallets.mjs +28 -10
  158. package/resources/wallets/wallets.mjs.map +1 -1
  159. package/resources/webhooks.d.mts +780 -339
  160. package/resources/webhooks.d.mts.map +1 -1
  161. package/resources/webhooks.d.ts +780 -339
  162. package/resources/webhooks.d.ts.map +1 -1
  163. package/resources/webhooks.js.map +1 -1
  164. package/resources/webhooks.mjs.map +1 -1
  165. package/resources/yield.d.mts +50 -9
  166. package/resources/yield.d.mts.map +1 -1
  167. package/resources/yield.d.ts +50 -9
  168. package/resources/yield.d.ts.map +1 -1
  169. package/src/client.ts +884 -99
  170. package/src/resources/accounts.ts +179 -3
  171. package/src/resources/aggregations.ts +18 -702
  172. package/src/resources/apps.ts +250 -85
  173. package/src/resources/client-auth.ts +1453 -786
  174. package/src/resources/cross-app.ts +19 -15
  175. package/src/resources/embedded-wallets.ts +219 -123
  176. package/src/resources/funding.ts +263 -173
  177. package/src/resources/index.ts +444 -61
  178. package/src/resources/intents.ts +575 -37
  179. package/src/resources/key-quorums.ts +137 -21
  180. package/src/resources/kraken-embed.ts +85 -0
  181. package/src/resources/policies.ts +582 -1550
  182. package/src/resources/shared.ts +79 -0
  183. package/src/resources/swaps.ts +136 -0
  184. package/src/resources/transactions.ts +188 -91
  185. package/src/resources/users.ts +82 -132
  186. package/src/resources/wallet-actions.ts +251 -0
  187. package/src/resources/wallets/balance.ts +9 -2
  188. package/src/resources/wallets/index.ts +146 -16
  189. package/src/resources/wallets/transactions.ts +12 -4
  190. package/src/resources/wallets/wallets.ts +2922 -974
  191. package/src/resources/webhooks.ts +970 -454
  192. package/src/resources/yield.ts +68 -10
  193. package/src/version.ts +1 -1
  194. package/version.d.mts +1 -1
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
  197. 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 { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
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 response = await client.wallets._rawSign(
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<WalletRawSignResponse> {
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
  ]),
@@ -151,16 +160,26 @@ export class Wallets extends APIResource {
151
160
  *
152
161
  * @example
153
162
  * ```ts
154
- * const response = await client.wallets._rpc('wallet_id', {
155
- * method: 'personal_sign',
156
- * params: { encoding: 'utf-8', message: 'message' },
157
- * });
163
+ * const walletRpcResponse = await client.wallets._rpc(
164
+ * 'wallet_id',
165
+ * {
166
+ * method: 'eth_sendTransaction',
167
+ * params: {
168
+ * transaction: {
169
+ * to: '0x0000000000000000000000000000000000000000',
170
+ * value: 1,
171
+ * },
172
+ * },
173
+ * chain_type: 'ethereum',
174
+ * },
175
+ * );
158
176
  * ```
159
177
  */
160
178
  _rpc(walletID: string, params: WalletRpcParams, options?: RequestOptions): APIPromise<WalletRpcResponse> {
161
179
  const {
162
180
  'privy-authorization-signature': privyAuthorizationSignature,
163
181
  'privy-idempotency-key': privyIdempotencyKey,
182
+ 'privy-request-expiry': privyRequestExpiry,
164
183
  ...body
165
184
  } = params;
166
185
  return this._client.post(path`/v1/wallets/${walletID}/rpc`, {
@@ -172,6 +191,7 @@ export class Wallets extends APIResource {
172
191
  { 'privy-authorization-signature': privyAuthorizationSignature }
173
192
  : undefined),
174
193
  ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined),
194
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
175
195
  },
176
196
  options?.headers,
177
197
  ]),
@@ -206,11 +226,17 @@ export class Wallets extends APIResource {
206
226
  *
207
227
  * @example
208
228
  * ```ts
209
- * const wallet = await client.wallets._update('wallet_id');
229
+ * const wallet = await client.wallets._update('wallet_id', {
230
+ * policy_ids: ['tb54eps4z44ed0jepousxi4n'],
231
+ * });
210
232
  * ```
211
233
  */
212
234
  _update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet> {
213
- const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
235
+ const {
236
+ 'privy-authorization-signature': privyAuthorizationSignature,
237
+ 'privy-request-expiry': privyRequestExpiry,
238
+ ...body
239
+ } = params;
214
240
  return this._client.patch(path`/v1/wallets/${walletID}`, {
215
241
  body,
216
242
  ...options,
@@ -219,6 +245,7 @@ export class Wallets extends APIResource {
219
245
  ...(privyAuthorizationSignature != null ?
220
246
  { 'privy-authorization-signature': privyAuthorizationSignature }
221
247
  : undefined),
248
+ ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
222
249
  },
223
250
  options?.headers,
224
251
  ]),
@@ -231,6 +258,9 @@ export class Wallets extends APIResource {
231
258
  * @example
232
259
  * ```ts
233
260
  * const response = await client.wallets.authenticateWithJwt({
261
+ * encryption_type: 'HPKE',
262
+ * recipient_public_key:
263
+ * 'DAQcDQgAEx4aoeD72yykviK+fckqE2CItVIGn1rCnvCXZ1HgpOcMEMialRmTrqIK4oZlYd1',
234
264
  * user_jwt:
235
265
  * 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30',
236
266
  * });
@@ -331,6 +361,72 @@ export type WalletChainType =
331
361
  | 'starknet'
332
362
  | 'spark';
333
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
+
334
430
  /**
335
431
  * Information about the custodian managing this wallet.
336
432
  */
@@ -354,7 +450,7 @@ export type CustodialWalletProvider = 'bridge';
354
450
  /**
355
451
  * The chain type of the custodial wallet.
356
452
  */
357
- export type CustodialWalletChainType = 'ethereum';
453
+ export type CustodialWalletChainType = 'ethereum' | 'solana';
358
454
 
359
455
  /**
360
456
  * The input for creating a custodial wallet.
@@ -376,27 +472,21 @@ export interface CustodialWalletCreateInput {
376
472
  */
377
473
  provider_user_id: string;
378
474
 
379
- additional_signers?: Array<CustodialWalletCreateInput.AdditionalSigner>;
380
-
381
- owner?: CustodialWalletCreateInput.UserID | CustodialWalletCreateInput.PublicKey | null;
382
-
383
- policy_ids?: Array<string>;
384
- }
385
-
386
- export namespace CustodialWalletCreateInput {
387
- export interface AdditionalSigner {
388
- signer_id: string;
389
-
390
- override_policy_ids?: Array<string>;
391
- }
475
+ /**
476
+ * Additional signers for the wallet.
477
+ */
478
+ additional_signers?: AdditionalSignerInput;
392
479
 
393
- export interface UserID {
394
- user_id: string;
395
- }
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;
396
485
 
397
- export interface PublicKey {
398
- public_key: string;
399
- }
486
+ /**
487
+ * An optional list of up to one policy ID to enforce on the wallet.
488
+ */
489
+ policy_ids?: PolicyInput;
400
490
  }
401
491
 
402
492
  /**
@@ -419,402 +509,608 @@ export interface CustodialWallet {
419
509
 
420
510
  owner_id: string | null;
421
511
 
422
- additional_signers?: Array<CustodialWallet.AdditionalSigner>;
512
+ /**
513
+ * Additional signers for the wallet.
514
+ */
515
+ additional_signers?: WalletAdditionalSigner;
423
516
 
424
517
  policy_ids?: Array<string>;
425
518
  }
426
519
 
427
- export namespace CustodialWallet {
428
- export interface AdditionalSigner {
429
- signer_id: string;
520
+ /**
521
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
522
+ */
523
+ export type HpkeEncryption = 'HPKE';
430
524
 
431
- override_policy_ids?: Array<string>;
432
- }
433
- }
525
+ /**
526
+ * The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
527
+ * format.
528
+ */
529
+ export type RecipientPublicKey = string;
434
530
 
435
531
  /**
436
- * Optional HPKE configuration for wallet import decryption. These parameters allow
437
- * importing wallets encrypted by external providers that use different HPKE
438
- * 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.
439
534
  */
440
- export interface HpkeImportConfig {
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 {
441
541
  /**
442
- * Additional Authenticated Data (AAD) used during encryption. Should be
443
- * base64-encoded bytes.
542
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
444
543
  */
445
- aad?: string;
544
+ encryption_type: HpkeEncryption;
446
545
 
447
546
  /**
448
- * The AEAD algorithm used for encryption. Defaults to CHACHA20_POLY1305 if not
449
- * specified.
547
+ * The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
548
+ * format.
450
549
  */
451
- aead_algorithm?: 'CHACHA20_POLY1305' | 'AES_GCM256';
550
+ recipient_public_key: RecipientPublicKey;
551
+
552
+ export_seed_phrase?: boolean;
452
553
 
453
554
  /**
454
- * Application-specific context information (INFO) used during HPKE encryption.
455
- * Should be base64-encoded bytes.
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.
456
557
  */
457
- info?: string;
558
+ export_type?: ExportType;
458
559
  }
459
560
 
460
561
  /**
461
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
562
+ * Response containing HPKE-encrypted wallet data (private key or seed phrase).
462
563
  */
463
- export type SuiCommandName = 'TransferObjects' | 'SplitCoins' | 'MergeCoins';
564
+ export interface PrivateKeyExportResponse {
565
+ ciphertext: string;
566
+
567
+ encapsulated_key: string;
568
+
569
+ /**
570
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
571
+ */
572
+ encryption_type: HpkeEncryption;
573
+ }
464
574
 
465
575
  /**
466
- * A wallet managed by Privy's wallet infrastructure.
576
+ * Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
467
577
  */
468
- export interface Wallet {
578
+ export interface SeedPhraseExportInput {
469
579
  /**
470
- * Unique ID of the wallet. This will be the primary identifier when using the
471
- * wallet in the future.
580
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
472
581
  */
473
- id: string;
582
+ encryption_type: HpkeEncryption;
474
583
 
475
584
  /**
476
- * Additional signers for the wallet.
585
+ * The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
586
+ * format.
477
587
  */
478
- additional_signers: Array<Wallet.AdditionalSigner>;
588
+ recipient_public_key: RecipientPublicKey;
589
+
590
+ export_seed_phrase?: boolean;
479
591
 
480
592
  /**
481
- * Address of the wallet.
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.
482
595
  */
483
- address: string;
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;
484
606
 
485
607
  /**
486
- * The wallet chain types.
608
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
487
609
  */
488
- chain_type: WalletChainType;
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;
489
631
 
490
632
  /**
491
- * Unix timestamp of when the wallet was created in milliseconds.
633
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
492
634
  */
493
- created_at: number;
635
+ encryption_type: HpkeEncryption;
636
+ }
637
+
638
+ /**
639
+ * The AEAD algorithm used for HPKE encryption.
640
+ */
641
+ export type HpkeAeadAlgorithm = 'CHACHA20_POLY1305' | 'AES_GCM256';
494
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 {
495
649
  /**
496
- * Unix timestamp of when the wallet was exported in milliseconds, if the wallet
497
- * was exported.
650
+ * Additional Authenticated Data (AAD) used during encryption. Should be
651
+ * base64-encoded bytes.
498
652
  */
499
- exported_at: number | null;
653
+ aad?: string;
500
654
 
501
655
  /**
502
- * Unix timestamp of when the wallet was imported in milliseconds, if the wallet
503
- * was imported.
656
+ * The AEAD algorithm used for HPKE encryption.
504
657
  */
505
- imported_at: number | null;
658
+ aead_algorithm?: HpkeAeadAlgorithm;
506
659
 
507
660
  /**
508
- * The key quorum ID of the owner of the wallet.
661
+ * Application-specific context information (INFO) used during HPKE encryption.
662
+ * Should be base64-encoded bytes.
509
663
  */
510
- owner_id: string | null;
664
+ info?: string;
665
+ }
666
+
667
+ /**
668
+ * The cryptographic curve type used by the wallet.
669
+ */
670
+ export type CurveType = 'secp256k1' | 'ed25519' | 'starknet';
671
+
672
+ /**
673
+ * A BIP-32 hierarchical deterministic wallet derivation path.
674
+ */
675
+ export type HDPath = string;
676
+
677
+ /**
678
+ * The signing algorithm used by the wallet.
679
+ */
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';
511
700
 
512
701
  /**
513
- * List of policy IDs for policies that are enforced on the wallet.
702
+ * Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
514
703
  */
515
- policy_ids: Array<string>;
704
+ params: PrivateKeyExportInput;
705
+ }
516
706
 
707
+ /**
708
+ * Response to the `exportPrivateKey` RPC.
709
+ */
710
+ export interface ExportPrivateKeyRpcResponse {
517
711
  /**
518
- * The compressed, raw public key for the wallet along the chain cryptographic
519
- * curve.
712
+ * Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
520
713
  */
521
- public_key?: string;
714
+ data: PrivateKeyExportInput;
715
+
716
+ method: 'exportPrivateKey';
522
717
  }
523
718
 
524
- export namespace Wallet {
525
- export interface AdditionalSigner {
526
- signer_id: string;
719
+ /**
720
+ * Exports the seed phrase of the wallet.
721
+ */
722
+ export interface ExportSeedPhraseRpcInput {
723
+ address: string;
527
724
 
528
- /**
529
- * The array of policy IDs that will be applied to wallet requests. If specified,
530
- * this will override the base policy IDs set on the wallet.
531
- */
532
- override_policy_ids?: Array<string>;
533
- }
725
+ method: 'exportSeedPhrase';
726
+
727
+ /**
728
+ * Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
729
+ */
730
+ params: SeedPhraseExportInput;
534
731
  }
535
732
 
536
733
  /**
537
- * Input for a single wallet in a batch creation request.
734
+ * Response to the `exportSeedPhrase` RPC.
538
735
  */
539
- export interface WalletBatchItemInput {
736
+ export interface ExportSeedPhraseRpcResponse {
540
737
  /**
541
- * The wallet chain types.
738
+ * Response containing HPKE-encrypted wallet data (private key or seed phrase).
542
739
  */
543
- chain_type: WalletChainType;
740
+ data: SeedPhraseExportResponse;
741
+
742
+ method: 'exportSeedPhrase';
743
+ }
544
744
 
745
+ /**
746
+ * Parameters for signing a pre-computed hash with the `raw_sign` RPC.
747
+ */
748
+ export interface RawSignHashParams {
545
749
  /**
546
- * Additional signers for the wallet.
750
+ * A hex-encoded string prefixed with '0x'.
547
751
  */
548
- additional_signers?: Array<WalletBatchItemInput.AdditionalSigner>;
752
+ hash: Hex;
753
+ }
754
+
755
+ /**
756
+ * Encoding scheme for bytes in the `raw_sign` RPC.
757
+ */
758
+ export type RawSignBytesEncoding = 'utf-8' | 'hex' | 'base64';
759
+
760
+ /**
761
+ * Hash function for bytes in the `raw_sign` RPC.
762
+ */
763
+ export type RawSignBytesHashFunction = 'keccak256' | 'sha256' | 'blake2b256';
549
764
 
765
+ /**
766
+ * Parameters for hashing and signing bytes with the `raw_sign` RPC.
767
+ */
768
+ export interface RawSignBytesParams {
550
769
  /**
551
- * The owner of the resource. If you provide this, do not specify an owner_id as it
552
- * will be generated automatically. When updating a wallet, you can set the owner
553
- * to null to remove the owner.
770
+ * The bytes to hash and sign.
554
771
  */
555
- owner?: WalletBatchItemInput.PublicKeyOwner | WalletBatchItemInput.UserOwner | null;
772
+ bytes: string;
556
773
 
557
774
  /**
558
- * The key quorum ID to set as the owner of the resource. If you provide this, do
559
- * not specify an owner.
775
+ * Encoding scheme for bytes in the `raw_sign` RPC.
560
776
  */
561
- owner_id?: string;
777
+ encoding: RawSignBytesEncoding;
562
778
 
563
779
  /**
564
- * List of policy IDs for policies that should be enforced on the wallet.
565
- * Currently, only one policy is supported per wallet.
780
+ * Hash function for bytes in the `raw_sign` RPC.
566
781
  */
567
- policy_ids?: Array<string>;
782
+ hash_function: RawSignBytesHashFunction;
568
783
  }
569
784
 
570
- export namespace WalletBatchItemInput {
571
- export interface AdditionalSigner {
572
- signer_id: string;
573
-
574
- /**
575
- * The array of policy IDs that will be applied to wallet requests. If specified,
576
- * this will override the base policy IDs set on the wallet.
577
- */
578
- override_policy_ids?: Array<string>;
579
- }
785
+ /**
786
+ * Parameters for the `raw_sign` RPC.
787
+ */
788
+ export type RawSignInputParams = RawSignHashParams | RawSignBytesParams;
580
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 {
581
795
  /**
582
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
583
- * If you provide this, do not specify an owner_id as it will be generated
584
- * automatically.
796
+ * Parameters for the `raw_sign` RPC.
585
797
  */
586
- export interface PublicKeyOwner {
587
- public_key: string;
588
- }
798
+ params: RawSignInputParams;
799
+ }
800
+
801
+ /**
802
+ * Data returned by the `raw_sign` RPC.
803
+ */
804
+ export interface RawSignResponseData {
805
+ encoding: 'hex';
589
806
 
590
807
  /**
591
- * The user ID of the owner of the resource. The user must already exist, and this
592
- * value must start with "did:privy:". If you provide this, do not specify an
593
- * owner_id as it will be generated automatically.
808
+ * A hex-encoded string prefixed with '0x'.
594
809
  */
595
- export interface UserOwner {
596
- user_id: string;
597
- }
810
+ signature: Hex;
598
811
  }
599
812
 
600
813
  /**
601
- * Request body for batch wallet creation.
814
+ * Response to the `raw_sign` RPC.
602
815
  */
603
- export interface WalletBatchCreateInput {
816
+ export interface RawSignResponse {
604
817
  /**
605
- * Array of wallet creation requests. Minimum 1, maximum 100.
818
+ * Data returned by the `raw_sign` RPC.
606
819
  */
607
- wallets: Array<WalletBatchItemInput>;
820
+ data: RawSignResponseData;
821
+
822
+ method: 'raw_sign';
608
823
  }
609
824
 
610
825
  /**
611
- * A single result from a batch wallet creation operation.
826
+ * A signed EIP-7702 authorization that delegates code execution to a contract
827
+ * address.
612
828
  */
613
- export type WalletBatchCreateResult =
614
- | WalletBatchCreateResult.WalletBatchCreateSuccess
615
- | WalletBatchCreateResult.WalletBatchCreateFailure;
616
-
617
- export namespace WalletBatchCreateResult {
829
+ export interface EthereumSign7702Authorization {
618
830
  /**
619
- * A successful wallet creation result within a batch operation.
831
+ * A quantity value that can be either a hex string starting with '0x' or a
832
+ * non-negative integer.
620
833
  */
621
- export interface WalletBatchCreateSuccess {
622
- /**
623
- * The index of the wallet in the original request array.
624
- */
625
- index: number;
834
+ chain_id: Quantity;
626
835
 
627
- success: true;
628
-
629
- /**
630
- * A wallet managed by Privy's wallet infrastructure.
631
- */
632
- wallet: WalletsAPI.Wallet;
633
- }
836
+ contract: string;
634
837
 
635
838
  /**
636
- * A failed wallet creation result within a batch operation.
839
+ * A quantity value that can be either a hex string starting with '0x' or a
840
+ * non-negative integer.
637
841
  */
638
- export interface WalletBatchCreateFailure {
639
- /**
640
- * A PrivyErrorCode string identifying the error type (e.g., "invalid_data",
641
- * "resource_conflict").
642
- */
643
- code: string;
842
+ nonce: Quantity;
644
843
 
645
- /**
646
- * A human-readable error message with details about what went wrong.
647
- */
648
- error: string;
844
+ /**
845
+ * A hex-encoded string prefixed with '0x'.
846
+ */
847
+ r: Hex;
649
848
 
650
- /**
651
- * The index of the wallet in the original request array.
652
- */
653
- index: number;
849
+ /**
850
+ * A hex-encoded string prefixed with '0x'.
851
+ */
852
+ s: Hex;
654
853
 
655
- success: false;
656
- }
854
+ y_parity: number;
657
855
  }
658
856
 
659
857
  /**
660
- * Response for a batch wallet creation request.
858
+ * An unsigned Ethereum transaction object.
661
859
  */
662
- export interface WalletBatchCreateResponse {
860
+ export interface UnsignedEthereumTransaction {
861
+ authorization_list?: Array<EthereumSign7702Authorization>;
862
+
663
863
  /**
664
- * Array of results for each wallet creation request, in the same order as input.
864
+ * A quantity value that can be either a hex string starting with '0x' or a
865
+ * non-negative integer.
665
866
  */
666
- results: Array<WalletBatchCreateResult>;
667
- }
867
+ chain_id?: Quantity;
668
868
 
669
- /**
670
- * Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
671
- */
672
- export interface EthereumPersonalSignRpcInput {
673
- method: 'personal_sign';
869
+ /**
870
+ * A hex-encoded string prefixed with '0x'.
871
+ */
872
+ data?: Hex;
674
873
 
675
- params: EthereumPersonalSignRpcInput.Params;
874
+ from?: string;
676
875
 
677
- address?: string;
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;
678
881
 
679
- chain_type?: 'ethereum';
680
- }
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;
681
887
 
682
- export namespace EthereumPersonalSignRpcInput {
683
- export interface Params {
684
- encoding: 'utf-8' | 'hex';
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;
685
893
 
686
- message: string;
687
- }
688
- }
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;
689
899
 
690
- /**
691
- * Executes the EVM `eth_signTransaction` RPC to sign a transaction.
692
- */
693
- export interface EthereumSignTransactionRpcInput {
694
- method: 'eth_signTransaction';
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;
695
905
 
696
- params: EthereumSignTransactionRpcInput.Params;
906
+ to?: string;
697
907
 
698
- address?: string;
908
+ type?: 0 | 1 | 2 | 4;
699
909
 
700
- chain_type?: 'ethereum';
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;
701
915
  }
702
916
 
703
- export namespace EthereumSignTransactionRpcInput {
704
- export interface Params {
705
- transaction: Params.Transaction;
706
- }
707
-
708
- export namespace Params {
709
- export interface Transaction {
710
- authorization_list?: Array<Transaction.AuthorizationList>;
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;
711
925
 
712
- chain_id?: string | number;
926
+ /**
927
+ * A hex-encoded string prefixed with '0x'.
928
+ */
929
+ call_gas_limit: Hex;
713
930
 
714
- data?: string;
931
+ /**
932
+ * A hex-encoded string prefixed with '0x'.
933
+ */
934
+ max_fee_per_gas: Hex;
715
935
 
716
- from?: string;
936
+ /**
937
+ * A hex-encoded string prefixed with '0x'.
938
+ */
939
+ max_priority_fee_per_gas: Hex;
717
940
 
718
- gas_limit?: string | number;
941
+ /**
942
+ * A hex-encoded string prefixed with '0x'.
943
+ */
944
+ nonce: Hex;
719
945
 
720
- gas_price?: string | number;
946
+ /**
947
+ * A hex-encoded string prefixed with '0x'.
948
+ */
949
+ pre_verification_gas: Hex;
721
950
 
722
- max_fee_per_gas?: string | number;
951
+ sender: string;
723
952
 
724
- max_priority_fee_per_gas?: string | number;
953
+ /**
954
+ * A hex-encoded string prefixed with '0x'.
955
+ */
956
+ verification_gas_limit: Hex;
725
957
 
726
- nonce?: string | number;
958
+ paymaster?: string;
727
959
 
728
- to?: string;
960
+ /**
961
+ * A hex-encoded string prefixed with '0x'.
962
+ */
963
+ paymaster_data?: Hex;
729
964
 
730
- type?: 0 | 1 | 2 | 4;
965
+ /**
966
+ * A hex-encoded string prefixed with '0x'.
967
+ */
968
+ paymaster_post_op_gas_limit?: Hex;
731
969
 
732
- value?: string | number;
733
- }
970
+ /**
971
+ * A hex-encoded string prefixed with '0x'.
972
+ */
973
+ paymaster_verification_gas_limit?: Hex;
974
+ }
734
975
 
735
- export namespace Transaction {
736
- export interface AuthorizationList {
737
- chain_id: string | number;
976
+ /**
977
+ * The domain parameters for EIP-712 typed data signing.
978
+ */
979
+ export type TypedDataDomainInputParams = { [key: string]: unknown };
738
980
 
739
- contract: string;
981
+ /**
982
+ * A single field definition in an EIP-712 typed data type.
983
+ */
984
+ export interface TypedDataTypeFieldInput {
985
+ name: string;
740
986
 
741
- nonce: string | number;
987
+ type: string;
988
+ }
742
989
 
743
- r: string;
990
+ /**
991
+ * The type definitions for EIP-712 typed data signing.
992
+ */
993
+ export type TypedDataTypesInputParams = { [key: string]: Array<TypedDataTypeFieldInput> };
744
994
 
745
- s: string;
995
+ /**
996
+ * Parameters for the EVM `personal_sign` RPC.
997
+ */
998
+ export interface EthereumPersonalSignRpcInputParams {
999
+ encoding: 'utf-8' | 'hex';
746
1000
 
747
- y_parity: number;
748
- }
749
- }
750
- }
1001
+ message: string;
751
1002
  }
752
1003
 
753
1004
  /**
754
- * Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
1005
+ * Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
755
1006
  */
756
- export interface EthereumSendTransactionRpcInput {
757
- caip2: string;
758
-
759
- method: 'eth_sendTransaction';
1007
+ export interface EthereumPersonalSignRpcInput {
1008
+ method: 'personal_sign';
760
1009
 
761
- params: EthereumSendTransactionRpcInput.Params;
1010
+ /**
1011
+ * Parameters for the EVM `personal_sign` RPC.
1012
+ */
1013
+ params: EthereumPersonalSignRpcInputParams;
762
1014
 
763
1015
  address?: string;
764
1016
 
765
1017
  chain_type?: 'ethereum';
766
1018
 
767
- sponsor?: boolean;
1019
+ wallet_id?: string;
768
1020
  }
769
1021
 
770
- export namespace EthereumSendTransactionRpcInput {
771
- export interface Params {
772
- transaction: Params.Transaction;
773
- }
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';
774
1037
 
775
- export namespace Params {
776
- export interface Transaction {
777
- authorization_list?: Array<Transaction.AuthorizationList>;
1038
+ /**
1039
+ * Parameters for the EVM `eth_signTransaction` RPC.
1040
+ */
1041
+ params: EthereumSignTransactionRpcInputParams;
778
1042
 
779
- chain_id?: string | number;
1043
+ address?: string;
780
1044
 
781
- data?: string;
1045
+ chain_type?: 'ethereum';
782
1046
 
783
- from?: string;
1047
+ wallet_id?: string;
1048
+ }
784
1049
 
785
- gas_limit?: string | number;
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
+ }
786
1059
 
787
- gas_price?: string | number;
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;
788
1068
 
789
- max_fee_per_gas?: string | number;
1069
+ method: 'eth_sendTransaction';
790
1070
 
791
- max_priority_fee_per_gas?: string | number;
1071
+ /**
1072
+ * Parameters for the EVM `eth_sendTransaction` RPC.
1073
+ */
1074
+ params: EthereumSendTransactionRpcInputParams;
792
1075
 
793
- nonce?: string | number;
1076
+ address?: string;
794
1077
 
795
- to?: string;
1078
+ chain_type?: 'ethereum';
796
1079
 
797
- type?: 0 | 1 | 2 | 4;
1080
+ reference_id?: string;
798
1081
 
799
- value?: string | number;
800
- }
1082
+ sponsor?: boolean;
801
1083
 
802
- export namespace Transaction {
803
- export interface AuthorizationList {
804
- chain_id: string | number;
1084
+ wallet_id?: string;
1085
+ }
805
1086
 
806
- contract: string;
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;
807
1095
 
808
- nonce: string | number;
1096
+ message: { [key: string]: unknown };
809
1097
 
810
- r: string;
1098
+ primary_type: string;
811
1099
 
812
- s: string;
1100
+ /**
1101
+ * The type definitions for EIP-712 typed data signing.
1102
+ */
1103
+ types: TypedDataTypesInputParams;
1104
+ }
813
1105
 
814
- y_parity: number;
815
- }
816
- }
817
- }
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;
818
1114
  }
819
1115
 
820
1116
  /**
@@ -824,88 +1120,65 @@ export namespace EthereumSendTransactionRpcInput {
824
1120
  export interface EthereumSignTypedDataRpcInput {
825
1121
  method: 'eth_signTypedData_v4';
826
1122
 
827
- params: EthereumSignTypedDataRpcInput.Params;
1123
+ /**
1124
+ * Parameters for the EVM `eth_signTypedData_v4` RPC.
1125
+ */
1126
+ params: EthereumSignTypedDataRpcInputParams;
828
1127
 
829
1128
  address?: string;
830
1129
 
831
1130
  chain_type?: 'ethereum';
832
- }
833
-
834
- export namespace EthereumSignTypedDataRpcInput {
835
- export interface Params {
836
- typed_data: Params.TypedData;
837
- }
838
-
839
- export namespace Params {
840
- export interface TypedData {
841
- domain: { [key: string]: unknown };
842
-
843
- message: { [key: string]: unknown };
844
-
845
- primary_type: string;
846
-
847
- types: { [key: string]: Array<TypedData.Type> };
848
- }
849
1131
 
850
- export namespace TypedData {
851
- export interface Type {
852
- name: string;
1132
+ wallet_id?: string;
1133
+ }
853
1134
 
854
- type: string;
855
- }
856
- }
857
- }
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;
858
1143
  }
859
1144
 
860
1145
  /**
861
- * Executes an RPC method to hash and sign a UserOperation.
1146
+ * Signs a raw hash on the secp256k1 curve.
862
1147
  */
863
- export interface EthereumSignUserOperationRpcInput {
864
- method: 'eth_signUserOperation';
1148
+ export interface EthereumSecp256k1SignRpcInput {
1149
+ method: 'secp256k1_sign';
865
1150
 
866
- params: EthereumSignUserOperationRpcInput.Params;
1151
+ /**
1152
+ * Parameters for the EVM `secp256k1_sign` RPC.
1153
+ */
1154
+ params: EthereumSecp256k1SignRpcInputParams;
867
1155
 
868
1156
  address?: string;
869
1157
 
870
1158
  chain_type?: 'ethereum';
871
- }
872
1159
 
873
- export namespace EthereumSignUserOperationRpcInput {
874
- export interface Params {
875
- chain_id: string | number;
876
-
877
- contract: string;
878
-
879
- user_operation: Params.UserOperation;
880
- }
881
-
882
- export namespace Params {
883
- export interface UserOperation {
884
- call_data: string;
885
-
886
- call_gas_limit: string;
887
-
888
- max_fee_per_gas: string;
889
-
890
- max_priority_fee_per_gas: string;
891
-
892
- nonce: string;
893
-
894
- paymaster: string;
895
-
896
- paymaster_data: string;
897
-
898
- paymaster_post_op_gas_limit: string;
1160
+ wallet_id?: string;
1161
+ }
899
1162
 
900
- paymaster_verification_gas_limit: string;
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;
901
1172
 
902
- pre_verification_gas: string;
1173
+ contract: string;
903
1174
 
904
- sender: string;
1175
+ executor?: 'self';
905
1176
 
906
- verification_gas_limit: string;
907
- }
908
- }
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;
909
1182
  }
910
1183
 
911
1184
  /**
@@ -914,392 +1187,1414 @@ export namespace EthereumSignUserOperationRpcInput {
914
1187
  export interface EthereumSign7702AuthorizationRpcInput {
915
1188
  method: 'eth_sign7702Authorization';
916
1189
 
917
- params: EthereumSign7702AuthorizationRpcInput.Params;
1190
+ /**
1191
+ * Parameters for the EVM `eth_sign7702Authorization` RPC.
1192
+ */
1193
+ params: EthereumSign7702AuthorizationRpcInputParams;
918
1194
 
919
1195
  address?: string;
920
1196
 
921
1197
  chain_type?: 'ethereum';
1198
+
1199
+ wallet_id?: string;
922
1200
  }
923
1201
 
924
- export namespace EthereumSign7702AuthorizationRpcInput {
925
- export interface Params {
926
- chain_id: string | number;
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;
927
1211
 
928
- contract: string;
1212
+ contract: string;
929
1213
 
930
- nonce?: string | number;
931
- }
1214
+ /**
1215
+ * An ERC-4337 user operation.
1216
+ */
1217
+ user_operation: UserOperationInput;
932
1218
  }
933
1219
 
934
1220
  /**
935
- * Signs a raw hash on the secp256k1 curve.
1221
+ * Executes an RPC method to hash and sign a UserOperation.
936
1222
  */
937
- export interface EthereumSecp256k1SignRpcInput {
938
- method: 'secp256k1_sign';
1223
+ export interface EthereumSignUserOperationRpcInput {
1224
+ method: 'eth_signUserOperation';
939
1225
 
940
- params: EthereumSecp256k1SignRpcInput.Params;
1226
+ /**
1227
+ * Parameters for the EVM `eth_signUserOperation` RPC.
1228
+ */
1229
+ params: EthereumSignUserOperationRpcInputParams;
941
1230
 
942
1231
  address?: string;
943
1232
 
944
1233
  chain_type?: 'ethereum';
945
- }
946
1234
 
947
- export namespace EthereumSecp256k1SignRpcInput {
948
- export interface Params {
949
- hash: string;
950
- }
1235
+ wallet_id?: string;
951
1236
  }
952
1237
 
953
1238
  /**
954
- * Executes the SVM `signTransaction` RPC to sign a transaction.
1239
+ * A single call within a batched wallet_sendCalls request.
955
1240
  */
956
- export interface SolanaSignTransactionRpcInput {
957
- method: 'signTransaction';
958
-
959
- params: SolanaSignTransactionRpcInput.Params;
1241
+ export interface EthereumSendCallsCall {
1242
+ to: string;
960
1243
 
961
- address?: string;
1244
+ /**
1245
+ * A hex-encoded string prefixed with '0x'.
1246
+ */
1247
+ data?: Hex;
962
1248
 
963
- chain_type?: 'solana';
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;
964
1254
  }
965
1255
 
966
- export namespace SolanaSignTransactionRpcInput {
967
- export interface Params {
968
- encoding: 'base64';
969
-
970
- transaction: string;
971
- }
1256
+ /**
1257
+ * Parameters for the `wallet_sendCalls` RPC.
1258
+ */
1259
+ export interface EthereumSendCallsRpcInputParams {
1260
+ calls: Array<EthereumSendCallsCall>;
972
1261
  }
973
1262
 
974
1263
  /**
975
- * Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
976
- * transaction.
1264
+ * Executes the `wallet_sendCalls` RPC (EIP-5792) to batch multiple calls into a
1265
+ * single atomic transaction.
977
1266
  */
978
- export interface SolanaSignAndSendTransactionRpcInput {
979
- caip2: string;
1267
+ export interface EthereumSendCallsRpcInput {
1268
+ /**
1269
+ * A valid CAIP-2 chain ID (e.g. 'eip155:1').
1270
+ */
1271
+ caip2: AppsAPI.Caip2;
980
1272
 
981
- method: 'signAndSendTransaction';
1273
+ method: 'wallet_sendCalls';
982
1274
 
983
- params: SolanaSignAndSendTransactionRpcInput.Params;
1275
+ /**
1276
+ * Parameters for the `wallet_sendCalls` RPC.
1277
+ */
1278
+ params: EthereumSendCallsRpcInputParams;
984
1279
 
985
1280
  address?: string;
986
1281
 
987
- chain_type?: 'solana';
1282
+ chain_type?: 'ethereum';
988
1283
 
989
1284
  sponsor?: boolean;
990
- }
991
-
992
- export namespace SolanaSignAndSendTransactionRpcInput {
993
- export interface Params {
994
- encoding: 'base64';
995
1285
 
996
- transaction: string;
997
- }
1286
+ wallet_id?: string;
998
1287
  }
999
1288
 
1000
1289
  /**
1001
- * Executes the SVM `signMessage` RPC to sign a message.
1290
+ * Request body for Ethereum wallet RPC operations, discriminated by method.
1002
1291
  */
1003
- export interface SolanaSignMessageRpcInput {
1004
- method: 'signMessage';
1292
+ export type EthereumRpcInput =
1293
+ | EthereumSignTransactionRpcInput
1294
+ | EthereumSendTransactionRpcInput
1295
+ | EthereumPersonalSignRpcInput
1296
+ | EthereumSignTypedDataRpcInput
1297
+ | EthereumSecp256k1SignRpcInput
1298
+ | EthereumSign7702AuthorizationRpcInput
1299
+ | EthereumSignUserOperationRpcInput
1300
+ | EthereumSendCallsRpcInput;
1005
1301
 
1006
- params: SolanaSignMessageRpcInput.Params;
1302
+ /**
1303
+ * Data returned by the EVM `personal_sign` RPC.
1304
+ */
1305
+ export interface EthereumPersonalSignRpcResponseData {
1306
+ encoding: 'hex';
1007
1307
 
1008
- address?: string;
1308
+ signature: string;
1309
+ }
1009
1310
 
1010
- chain_type?: 'solana';
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;
1319
+
1320
+ method: 'personal_sign';
1011
1321
  }
1012
1322
 
1013
- export namespace SolanaSignMessageRpcInput {
1014
- export interface Params {
1015
- encoding: 'base64';
1323
+ /**
1324
+ * Data returned by the EVM `eth_signTransaction` RPC.
1325
+ */
1326
+ export interface EthereumSignTransactionRpcResponseData {
1327
+ encoding: 'rlp';
1016
1328
 
1017
- message: string;
1018
- }
1329
+ signed_transaction: string;
1019
1330
  }
1020
1331
 
1021
1332
  /**
1022
1333
  * Response to the EVM `eth_signTransaction` RPC.
1023
1334
  */
1024
1335
  export interface EthereumSignTransactionRpcResponse {
1025
- data: EthereumSignTransactionRpcResponse.Data;
1336
+ /**
1337
+ * Data returned by the EVM `eth_signTransaction` RPC.
1338
+ */
1339
+ data: EthereumSignTransactionRpcResponseData;
1026
1340
 
1027
1341
  method: 'eth_signTransaction';
1028
1342
  }
1029
1343
 
1030
- export namespace EthereumSignTransactionRpcResponse {
1031
- export interface Data {
1032
- encoding: 'rlp';
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;
1033
1352
 
1034
- signed_transaction: string;
1035
- }
1353
+ hash: string;
1354
+
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;
1036
1365
  }
1037
1366
 
1038
1367
  /**
1039
1368
  * Response to the EVM `eth_sendTransaction` RPC.
1040
1369
  */
1041
1370
  export interface EthereumSendTransactionRpcResponse {
1042
- data: EthereumSendTransactionRpcResponse.Data;
1371
+ /**
1372
+ * Data returned by the EVM `eth_sendTransaction` RPC.
1373
+ */
1374
+ data: EthereumSendTransactionRpcResponseData;
1043
1375
 
1044
1376
  method: 'eth_sendTransaction';
1045
1377
  }
1046
1378
 
1047
- export namespace EthereumSendTransactionRpcResponse {
1048
- export interface Data {
1049
- caip2: string;
1050
-
1051
- hash: string;
1379
+ /**
1380
+ * Data returned by the EVM `eth_signTypedData_v4` RPC.
1381
+ */
1382
+ export interface EthereumSignTypedDataRpcResponseData {
1383
+ encoding: 'hex';
1052
1384
 
1053
- transaction_id?: string;
1385
+ signature: string;
1386
+ }
1054
1387
 
1055
- transaction_request?: Data.TransactionRequest;
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;
1056
1396
 
1057
- user_operation_hash?: string;
1058
- }
1397
+ method: 'eth_signTypedData_v4';
1398
+ }
1059
1399
 
1060
- export namespace Data {
1061
- export interface TransactionRequest {
1062
- authorization_list?: Array<TransactionRequest.AuthorizationList>;
1400
+ /**
1401
+ * Data returned by the EVM `secp256k1_sign` RPC.
1402
+ */
1403
+ export interface EthereumSecp256k1SignRpcResponseData {
1404
+ encoding: 'hex';
1063
1405
 
1064
- chain_id?: string | number;
1406
+ /**
1407
+ * A hex-encoded string prefixed with '0x'.
1408
+ */
1409
+ signature: Hex;
1410
+ }
1065
1411
 
1066
- data?: string;
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;
1067
1420
 
1068
- from?: string;
1421
+ method: 'secp256k1_sign';
1422
+ }
1069
1423
 
1070
- gas_limit?: string | number;
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
+ }
1071
1434
 
1072
- gas_price?: string | number;
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;
1073
1443
 
1074
- max_fee_per_gas?: string | number;
1444
+ method: 'eth_sign7702Authorization';
1445
+ }
1075
1446
 
1076
- max_priority_fee_per_gas?: string | number;
1447
+ /**
1448
+ * Data returned by the EVM `eth_signUserOperation` RPC.
1449
+ */
1450
+ export interface EthereumSignUserOperationRpcResponseData {
1451
+ encoding: 'hex';
1077
1452
 
1078
- nonce?: string | number;
1453
+ signature: string;
1454
+ }
1079
1455
 
1080
- to?: string;
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;
1081
1464
 
1082
- type?: 0 | 1 | 2 | 4;
1465
+ method: 'eth_signUserOperation';
1466
+ }
1083
1467
 
1084
- value?: string | number;
1085
- }
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;
1086
1476
 
1087
- export namespace TransactionRequest {
1088
- export interface AuthorizationList {
1089
- chain_id: string | number;
1477
+ transaction_id: string;
1478
+ }
1090
1479
 
1091
- contract: string;
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;
1092
1488
 
1093
- nonce: string | number;
1489
+ method: 'wallet_sendCalls';
1490
+ }
1094
1491
 
1095
- r: string;
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;
1096
1504
 
1097
- s: string;
1505
+ /**
1506
+ * Parameters for the SVM `signTransaction` RPC.
1507
+ */
1508
+ export interface SolanaSignTransactionRpcInputParams {
1509
+ encoding: 'base64';
1098
1510
 
1099
- y_parity: number;
1100
- }
1101
- }
1102
- }
1511
+ transaction: string;
1103
1512
  }
1104
1513
 
1105
1514
  /**
1106
- * Response to the EVM `personal_sign` RPC.
1515
+ * Executes the SVM `signTransaction` RPC to sign a transaction.
1107
1516
  */
1108
- export interface EthereumPersonalSignRpcResponse {
1109
- data: EthereumPersonalSignRpcResponse.Data;
1517
+ export interface SolanaSignTransactionRpcInput {
1518
+ method: 'signTransaction';
1110
1519
 
1111
- method: 'personal_sign';
1112
- }
1520
+ /**
1521
+ * Parameters for the SVM `signTransaction` RPC.
1522
+ */
1523
+ params: SolanaSignTransactionRpcInputParams;
1113
1524
 
1114
- export namespace EthereumPersonalSignRpcResponse {
1115
- export interface Data {
1116
- encoding: 'hex';
1525
+ address?: string;
1117
1526
 
1118
- signature: string;
1119
- }
1527
+ chain_type?: 'solana';
1528
+
1529
+ wallet_id?: string;
1120
1530
  }
1121
1531
 
1122
1532
  /**
1123
- * Response to the EVM `eth_signTypedData_v4` RPC.
1533
+ * Parameters for the SVM `signAndSendTransaction` RPC.
1124
1534
  */
1125
- export interface EthereumSignTypedDataRpcResponse {
1126
- data: EthereumSignTypedDataRpcResponse.Data;
1127
-
1128
- method: 'eth_signTypedData_v4';
1129
- }
1130
-
1131
- export namespace EthereumSignTypedDataRpcResponse {
1132
- export interface Data {
1133
- encoding: 'hex';
1535
+ export interface SolanaSignAndSendTransactionRpcInputParams {
1536
+ encoding: 'base64';
1134
1537
 
1135
- signature: string;
1136
- }
1538
+ transaction: string;
1137
1539
  }
1138
1540
 
1139
1541
  /**
1140
- * Response to the EVM `eth_signUserOperation` RPC.
1542
+ * Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
1543
+ * transaction.
1141
1544
  */
1142
- export interface EthereumSignUserOperationRpcResponse {
1143
- data: EthereumSignUserOperationRpcResponse.Data;
1545
+ export interface SolanaSignAndSendTransactionRpcInput {
1546
+ /**
1547
+ * A valid CAIP-2 chain ID (e.g. 'eip155:1').
1548
+ */
1549
+ caip2: AppsAPI.Caip2;
1144
1550
 
1145
- method: 'eth_signUserOperation';
1146
- }
1551
+ method: 'signAndSendTransaction';
1147
1552
 
1148
- export namespace EthereumSignUserOperationRpcResponse {
1149
- export interface Data {
1150
- encoding: 'hex';
1553
+ /**
1554
+ * Parameters for the SVM `signAndSendTransaction` RPC.
1555
+ */
1556
+ params: SolanaSignAndSendTransactionRpcInputParams;
1151
1557
 
1152
- signature: string;
1153
- }
1558
+ address?: string;
1559
+
1560
+ chain_type?: 'solana';
1561
+
1562
+ reference_id?: string;
1563
+
1564
+ sponsor?: boolean;
1565
+
1566
+ wallet_id?: string;
1154
1567
  }
1155
1568
 
1156
1569
  /**
1157
- * Response to the EVM `eth_sign7702Authorization` RPC.
1570
+ * Parameters for the SVM `signMessage` RPC.
1158
1571
  */
1159
- export interface EthereumSign7702AuthorizationRpcResponse {
1160
- data: EthereumSign7702AuthorizationRpcResponse.Data;
1572
+ export interface SolanaSignMessageRpcInputParams {
1573
+ encoding: 'base64';
1161
1574
 
1162
- method: 'eth_sign7702Authorization';
1575
+ message: string;
1163
1576
  }
1164
1577
 
1165
- export namespace EthereumSign7702AuthorizationRpcResponse {
1166
- export interface Data {
1167
- authorization: Data.Authorization;
1168
- }
1169
-
1170
- export namespace Data {
1171
- export interface Authorization {
1172
- chain_id: string | number;
1173
-
1174
- contract: string;
1578
+ /**
1579
+ * Executes the SVM `signMessage` RPC to sign a message.
1580
+ */
1581
+ export interface SolanaSignMessageRpcInput {
1582
+ method: 'signMessage';
1175
1583
 
1176
- nonce: string | number;
1584
+ /**
1585
+ * Parameters for the SVM `signMessage` RPC.
1586
+ */
1587
+ params: SolanaSignMessageRpcInputParams;
1177
1588
 
1178
- r: string;
1589
+ address?: string;
1179
1590
 
1180
- s: string;
1591
+ chain_type?: 'solana';
1181
1592
 
1182
- y_parity: number;
1183
- }
1184
- }
1593
+ wallet_id?: string;
1185
1594
  }
1186
1595
 
1187
1596
  /**
1188
- * Response to the EVM `secp256k1_sign` RPC.
1597
+ * Request body for Solana wallet RPC operations, discriminated by method.
1189
1598
  */
1190
- export interface EthereumSecp256k1SignRpcResponse {
1191
- data: EthereumSecp256k1SignRpcResponse.Data;
1192
-
1193
- method: 'secp256k1_sign';
1194
- }
1599
+ export type SolanaRpcInput =
1600
+ | SolanaSignTransactionRpcInput
1601
+ | SolanaSignAndSendTransactionRpcInput
1602
+ | SolanaSignMessageRpcInput;
1195
1603
 
1196
- export namespace EthereumSecp256k1SignRpcResponse {
1197
- export interface Data {
1198
- encoding: 'hex';
1604
+ /**
1605
+ * Data returned by the SVM `signTransaction` RPC.
1606
+ */
1607
+ export interface SolanaSignTransactionRpcResponseData {
1608
+ encoding: 'base64';
1199
1609
 
1200
- signature: string;
1201
- }
1610
+ signed_transaction: string;
1202
1611
  }
1203
1612
 
1204
1613
  /**
1205
1614
  * Response to the SVM `signTransaction` RPC.
1206
1615
  */
1207
1616
  export interface SolanaSignTransactionRpcResponse {
1208
- data: SolanaSignTransactionRpcResponse.Data;
1617
+ /**
1618
+ * Data returned by the SVM `signTransaction` RPC.
1619
+ */
1620
+ data: SolanaSignTransactionRpcResponseData;
1209
1621
 
1210
1622
  method: 'signTransaction';
1211
1623
  }
1212
1624
 
1213
- export namespace SolanaSignTransactionRpcResponse {
1214
- export interface Data {
1215
- encoding: 'base64';
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;
1216
1633
 
1217
- signed_transaction: string;
1218
- }
1634
+ hash: string;
1635
+
1636
+ reference_id?: string | null;
1637
+
1638
+ transaction_id?: string;
1219
1639
  }
1220
1640
 
1221
1641
  /**
1222
1642
  * Response to the SVM `signAndSendTransaction` RPC.
1223
1643
  */
1224
1644
  export interface SolanaSignAndSendTransactionRpcResponse {
1225
- data: SolanaSignAndSendTransactionRpcResponse.Data;
1645
+ /**
1646
+ * Data returned by the SVM `signAndSendTransaction` RPC.
1647
+ */
1648
+ data: SolanaSignAndSendTransactionRpcResponseData;
1226
1649
 
1227
1650
  method: 'signAndSendTransaction';
1228
1651
  }
1229
1652
 
1230
- export namespace SolanaSignAndSendTransactionRpcResponse {
1231
- export interface Data {
1232
- caip2: string;
1233
-
1234
- hash: string;
1653
+ /**
1654
+ * Data returned by the SVM `signMessage` RPC.
1655
+ */
1656
+ export interface SolanaSignMessageRpcResponseData {
1657
+ encoding: 'base64';
1235
1658
 
1236
- transaction_id?: string;
1237
- }
1659
+ signature: string;
1238
1660
  }
1239
1661
 
1240
1662
  /**
1241
1663
  * Response to the SVM `signMessage` RPC.
1242
1664
  */
1243
1665
  export interface SolanaSignMessageRpcResponse {
1244
- data: SolanaSignMessageRpcResponse.Data;
1666
+ /**
1667
+ * Data returned by the SVM `signMessage` RPC.
1668
+ */
1669
+ data: SolanaSignMessageRpcResponseData;
1245
1670
 
1246
1671
  method: 'signMessage';
1247
1672
  }
1248
1673
 
1249
- export namespace SolanaSignMessageRpcResponse {
1250
- export interface Data {
1251
- encoding: 'base64';
1674
+ /**
1675
+ * Response body for Solana wallet RPC operations, discriminated by method.
1676
+ */
1677
+ export type SolanaRpcResponse =
1678
+ | SolanaSignMessageRpcResponse
1679
+ | SolanaSignTransactionRpcResponse
1680
+ | SolanaSignAndSendTransactionRpcResponse;
1252
1681
 
1253
- signature: string;
1254
- }
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>;
1692
+
1693
+ public_key: string;
1694
+
1695
+ public_shares: { [key: string]: string };
1696
+
1697
+ threshold: number;
1698
+
1699
+ updated_time: string;
1255
1700
  }
1256
1701
 
1257
- export interface WalletExportResponse {
1258
- /**
1259
- * The encrypted private key.
1260
- */
1261
- ciphertext: string;
1702
+ /**
1703
+ * A Spark wallet leaf node.
1704
+ */
1705
+ export interface SparkWalletLeaf {
1706
+ id: string;
1262
1707
 
1263
1708
  /**
1264
- * The base64-encoded encapsulated key that was generated during encryption, for
1265
- * use during decryption.
1709
+ * The Spark network.
1266
1710
  */
1267
- encapsulated_key: string;
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;
1268
1730
 
1269
1731
  /**
1270
- * The encryption type of the wallet to import. Currently only supports `HPKE`.
1732
+ * A Spark signing keyshare.
1271
1733
  */
1272
- encryption_type: 'HPKE';
1734
+ signing_keyshare?: SparkSigningKeyshare;
1273
1735
  }
1274
1736
 
1275
- export interface WalletInitImportResponse {
1276
- /**
1277
- * The base64-encoded encryption public key to encrypt the wallet entropy with.
1278
- */
1279
- encryption_public_key: string;
1737
+ /**
1738
+ * A Spark transfer leaf.
1739
+ */
1740
+ export interface SparkTransferLeaf {
1741
+ intermediate_refund_tx: string;
1742
+
1743
+ secret_cipher: string;
1744
+
1745
+ signature: string;
1280
1746
 
1281
1747
  /**
1282
- * The encryption type of the wallet to import. Currently only supports `HPKE`.
1748
+ * A Spark wallet leaf node.
1283
1749
  */
1284
- encryption_type: 'HPKE';
1750
+ leaf?: SparkWalletLeaf;
1285
1751
  }
1286
1752
 
1287
- export interface WalletRawSignResponse {
1288
- data: WalletRawSignResponse.Data;
1753
+ /**
1754
+ * A Spark transfer.
1755
+ */
1756
+ export interface SparkTransfer {
1757
+ id: string;
1289
1758
 
1290
- method: 'raw_sign';
1291
- }
1759
+ leaves: Array<SparkTransferLeaf>;
1292
1760
 
1293
- export namespace WalletRawSignResponse {
1294
- export interface Data {
1295
- encoding: 'hex';
1761
+ receiver_identity_public_key: string;
1296
1762
 
1297
- signature: string;
1298
- }
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;
1299
1778
  }
1300
1779
 
1301
1780
  /**
1302
- * Response to the EVM `personal_sign` RPC.
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.
1303
2598
  */
1304
2599
  export type WalletRpcResponse =
1305
2600
  | EthereumPersonalSignRpcResponse
@@ -1309,9 +2604,206 @@ export type WalletRpcResponse =
1309
2604
  | EthereumSignUserOperationRpcResponse
1310
2605
  | EthereumSign7702AuthorizationRpcResponse
1311
2606
  | EthereumSecp256k1SignRpcResponse
2607
+ | EthereumSendCallsRpcResponse
1312
2608
  | SolanaSignMessageRpcResponse
1313
2609
  | SolanaSignTransactionRpcResponse
1314
- | 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
+ }
2777
+
2778
+ export interface WalletExportResponse {
2779
+ /**
2780
+ * The encrypted private key.
2781
+ */
2782
+ ciphertext: string;
2783
+
2784
+ /**
2785
+ * The base64-encoded encapsulated key that was generated during encryption, for
2786
+ * use during decryption.
2787
+ */
2788
+ encapsulated_key: string;
2789
+
2790
+ /**
2791
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
2792
+ */
2793
+ encryption_type: HpkeEncryption;
2794
+ }
2795
+
2796
+ export interface WalletInitImportResponse {
2797
+ /**
2798
+ * The base64-encoded encryption public key to encrypt the wallet entropy with.
2799
+ */
2800
+ encryption_public_key: string;
2801
+
2802
+ /**
2803
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
2804
+ */
2805
+ encryption_type: HpkeEncryption;
2806
+ }
1315
2807
 
1316
2808
  export type WalletAuthenticateWithJwtResponse =
1317
2809
  | WalletAuthenticateWithJwtResponse.WithEncryption
@@ -1392,62 +2884,42 @@ export interface WalletCreateParams {
1392
2884
  /**
1393
2885
  * Body param: Additional signers for the wallet.
1394
2886
  */
1395
- additional_signers?: Array<WalletCreateParams.AdditionalSigner>;
2887
+ additional_signers?: AdditionalSignerInput;
1396
2888
 
1397
2889
  /**
1398
- * Body param: The owner of the resource. If you provide this, do not specify an
1399
- * owner_id as it will be generated automatically. When updating a wallet, you can
1400
- * set the owner to null to remove the owner.
2890
+ * Body param: A human-readable label for the wallet.
1401
2891
  */
1402
- owner?: WalletCreateParams.PublicKeyOwner | WalletCreateParams.UserOwner | null;
2892
+ display_name?: string;
1403
2893
 
1404
2894
  /**
1405
- * Body param: The key quorum ID to set as the owner of the resource. If you
1406
- * provide this, do not specify an owner.
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.
1407
2898
  */
1408
- owner_id?: string;
2899
+ external_id?: string;
1409
2900
 
1410
2901
  /**
1411
- * Body param: List of policy IDs for policies that should be enforced on the
1412
- * wallet. Currently, only one policy is supported per wallet.
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.
1413
2904
  */
1414
- policy_ids?: Array<string>;
2905
+ owner?: SharedAPI.OwnerInput | null;
1415
2906
 
1416
2907
  /**
1417
- * Header param: Idempotency keys ensure API requests are executed only once within
1418
- * a 24-hour window.
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.
1419
2910
  */
1420
- 'privy-idempotency-key'?: string;
1421
- }
1422
-
1423
- export namespace WalletCreateParams {
1424
- export interface AdditionalSigner {
1425
- signer_id: string;
1426
-
1427
- /**
1428
- * The array of policy IDs that will be applied to wallet requests. If specified,
1429
- * this will override the base policy IDs set on the wallet.
1430
- */
1431
- override_policy_ids?: Array<string>;
1432
- }
2911
+ owner_id?: SharedAPI.OwnerIDInput | null;
1433
2912
 
1434
2913
  /**
1435
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
1436
- * If you provide this, do not specify an owner_id as it will be generated
1437
- * automatically.
2914
+ * Body param: An optional list of up to one policy ID to enforce on the wallet.
1438
2915
  */
1439
- export interface PublicKeyOwner {
1440
- public_key: string;
1441
- }
2916
+ policy_ids?: PolicyInput;
1442
2917
 
1443
2918
  /**
1444
- * The user ID of the owner of the resource. The user must already exist, and this
1445
- * value must start with "did:privy:". If you provide this, do not specify an
1446
- * 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.
1447
2921
  */
1448
- export interface UserOwner {
1449
- user_id: string;
1450
- }
2922
+ 'privy-idempotency-key'?: string;
1451
2923
  }
1452
2924
 
1453
2925
  export interface WalletListParams extends CursorParams {
@@ -1463,6 +2935,11 @@ export interface WalletListParams extends CursorParams {
1463
2935
  */
1464
2936
  chain_type?: WalletChainType;
1465
2937
 
2938
+ /**
2939
+ * Filter wallets by external ID.
2940
+ */
2941
+ external_id?: string;
2942
+
1466
2943
  /**
1467
2944
  * Filter wallets by user ID. Cannot be used together with authorization_key.
1468
2945
  */
@@ -1474,7 +2951,7 @@ export interface WalletExportParams {
1474
2951
  * Body param: The encryption type of the wallet to import. Currently only supports
1475
2952
  * `HPKE`.
1476
2953
  */
1477
- encryption_type: 'HPKE';
2954
+ encryption_type: HpkeEncryption;
1478
2955
 
1479
2956
  /**
1480
2957
  * Body param: The base64-encoded encryption public key to encrypt the wallet
@@ -1482,141 +2959,378 @@ export interface WalletExportParams {
1482
2959
  */
1483
2960
  recipient_public_key: string;
1484
2961
 
2962
+ /**
2963
+ * Body param
2964
+ */
2965
+ export_seed_phrase?: boolean;
2966
+
1485
2967
  /**
1486
2968
  * Header param: Request authorization signature. If multiple signatures are
1487
2969
  * required, they should be comma separated.
1488
2970
  */
1489
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;
1490
2978
  }
1491
2979
 
1492
2980
  export type WalletInitImportParams =
1493
2981
  | WalletInitImportParams.HDInitInput
1494
2982
  | WalletInitImportParams.PrivateKeyInitInput;
1495
2983
 
1496
- export declare namespace WalletInitImportParams {
1497
- 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
+
1498
3240
  /**
1499
- * The address of the wallet to import.
3241
+ * Body param: Parameters for the EVM `eth_signTypedData_v4` RPC.
1500
3242
  */
1501
- address: string;
3243
+ params: EthereumSignTypedDataRpcInputParams;
1502
3244
 
1503
3245
  /**
1504
- * The chain type of the wallet to import. Currently supports `ethereum` and
1505
- * `solana`.
3246
+ * Body param
1506
3247
  */
1507
- chain_type: 'ethereum' | 'solana';
3248
+ address?: string;
1508
3249
 
1509
3250
  /**
1510
- * The encryption type of the wallet to import. Currently only supports `HPKE`.
3251
+ * Body param
1511
3252
  */
1512
- encryption_type: 'HPKE';
3253
+ chain_type?: 'ethereum';
1513
3254
 
1514
3255
  /**
1515
- * The entropy type of the wallet to import.
3256
+ * Body param
1516
3257
  */
1517
- entropy_type: 'hd';
3258
+ wallet_id?: string;
1518
3259
 
1519
3260
  /**
1520
- * The index of the wallet to import.
3261
+ * Header param: Request authorization signature. If multiple signatures are
3262
+ * required, they should be comma separated.
1521
3263
  */
1522
- index: number;
1523
- }
3264
+ 'privy-authorization-signature'?: string;
1524
3265
 
1525
- export interface PrivateKeyInitInput {
1526
3266
  /**
1527
- * The address of the wallet to import.
3267
+ * Header param: Idempotency keys ensure API requests are executed only once within
3268
+ * a 24-hour window.
1528
3269
  */
1529
- address: string;
3270
+ 'privy-idempotency-key'?: string;
1530
3271
 
1531
3272
  /**
1532
- * The chain type of the wallet to import. Currently supports `ethereum` and
1533
- * `solana`.
3273
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3274
+ * representing the deadline by which the request must be processed.
1534
3275
  */
1535
- chain_type: 'ethereum' | 'solana';
3276
+ 'privy-request-expiry'?: string;
3277
+ }
1536
3278
 
3279
+ export interface EthereumSecp256k1SignRpcInput {
1537
3280
  /**
1538
- * The encryption type of the wallet to import. Currently only supports `HPKE`.
3281
+ * Body param
1539
3282
  */
1540
- encryption_type: 'HPKE';
1541
-
1542
- entropy_type: 'private-key';
1543
- }
1544
- }
3283
+ method: 'secp256k1_sign';
1545
3284
 
1546
- export interface WalletRawSignParams {
1547
- /**
1548
- * Body param: Sign a pre-computed hash
1549
- */
1550
- params: WalletRawSignParams.Hash | WalletRawSignParams.Bytes;
3285
+ /**
3286
+ * Body param: Parameters for the EVM `secp256k1_sign` RPC.
3287
+ */
3288
+ params: EthereumSecp256k1SignRpcInputParams;
1551
3289
 
1552
- /**
1553
- * Header param: Request authorization signature. If multiple signatures are
1554
- * required, they should be comma separated.
1555
- */
1556
- 'privy-authorization-signature'?: string;
3290
+ /**
3291
+ * Body param
3292
+ */
3293
+ address?: string;
1557
3294
 
1558
- /**
1559
- * Header param: Idempotency keys ensure API requests are executed only once within
1560
- * a 24-hour window.
1561
- */
1562
- 'privy-idempotency-key'?: string;
1563
- }
3295
+ /**
3296
+ * Body param
3297
+ */
3298
+ chain_type?: 'ethereum';
1564
3299
 
1565
- export namespace WalletRawSignParams {
1566
- /**
1567
- * Sign a pre-computed hash
1568
- */
1569
- export interface Hash {
1570
3300
  /**
1571
- * The hash to sign. Must start with `0x`.
3301
+ * Body param
1572
3302
  */
1573
- hash: string;
1574
- }
3303
+ wallet_id?: string;
1575
3304
 
1576
- /**
1577
- * Hash and sign bytes using the specified encoding and hash function.
1578
- */
1579
- export interface Bytes {
1580
3305
  /**
1581
- * The bytes to hash and sign.
3306
+ * Header param: Request authorization signature. If multiple signatures are
3307
+ * required, they should be comma separated.
1582
3308
  */
1583
- bytes: string;
3309
+ 'privy-authorization-signature'?: string;
1584
3310
 
1585
3311
  /**
1586
- * The encoding scheme for the bytes.
3312
+ * Header param: Idempotency keys ensure API requests are executed only once within
3313
+ * a 24-hour window.
1587
3314
  */
1588
- encoding: 'utf-8' | 'hex' | 'base64';
3315
+ 'privy-idempotency-key'?: string;
1589
3316
 
1590
3317
  /**
1591
- * The hash function to hash the bytes.
3318
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3319
+ * representing the deadline by which the request must be processed.
1592
3320
  */
1593
- hash_function: 'keccak256' | 'sha256' | 'blake2b256';
3321
+ 'privy-request-expiry'?: string;
1594
3322
  }
1595
- }
1596
-
1597
- export type WalletRpcParams =
1598
- | WalletRpcParams.EthereumPersonalSignRpcInput
1599
- | WalletRpcParams.EthereumSignTypedDataRpcInput
1600
- | WalletRpcParams.EthereumSignTransactionRpcInput
1601
- | WalletRpcParams.EthereumSignUserOperationRpcInput
1602
- | WalletRpcParams.EthereumSendTransactionRpcInput
1603
- | WalletRpcParams.EthereumSign7702AuthorizationRpcInput
1604
- | WalletRpcParams.EthereumSecp256k1SignRpcInput
1605
- | WalletRpcParams.SolanaSignMessageRpcInput
1606
- | WalletRpcParams.SolanaSignTransactionRpcInput
1607
- | WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
1608
3323
 
1609
- export declare namespace WalletRpcParams {
1610
- export interface EthereumPersonalSignRpcInput {
3324
+ export interface EthereumSign7702AuthorizationRpcInput {
1611
3325
  /**
1612
3326
  * Body param
1613
3327
  */
1614
- method: 'personal_sign';
3328
+ method: 'eth_sign7702Authorization';
1615
3329
 
1616
3330
  /**
1617
- * Body param
3331
+ * Body param: Parameters for the EVM `eth_sign7702Authorization` RPC.
1618
3332
  */
1619
- params: EthereumPersonalSignRpcInput.Params;
3333
+ params: EthereumSign7702AuthorizationRpcInputParams;
1620
3334
 
1621
3335
  /**
1622
3336
  * Body param
@@ -1628,6 +3342,11 @@ export declare namespace WalletRpcParams {
1628
3342
  */
1629
3343
  chain_type?: 'ethereum';
1630
3344
 
3345
+ /**
3346
+ * Body param
3347
+ */
3348
+ wallet_id?: string;
3349
+
1631
3350
  /**
1632
3351
  * Header param: Request authorization signature. If multiple signatures are
1633
3352
  * required, they should be comma separated.
@@ -1639,26 +3358,24 @@ export declare namespace WalletRpcParams {
1639
3358
  * a 24-hour window.
1640
3359
  */
1641
3360
  'privy-idempotency-key'?: string;
1642
- }
1643
3361
 
1644
- export namespace EthereumPersonalSignRpcInput {
1645
- export interface Params {
1646
- encoding: 'utf-8' | 'hex';
1647
-
1648
- message: string;
1649
- }
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;
1650
3367
  }
1651
3368
 
1652
- export interface EthereumSignTypedDataRpcInput {
3369
+ export interface EthereumSignUserOperationRpcInput {
1653
3370
  /**
1654
3371
  * Body param
1655
3372
  */
1656
- method: 'eth_signTypedData_v4';
3373
+ method: 'eth_signUserOperation';
1657
3374
 
1658
3375
  /**
1659
- * Body param
3376
+ * Body param: Parameters for the EVM `eth_signUserOperation` RPC.
1660
3377
  */
1661
- params: EthereumSignTypedDataRpcInput.Params;
3378
+ params: EthereumSignUserOperationRpcInputParams;
1662
3379
 
1663
3380
  /**
1664
3381
  * Body param
@@ -1670,6 +3387,11 @@ export declare namespace WalletRpcParams {
1670
3387
  */
1671
3388
  chain_type?: 'ethereum';
1672
3389
 
3390
+ /**
3391
+ * Body param
3392
+ */
3393
+ wallet_id?: string;
3394
+
1673
3395
  /**
1674
3396
  * Header param: Request authorization signature. If multiple signatures are
1675
3397
  * required, they should be comma separated.
@@ -1681,44 +3403,79 @@ export declare namespace WalletRpcParams {
1681
3403
  * a 24-hour window.
1682
3404
  */
1683
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;
1684
3412
  }
1685
3413
 
1686
- export namespace EthereumSignTypedDataRpcInput {
1687
- export interface Params {
1688
- typed_data: Params.TypedData;
1689
- }
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;
1690
3434
 
1691
- export namespace Params {
1692
- export interface TypedData {
1693
- domain: { [key: string]: unknown };
3435
+ /**
3436
+ * Body param
3437
+ */
3438
+ chain_type?: 'ethereum';
1694
3439
 
1695
- message: { [key: string]: unknown };
3440
+ /**
3441
+ * Body param
3442
+ */
3443
+ sponsor?: boolean;
1696
3444
 
1697
- primary_type: string;
3445
+ /**
3446
+ * Body param
3447
+ */
3448
+ wallet_id?: string;
1698
3449
 
1699
- types: { [key: string]: Array<TypedData.Type> };
1700
- }
3450
+ /**
3451
+ * Header param: Request authorization signature. If multiple signatures are
3452
+ * required, they should be comma separated.
3453
+ */
3454
+ 'privy-authorization-signature'?: string;
1701
3455
 
1702
- export namespace TypedData {
1703
- export interface Type {
1704
- name: string;
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;
1705
3461
 
1706
- type: string;
1707
- }
1708
- }
1709
- }
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;
1710
3467
  }
1711
3468
 
1712
- export interface EthereumSignTransactionRpcInput {
3469
+ export interface SolanaSignTransactionRpcInput {
1713
3470
  /**
1714
3471
  * Body param
1715
3472
  */
1716
- method: 'eth_signTransaction';
3473
+ method: 'signTransaction';
1717
3474
 
1718
3475
  /**
1719
- * Body param
3476
+ * Body param: Parameters for the SVM `signTransaction` RPC.
1720
3477
  */
1721
- params: EthereumSignTransactionRpcInput.Params;
3478
+ params: SolanaSignTransactionRpcInputParams;
1722
3479
 
1723
3480
  /**
1724
3481
  * Body param
@@ -1728,7 +3485,12 @@ export declare namespace WalletRpcParams {
1728
3485
  /**
1729
3486
  * Body param
1730
3487
  */
1731
- chain_type?: 'ethereum';
3488
+ chain_type?: 'solana';
3489
+
3490
+ /**
3491
+ * Body param
3492
+ */
3493
+ wallet_id?: string;
1732
3494
 
1733
3495
  /**
1734
3496
  * Header param: Request authorization signature. If multiple signatures are
@@ -1741,78 +3503,164 @@ export declare namespace WalletRpcParams {
1741
3503
  * a 24-hour window.
1742
3504
  */
1743
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;
1744
3512
  }
1745
3513
 
1746
- export namespace EthereumSignTransactionRpcInput {
1747
- export interface Params {
1748
- transaction: Params.Transaction;
1749
- }
3514
+ export interface SolanaSignAndSendTransactionRpcInput {
3515
+ /**
3516
+ * Body param: A valid CAIP-2 chain ID (e.g. 'eip155:1').
3517
+ */
3518
+ caip2: AppsAPI.Caip2;
1750
3519
 
1751
- export namespace Params {
1752
- export interface Transaction {
1753
- authorization_list?: Array<Transaction.AuthorizationList>;
3520
+ /**
3521
+ * Body param
3522
+ */
3523
+ method: 'signAndSendTransaction';
1754
3524
 
1755
- chain_id?: string | number;
3525
+ /**
3526
+ * Body param: Parameters for the SVM `signAndSendTransaction` RPC.
3527
+ */
3528
+ params: SolanaSignAndSendTransactionRpcInputParams;
1756
3529
 
1757
- data?: string;
3530
+ /**
3531
+ * Body param
3532
+ */
3533
+ address?: string;
1758
3534
 
1759
- from?: string;
3535
+ /**
3536
+ * Body param
3537
+ */
3538
+ chain_type?: 'solana';
1760
3539
 
1761
- gas_limit?: string | number;
3540
+ /**
3541
+ * Body param
3542
+ */
3543
+ reference_id?: string;
1762
3544
 
1763
- gas_price?: string | number;
3545
+ /**
3546
+ * Body param
3547
+ */
3548
+ sponsor?: boolean;
1764
3549
 
1765
- max_fee_per_gas?: string | number;
3550
+ /**
3551
+ * Body param
3552
+ */
3553
+ wallet_id?: string;
1766
3554
 
1767
- max_priority_fee_per_gas?: string | number;
3555
+ /**
3556
+ * Header param: Request authorization signature. If multiple signatures are
3557
+ * required, they should be comma separated.
3558
+ */
3559
+ 'privy-authorization-signature'?: string;
1768
3560
 
1769
- nonce?: string | number;
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;
1770
3566
 
1771
- to?: string;
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
+ }
1772
3573
 
1773
- type?: 0 | 1 | 2 | 4;
3574
+ export interface SolanaSignMessageRpcInput {
3575
+ /**
3576
+ * Body param
3577
+ */
3578
+ method: 'signMessage';
1774
3579
 
1775
- value?: string | number;
1776
- }
3580
+ /**
3581
+ * Body param: Parameters for the SVM `signMessage` RPC.
3582
+ */
3583
+ params: SolanaSignMessageRpcInputParams;
1777
3584
 
1778
- export namespace Transaction {
1779
- export interface AuthorizationList {
1780
- chain_id: string | number;
3585
+ /**
3586
+ * Body param
3587
+ */
3588
+ address?: string;
1781
3589
 
1782
- contract: string;
3590
+ /**
3591
+ * Body param
3592
+ */
3593
+ chain_type?: 'solana';
1783
3594
 
1784
- nonce: string | number;
3595
+ /**
3596
+ * Body param
3597
+ */
3598
+ wallet_id?: string;
1785
3599
 
1786
- r: string;
3600
+ /**
3601
+ * Header param: Request authorization signature. If multiple signatures are
3602
+ * required, they should be comma separated.
3603
+ */
3604
+ 'privy-authorization-signature'?: string;
1787
3605
 
1788
- s: string;
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;
1789
3611
 
1790
- y_parity: number;
1791
- }
1792
- }
1793
- }
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;
1794
3617
  }
1795
3618
 
1796
- export interface EthereumSignUserOperationRpcInput {
3619
+ export interface SparkTransferRpcInput {
1797
3620
  /**
1798
3621
  * Body param
1799
3622
  */
1800
- method: 'eth_signUserOperation';
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;
1801
3646
 
1802
3647
  /**
1803
- * Body param
3648
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3649
+ * representing the deadline by which the request must be processed.
1804
3650
  */
1805
- params: EthereumSignUserOperationRpcInput.Params;
3651
+ 'privy-request-expiry'?: string;
3652
+ }
1806
3653
 
3654
+ export interface SparkGetBalanceRpcInput {
1807
3655
  /**
1808
3656
  * Body param
1809
3657
  */
1810
- address?: string;
3658
+ method: 'getBalance';
1811
3659
 
1812
3660
  /**
1813
- * Body param
3661
+ * Body param: The Spark network.
1814
3662
  */
1815
- chain_type?: 'ethereum';
3663
+ network?: SparkNetwork;
1816
3664
 
1817
3665
  /**
1818
3666
  * Header param: Request authorization signature. If multiple signatures are
@@ -1825,76 +3673,59 @@ export declare namespace WalletRpcParams {
1825
3673
  * a 24-hour window.
1826
3674
  */
1827
3675
  'privy-idempotency-key'?: string;
1828
- }
1829
-
1830
- export namespace EthereumSignUserOperationRpcInput {
1831
- export interface Params {
1832
- chain_id: string | number;
1833
-
1834
- contract: string;
1835
-
1836
- user_operation: Params.UserOperation;
1837
- }
1838
-
1839
- export namespace Params {
1840
- export interface UserOperation {
1841
- call_data: string;
1842
-
1843
- call_gas_limit: string;
1844
-
1845
- max_fee_per_gas: string;
1846
-
1847
- max_priority_fee_per_gas: string;
1848
-
1849
- nonce: string;
1850
3676
 
1851
- paymaster: string;
1852
-
1853
- paymaster_data: string;
1854
-
1855
- paymaster_post_op_gas_limit: string;
1856
-
1857
- paymaster_verification_gas_limit: string;
1858
-
1859
- pre_verification_gas: string;
1860
-
1861
- sender: string;
1862
-
1863
- verification_gas_limit: string;
1864
- }
1865
- }
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;
1866
3682
  }
1867
3683
 
1868
- export interface EthereumSendTransactionRpcInput {
3684
+ export interface SparkTransferTokensRpcInput {
1869
3685
  /**
1870
3686
  * Body param
1871
3687
  */
1872
- caip2: string;
3688
+ method: 'transferTokens';
1873
3689
 
1874
3690
  /**
1875
- * Body param
3691
+ * Body param: Parameters for the Spark `transferTokens` RPC.
1876
3692
  */
1877
- method: 'eth_sendTransaction';
3693
+ params: SparkTransferTokensRpcInputParams;
1878
3694
 
1879
3695
  /**
1880
- * Body param
3696
+ * Body param: The Spark network.
1881
3697
  */
1882
- params: EthereumSendTransactionRpcInput.Params;
3698
+ network?: SparkNetwork;
1883
3699
 
1884
3700
  /**
1885
- * Body param
3701
+ * Header param: Request authorization signature. If multiple signatures are
3702
+ * required, they should be comma separated.
1886
3703
  */
1887
- address?: string;
3704
+ 'privy-authorization-signature'?: string;
1888
3705
 
1889
3706
  /**
1890
- * Body param
3707
+ * Header param: Idempotency keys ensure API requests are executed only once within
3708
+ * a 24-hour window.
1891
3709
  */
1892
- chain_type?: 'ethereum';
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
+ }
1893
3718
 
3719
+ export interface SparkGetStaticDepositAddressRpcInput {
1894
3720
  /**
1895
3721
  * Body param
1896
3722
  */
1897
- sponsor?: boolean;
3723
+ method: 'getStaticDepositAddress';
3724
+
3725
+ /**
3726
+ * Body param: The Spark network.
3727
+ */
3728
+ network?: SparkNetwork;
1898
3729
 
1899
3730
  /**
1900
3731
  * Header param: Request authorization signature. If multiple signatures are
@@ -1907,78 +3738,64 @@ export declare namespace WalletRpcParams {
1907
3738
  * a 24-hour window.
1908
3739
  */
1909
3740
  'privy-idempotency-key'?: string;
1910
- }
1911
3741
 
1912
- export namespace EthereumSendTransactionRpcInput {
1913
- export interface Params {
1914
- transaction: Params.Transaction;
1915
- }
1916
-
1917
- export namespace Params {
1918
- export interface Transaction {
1919
- authorization_list?: Array<Transaction.AuthorizationList>;
1920
-
1921
- chain_id?: string | number;
1922
-
1923
- data?: string;
1924
-
1925
- from?: string;
1926
-
1927
- gas_limit?: string | number;
1928
-
1929
- gas_price?: string | number;
1930
-
1931
- max_fee_per_gas?: string | number;
1932
-
1933
- max_priority_fee_per_gas?: string | number;
1934
-
1935
- nonce?: string | number;
1936
-
1937
- to?: string;
1938
-
1939
- type?: 0 | 1 | 2 | 4;
1940
-
1941
- value?: string | number;
1942
- }
1943
-
1944
- export namespace Transaction {
1945
- export interface AuthorizationList {
1946
- 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
+ }
1947
3748
 
1948
- contract: string;
3749
+ export interface SparkGetClaimStaticDepositQuoteRpcInput {
3750
+ /**
3751
+ * Body param
3752
+ */
3753
+ method: 'getClaimStaticDepositQuote';
1949
3754
 
1950
- nonce: string | number;
3755
+ /**
3756
+ * Body param: Parameters for the Spark `getClaimStaticDepositQuote` RPC.
3757
+ */
3758
+ params: SparkGetClaimStaticDepositQuoteRpcInputParams;
1951
3759
 
1952
- r: string;
3760
+ /**
3761
+ * Body param: The Spark network.
3762
+ */
3763
+ network?: SparkNetwork;
1953
3764
 
1954
- s: string;
3765
+ /**
3766
+ * Header param: Request authorization signature. If multiple signatures are
3767
+ * required, they should be comma separated.
3768
+ */
3769
+ 'privy-authorization-signature'?: string;
1955
3770
 
1956
- y_parity: number;
1957
- }
1958
- }
1959
- }
1960
- }
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;
1961
3776
 
1962
- export interface EthereumSign7702AuthorizationRpcInput {
1963
3777
  /**
1964
- * Body param
3778
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3779
+ * representing the deadline by which the request must be processed.
1965
3780
  */
1966
- method: 'eth_sign7702Authorization';
3781
+ 'privy-request-expiry'?: string;
3782
+ }
1967
3783
 
3784
+ export interface SparkClaimStaticDepositRpcInput {
1968
3785
  /**
1969
3786
  * Body param
1970
3787
  */
1971
- params: EthereumSign7702AuthorizationRpcInput.Params;
3788
+ method: 'claimStaticDeposit';
1972
3789
 
1973
3790
  /**
1974
- * Body param
3791
+ * Body param: Parameters for the Spark `claimStaticDeposit` RPC.
1975
3792
  */
1976
- address?: string;
3793
+ params: SparkClaimStaticDepositRpcInputParams;
1977
3794
 
1978
3795
  /**
1979
- * Body param
3796
+ * Body param: The Spark network.
1980
3797
  */
1981
- chain_type?: 'ethereum';
3798
+ network?: SparkNetwork;
1982
3799
 
1983
3800
  /**
1984
3801
  * Header param: Request authorization signature. If multiple signatures are
@@ -1991,38 +3808,29 @@ export declare namespace WalletRpcParams {
1991
3808
  * a 24-hour window.
1992
3809
  */
1993
3810
  'privy-idempotency-key'?: string;
1994
- }
1995
-
1996
- export namespace EthereumSign7702AuthorizationRpcInput {
1997
- export interface Params {
1998
- chain_id: string | number;
1999
-
2000
- contract: string;
2001
-
2002
- nonce?: string | number;
2003
- }
2004
- }
2005
3811
 
2006
- export interface EthereumSecp256k1SignRpcInput {
2007
3812
  /**
2008
- * Body param
3813
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3814
+ * representing the deadline by which the request must be processed.
2009
3815
  */
2010
- method: 'secp256k1_sign';
3816
+ 'privy-request-expiry'?: string;
3817
+ }
2011
3818
 
3819
+ export interface SparkCreateLightningInvoiceRpcInput {
2012
3820
  /**
2013
3821
  * Body param
2014
3822
  */
2015
- params: EthereumSecp256k1SignRpcInput.Params;
3823
+ method: 'createLightningInvoice';
2016
3824
 
2017
3825
  /**
2018
- * Body param
3826
+ * Body param: Parameters for the Spark `createLightningInvoice` RPC.
2019
3827
  */
2020
- address?: string;
3828
+ params: SparkCreateLightningInvoiceRpcInputParams;
2021
3829
 
2022
3830
  /**
2023
- * Body param
3831
+ * Body param: The Spark network.
2024
3832
  */
2025
- chain_type?: 'ethereum';
3833
+ network?: SparkNetwork;
2026
3834
 
2027
3835
  /**
2028
3836
  * Header param: Request authorization signature. If multiple signatures are
@@ -2035,34 +3843,29 @@ export declare namespace WalletRpcParams {
2035
3843
  * a 24-hour window.
2036
3844
  */
2037
3845
  'privy-idempotency-key'?: string;
2038
- }
2039
-
2040
- export namespace EthereumSecp256k1SignRpcInput {
2041
- export interface Params {
2042
- hash: string;
2043
- }
2044
- }
2045
3846
 
2046
- export interface SolanaSignMessageRpcInput {
2047
3847
  /**
2048
- * Body param
3848
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3849
+ * representing the deadline by which the request must be processed.
2049
3850
  */
2050
- method: 'signMessage';
3851
+ 'privy-request-expiry'?: string;
3852
+ }
2051
3853
 
3854
+ export interface SparkPayLightningInvoiceRpcInput {
2052
3855
  /**
2053
3856
  * Body param
2054
3857
  */
2055
- params: SolanaSignMessageRpcInput.Params;
3858
+ method: 'payLightningInvoice';
2056
3859
 
2057
3860
  /**
2058
- * Body param
3861
+ * Body param: Parameters for the Spark `payLightningInvoice` RPC.
2059
3862
  */
2060
- address?: string;
3863
+ params: SparkPayLightningInvoiceRpcInputParams;
2061
3864
 
2062
3865
  /**
2063
- * Body param
3866
+ * Body param: The Spark network.
2064
3867
  */
2065
- chain_type?: 'solana';
3868
+ network?: SparkNetwork;
2066
3869
 
2067
3870
  /**
2068
3871
  * Header param: Request authorization signature. If multiple signatures are
@@ -2075,36 +3878,29 @@ export declare namespace WalletRpcParams {
2075
3878
  * a 24-hour window.
2076
3879
  */
2077
3880
  'privy-idempotency-key'?: string;
2078
- }
2079
-
2080
- export namespace SolanaSignMessageRpcInput {
2081
- export interface Params {
2082
- encoding: 'base64';
2083
3881
 
2084
- message: string;
2085
- }
2086
- }
2087
-
2088
- export interface SolanaSignTransactionRpcInput {
2089
3882
  /**
2090
- * Body param
3883
+ * Header param: Request expiry. Value is a Unix timestamp in milliseconds
3884
+ * representing the deadline by which the request must be processed.
2091
3885
  */
2092
- method: 'signTransaction';
3886
+ 'privy-request-expiry'?: string;
3887
+ }
2093
3888
 
3889
+ export interface SparkSignMessageWithIdentityKeyRpcInput {
2094
3890
  /**
2095
3891
  * Body param
2096
3892
  */
2097
- params: SolanaSignTransactionRpcInput.Params;
3893
+ method: 'signMessageWithIdentityKey';
2098
3894
 
2099
3895
  /**
2100
- * Body param
3896
+ * Body param: Parameters for the Spark `signMessageWithIdentityKey` RPC.
2101
3897
  */
2102
- address?: string;
3898
+ params: SparkSignMessageWithIdentityKeyRpcInputParams;
2103
3899
 
2104
3900
  /**
2105
- * Body param
3901
+ * Body param: The Spark network.
2106
3902
  */
2107
- chain_type?: 'solana';
3903
+ network?: SparkNetwork;
2108
3904
 
2109
3905
  /**
2110
3906
  * Header param: Request authorization signature. If multiple signatures are
@@ -2117,46 +3913,66 @@ export declare namespace WalletRpcParams {
2117
3913
  * a 24-hour window.
2118
3914
  */
2119
3915
  'privy-idempotency-key'?: string;
2120
- }
2121
3916
 
2122
- export namespace SolanaSignTransactionRpcInput {
2123
- export interface Params {
2124
- encoding: 'base64';
2125
-
2126
- transaction: string;
2127
- }
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;
2128
3922
  }
2129
3923
 
2130
- export interface SolanaSignAndSendTransactionRpcInput {
3924
+ export interface ExportPrivateKeyRpcInput {
2131
3925
  /**
2132
3926
  * Body param
2133
3927
  */
2134
- caip2: string;
3928
+ address: string;
2135
3929
 
2136
3930
  /**
2137
3931
  * Body param
2138
3932
  */
2139
- method: 'signAndSendTransaction';
3933
+ method: 'exportPrivateKey';
2140
3934
 
2141
3935
  /**
2142
- * Body param
3936
+ * Body param: Input for exporting a wallet (private key or seed phrase) with HPKE
3937
+ * encryption.
2143
3938
  */
2144
- params: SolanaSignAndSendTransactionRpcInput.Params;
3939
+ params: PrivateKeyExportInput;
2145
3940
 
2146
3941
  /**
2147
- * Body param
3942
+ * Header param: Request authorization signature. If multiple signatures are
3943
+ * required, they should be comma separated.
2148
3944
  */
2149
- address?: string;
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
+ }
2150
3959
 
3960
+ export interface ExportSeedPhraseRpcInput {
2151
3961
  /**
2152
3962
  * Body param
2153
3963
  */
2154
- chain_type?: 'solana';
3964
+ address: string;
2155
3965
 
2156
3966
  /**
2157
3967
  * Body param
2158
3968
  */
2159
- sponsor?: boolean;
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;
2160
3976
 
2161
3977
  /**
2162
3978
  * Header param: Request authorization signature. If multiple signatures are
@@ -2169,27 +3985,51 @@ export declare namespace WalletRpcParams {
2169
3985
  * a 24-hour window.
2170
3986
  */
2171
3987
  'privy-idempotency-key'?: string;
2172
- }
2173
3988
 
2174
- export namespace SolanaSignAndSendTransactionRpcInput {
2175
- export interface Params {
2176
- encoding: 'base64';
2177
-
2178
- transaction: string;
2179
- }
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;
2180
3994
  }
2181
3995
  }
2182
3996
 
2183
3997
  export interface WalletSubmitImportParams {
2184
3998
  wallet: WalletSubmitImportParams.HDSubmitInput | WalletSubmitImportParams.PrivateKeySubmitInput;
2185
3999
 
2186
- additional_signers?: Array<WalletSubmitImportParams.AdditionalSigner>;
4000
+ /**
4001
+ * Additional signers for the wallet.
4002
+ */
4003
+ additional_signers?: AdditionalSignerInput;
2187
4004
 
2188
- owner?: WalletSubmitImportParams.UserID | WalletSubmitImportParams.PublicKey | null;
4005
+ /**
4006
+ * A human-readable label for the wallet.
4007
+ */
4008
+ display_name?: string;
2189
4009
 
2190
- owner_id?: string | null;
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;
2191
4016
 
2192
- policy_ids?: Array<string>;
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;
2193
4033
  }
2194
4034
 
2195
4035
  export namespace WalletSubmitImportParams {
@@ -2203,7 +4043,7 @@ export namespace WalletSubmitImportParams {
2203
4043
  * The chain type of the wallet to import. Currently supports `ethereum` and
2204
4044
  * `solana`.
2205
4045
  */
2206
- chain_type: 'ethereum' | 'solana';
4046
+ chain_type: WalletsAPI.WalletImportSupportedChains;
2207
4047
 
2208
4048
  /**
2209
4049
  * The encrypted entropy of the wallet to import.
@@ -2219,7 +4059,7 @@ export namespace WalletSubmitImportParams {
2219
4059
  /**
2220
4060
  * The encryption type of the wallet to import. Currently only supports `HPKE`.
2221
4061
  */
2222
- encryption_type: 'HPKE';
4062
+ encryption_type: WalletsAPI.HpkeEncryption;
2223
4063
 
2224
4064
  /**
2225
4065
  * The entropy type of the wallet to import.
@@ -2249,7 +4089,7 @@ export namespace WalletSubmitImportParams {
2249
4089
  * The chain type of the wallet to import. Currently supports `ethereum` and
2250
4090
  * `solana`.
2251
4091
  */
2252
- chain_type: 'ethereum' | 'solana';
4092
+ chain_type: WalletsAPI.WalletImportSupportedChains;
2253
4093
 
2254
4094
  /**
2255
4095
  * The encrypted entropy of the wallet to import.
@@ -2265,7 +4105,7 @@ export namespace WalletSubmitImportParams {
2265
4105
  /**
2266
4106
  * The encryption type of the wallet to import. Currently only supports `HPKE`.
2267
4107
  */
2268
- encryption_type: 'HPKE';
4108
+ encryption_type: WalletsAPI.HpkeEncryption;
2269
4109
 
2270
4110
  entropy_type: 'private-key';
2271
4111
 
@@ -2276,39 +4116,30 @@ export namespace WalletSubmitImportParams {
2276
4116
  */
2277
4117
  hpke_config?: WalletsAPI.HpkeImportConfig;
2278
4118
  }
2279
-
2280
- export interface AdditionalSigner {
2281
- signer_id: string;
2282
-
2283
- override_policy_ids?: Array<string>;
2284
- }
2285
-
2286
- export interface UserID {
2287
- user_id: string;
2288
- }
2289
-
2290
- export interface PublicKey {
2291
- public_key: string;
2292
- }
2293
4119
  }
2294
4120
 
2295
4121
  export interface WalletUpdateParams {
2296
4122
  /**
2297
4123
  * Body param: Additional signers for the wallet.
2298
4124
  */
2299
- additional_signers?: Array<WalletUpdateParams.AdditionalSigner>;
4125
+ additional_signers?: AdditionalSignerInput;
2300
4126
 
2301
4127
  /**
2302
- * Body param: The owner of the resource. If you provide this, do not specify an
2303
- * owner_id as it will be generated automatically. When updating a wallet, you can
2304
- * set the owner to null to remove the owner.
4128
+ * Body param: A human-readable label for the wallet. Set to null to clear.
2305
4129
  */
2306
- owner?: WalletUpdateParams.PublicKeyOwner | WalletUpdateParams.UserOwner | null;
4130
+ display_name?: string | null;
2307
4131
 
2308
4132
  /**
2309
- * 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.
2310
4135
  */
2311
- owner_id?: string | null;
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;
2312
4143
 
2313
4144
  /**
2314
4145
  * Body param: New policy IDs to enforce on the wallet. Currently, only one policy
@@ -2321,55 +4152,31 @@ export interface WalletUpdateParams {
2321
4152
  * required, they should be comma separated.
2322
4153
  */
2323
4154
  'privy-authorization-signature'?: string;
2324
- }
2325
-
2326
- export namespace WalletUpdateParams {
2327
- export interface AdditionalSigner {
2328
- signer_id: string;
2329
-
2330
- /**
2331
- * The array of policy IDs that will be applied to wallet requests. If specified,
2332
- * this will override the base policy IDs set on the wallet.
2333
- */
2334
- override_policy_ids?: Array<string>;
2335
- }
2336
-
2337
- /**
2338
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
2339
- * If you provide this, do not specify an owner_id as it will be generated
2340
- * automatically.
2341
- */
2342
- export interface PublicKeyOwner {
2343
- public_key: string;
2344
- }
2345
4155
 
2346
4156
  /**
2347
- * The user ID of the owner of the resource. The user must already exist, and this
2348
- * value must start with "did:privy:". If you provide this, do not specify an
2349
- * 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.
2350
4159
  */
2351
- export interface UserOwner {
2352
- user_id: string;
2353
- }
4160
+ 'privy-request-expiry'?: string;
2354
4161
  }
2355
4162
 
2356
4163
  export interface WalletAuthenticateWithJwtParams {
2357
- /**
2358
- * The user's JWT, to be used to authenticate the user.
2359
- */
2360
- user_jwt: string;
2361
-
2362
4164
  /**
2363
4165
  * The encryption type for the authentication response. Currently only supports
2364
4166
  * HPKE.
2365
4167
  */
2366
- encryption_type?: 'HPKE';
4168
+ encryption_type: 'HPKE';
2367
4169
 
2368
4170
  /**
2369
4171
  * The public key of your ECDH keypair, in base64-encoded, SPKI-format, whose
2370
4172
  * private key will be able to decrypt the session key.
2371
4173
  */
2372
- recipient_public_key?: string;
4174
+ recipient_public_key: string;
4175
+
4176
+ /**
4177
+ * The user's JWT, to be used to authenticate the user.
4178
+ */
4179
+ user_jwt: string;
2373
4180
  }
2374
4181
 
2375
4182
  export interface WalletCreateWalletsWithRecoveryParams {
@@ -2419,10 +4226,21 @@ export namespace WalletCreateWalletsWithRecoveryParams {
2419
4226
  chain_type: WalletsAPI.WalletChainType;
2420
4227
 
2421
4228
  /**
2422
- * List of policy IDs for policies that should be enforced on the wallet.
2423
- * Currently, only one policy is supported per wallet.
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.
2424
4242
  */
2425
- policy_ids?: Array<string>;
4243
+ policy_ids?: WalletsAPI.PolicyInput;
2426
4244
  }
2427
4245
  }
2428
4246
 
@@ -2436,42 +4254,172 @@ export declare namespace Wallets {
2436
4254
  type ExtendedChainType as ExtendedChainType,
2437
4255
  type FirstClassChainType as FirstClassChainType,
2438
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,
2439
4266
  type WalletCustodian as WalletCustodian,
2440
4267
  type CustodialWalletProvider as CustodialWalletProvider,
2441
4268
  type CustodialWalletChainType as CustodialWalletChainType,
2442
4269
  type CustodialWalletCreateInput as CustodialWalletCreateInput,
2443
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,
2444
4282
  type HpkeImportConfig as HpkeImportConfig,
2445
- type SuiCommandName as SuiCommandName,
2446
- type Wallet as Wallet,
2447
- type WalletBatchItemInput as WalletBatchItemInput,
2448
- type WalletBatchCreateInput as WalletBatchCreateInput,
2449
- type WalletBatchCreateResult as WalletBatchCreateResult,
2450
- type WalletBatchCreateResponse as WalletBatchCreateResponse,
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,
2451
4307
  type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput,
4308
+ type EthereumSignTransactionRpcInputParams as EthereumSignTransactionRpcInputParams,
2452
4309
  type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput,
4310
+ type EthereumSendTransactionRpcInputParams as EthereumSendTransactionRpcInputParams,
2453
4311
  type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput,
4312
+ type EthereumTypedDataInput as EthereumTypedDataInput,
4313
+ type EthereumSignTypedDataRpcInputParams as EthereumSignTypedDataRpcInputParams,
2454
4314
  type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput,
2455
- type EthereumSignUserOperationRpcInput as EthereumSignUserOperationRpcInput,
2456
- type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput,
4315
+ type EthereumSecp256k1SignRpcInputParams as EthereumSecp256k1SignRpcInputParams,
2457
4316
  type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput,
2458
- type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput,
2459
- type SolanaSignAndSendTransactionRpcInput as SolanaSignAndSendTransactionRpcInput,
2460
- type SolanaSignMessageRpcInput as SolanaSignMessageRpcInput,
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,
2461
4328
  type EthereumSignTransactionRpcResponse as EthereumSignTransactionRpcResponse,
4329
+ type EthereumSendTransactionRpcResponseData as EthereumSendTransactionRpcResponseData,
2462
4330
  type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse,
2463
- type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse,
4331
+ type EthereumSignTypedDataRpcResponseData as EthereumSignTypedDataRpcResponseData,
2464
4332
  type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse,
2465
- type EthereumSignUserOperationRpcResponse as EthereumSignUserOperationRpcResponse,
2466
- type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse,
4333
+ type EthereumSecp256k1SignRpcResponseData as EthereumSecp256k1SignRpcResponseData,
2467
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,
2468
4350
  type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse,
4351
+ type SolanaSignAndSendTransactionRpcResponseData as SolanaSignAndSendTransactionRpcResponseData,
2469
4352
  type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse,
4353
+ type SolanaSignMessageRpcResponseData as SolanaSignMessageRpcResponseData,
2470
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,
4409
+ type WalletRpcRequestBody as WalletRpcRequestBody,
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,
2471
4421
  type WalletExportResponse as WalletExportResponse,
2472
4422
  type WalletInitImportResponse as WalletInitImportResponse,
2473
- type WalletRawSignResponse as WalletRawSignResponse,
2474
- type WalletRpcResponse as WalletRpcResponse,
2475
4423
  type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse,
2476
4424
  type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse,
2477
4425
  type WalletsCursor as WalletsCursor,