@privy-io/node 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/lib/identity-token.d.mts.map +1 -1
  10. package/lib/identity-token.d.ts.map +1 -1
  11. package/lib/identity-token.js +10 -0
  12. package/lib/identity-token.js.map +1 -1
  13. package/lib/identity-token.mjs +10 -0
  14. package/lib/identity-token.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/public-api/services/ethereum.d.mts +7 -7
  17. package/public-api/services/ethereum.d.mts.map +1 -1
  18. package/public-api/services/ethereum.d.ts +7 -7
  19. package/public-api/services/ethereum.d.ts.map +1 -1
  20. package/public-api/services/ethereum.js.map +1 -1
  21. package/public-api/services/ethereum.mjs.map +1 -1
  22. package/public-api/services/solana.d.mts +4 -4
  23. package/public-api/services/solana.d.mts.map +1 -1
  24. package/public-api/services/solana.d.ts +4 -4
  25. package/public-api/services/solana.d.ts.map +1 -1
  26. package/public-api/services/solana.js.map +1 -1
  27. package/public-api/services/solana.mjs.map +1 -1
  28. package/resources/index.d.mts +1 -1
  29. package/resources/index.d.mts.map +1 -1
  30. package/resources/index.d.ts +1 -1
  31. package/resources/index.d.ts.map +1 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs.map +1 -1
  34. package/resources/key-quorums.d.mts +18 -3
  35. package/resources/key-quorums.d.mts.map +1 -1
  36. package/resources/key-quorums.d.ts +18 -3
  37. package/resources/key-quorums.d.ts.map +1 -1
  38. package/resources/policies.d.mts +6 -4
  39. package/resources/policies.d.mts.map +1 -1
  40. package/resources/policies.d.ts +6 -4
  41. package/resources/policies.d.ts.map +1 -1
  42. package/resources/users.d.mts +3 -3
  43. package/resources/users.d.mts.map +1 -1
  44. package/resources/users.d.ts +3 -3
  45. package/resources/users.d.ts.map +1 -1
  46. package/resources/users.js +1 -1
  47. package/resources/users.mjs +1 -1
  48. package/resources/wallets/index.d.mts +1 -1
  49. package/resources/wallets/index.d.mts.map +1 -1
  50. package/resources/wallets/index.d.ts +1 -1
  51. package/resources/wallets/index.d.ts.map +1 -1
  52. package/resources/wallets/index.js.map +1 -1
  53. package/resources/wallets/index.mjs.map +1 -1
  54. package/resources/wallets/transactions.d.mts +1 -0
  55. package/resources/wallets/transactions.d.mts.map +1 -1
  56. package/resources/wallets/transactions.d.ts +1 -0
  57. package/resources/wallets/transactions.d.ts.map +1 -1
  58. package/resources/wallets/wallets.d.mts +466 -228
  59. package/resources/wallets/wallets.d.mts.map +1 -1
  60. package/resources/wallets/wallets.d.ts +466 -228
  61. package/resources/wallets/wallets.d.ts.map +1 -1
  62. package/resources/wallets/wallets.js +7 -3
  63. package/resources/wallets/wallets.js.map +1 -1
  64. package/resources/wallets/wallets.mjs +7 -3
  65. package/resources/wallets/wallets.mjs.map +1 -1
  66. package/src/client.ts +36 -0
  67. package/src/lib/identity-token.ts +11 -0
  68. package/src/public-api/services/ethereum.ts +15 -7
  69. package/src/public-api/services/solana.ts +9 -4
  70. package/src/resources/index.ts +18 -0
  71. package/src/resources/key-quorums.ts +18 -3
  72. package/src/resources/policies.ts +6 -4
  73. package/src/resources/users.ts +3 -3
  74. package/src/resources/wallets/index.ts +18 -0
  75. package/src/resources/wallets/transactions.ts +2 -0
  76. package/src/resources/wallets/wallets.ts +595 -260
  77. package/src/version.ts +1 -1
  78. package/version.d.mts +1 -1
  79. package/version.d.ts +1 -1
  80. package/version.js +1 -1
  81. package/version.mjs +1 -1
@@ -68,7 +68,11 @@ export declare class Wallets extends APIResource {
68
68
  * ```ts
69
69
  * const response = await client.wallets._rawSign(
70
70
  * 'wallet_id',
71
- * { params: {} },
71
+ * {
72
+ * params: {
73
+ * hash: '0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e',
74
+ * },
75
+ * },
72
76
  * );
73
77
  * ```
74
78
  */
@@ -79,8 +83,8 @@ export declare class Wallets extends APIResource {
79
83
  * @example
80
84
  * ```ts
81
85
  * const response = await client.wallets._rpc('wallet_id', {
82
- * method: 'eth_signTransaction',
83
- * params: { transaction: {} },
86
+ * method: 'personal_sign',
87
+ * params: { encoding: 'utf-8', message: 'message' },
84
88
  * });
85
89
  * ```
86
90
  */
@@ -211,6 +215,338 @@ export declare namespace Wallet {
211
215
  * The wallet chain types.
212
216
  */
213
217
  export type WalletChainType = 'solana' | 'ethereum' | 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'near' | 'ton' | 'starknet' | 'spark';
218
+ /**
219
+ * Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
220
+ */
221
+ export interface EthereumPersonalSignRpcInput {
222
+ method: 'personal_sign';
223
+ params: EthereumPersonalSignRpcInput.Params;
224
+ address?: string;
225
+ chain_type?: 'ethereum';
226
+ }
227
+ export declare namespace EthereumPersonalSignRpcInput {
228
+ interface Params {
229
+ encoding: 'utf-8' | 'hex';
230
+ message: string;
231
+ }
232
+ }
233
+ /**
234
+ * Executes the EVM `eth_signTransaction` RPC to sign a transaction.
235
+ */
236
+ export interface EthereumSignTransactionRpcInput {
237
+ method: 'eth_signTransaction';
238
+ params: EthereumSignTransactionRpcInput.Params;
239
+ address?: string;
240
+ chain_type?: 'ethereum';
241
+ }
242
+ export declare namespace EthereumSignTransactionRpcInput {
243
+ interface Params {
244
+ transaction: Params.Transaction;
245
+ }
246
+ namespace Params {
247
+ interface Transaction {
248
+ chain_id?: string | number;
249
+ data?: string;
250
+ from?: string;
251
+ gas_limit?: string | number;
252
+ gas_price?: string | number;
253
+ max_fee_per_gas?: string | number;
254
+ max_priority_fee_per_gas?: string | number;
255
+ nonce?: string | number;
256
+ to?: string;
257
+ type?: 0 | 1 | 2;
258
+ value?: string | number;
259
+ }
260
+ }
261
+ }
262
+ /**
263
+ * Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
264
+ */
265
+ export interface EthereumSendTransactionRpcInput {
266
+ caip2: string;
267
+ method: 'eth_sendTransaction';
268
+ params: EthereumSendTransactionRpcInput.Params;
269
+ address?: string;
270
+ chain_type?: 'ethereum';
271
+ sponsor?: boolean;
272
+ }
273
+ export declare namespace EthereumSendTransactionRpcInput {
274
+ interface Params {
275
+ transaction: Params.Transaction;
276
+ }
277
+ namespace Params {
278
+ interface Transaction {
279
+ chain_id?: string | number;
280
+ data?: string;
281
+ from?: string;
282
+ gas_limit?: string | number;
283
+ gas_price?: string | number;
284
+ max_fee_per_gas?: string | number;
285
+ max_priority_fee_per_gas?: string | number;
286
+ nonce?: string | number;
287
+ to?: string;
288
+ type?: 0 | 1 | 2;
289
+ value?: string | number;
290
+ }
291
+ }
292
+ }
293
+ /**
294
+ * Executes the EVM `eth_signTypedData_v4` RPC (EIP-712) to sign a typed data
295
+ * object.
296
+ */
297
+ export interface EthereumSignTypedDataRpcInput {
298
+ method: 'eth_signTypedData_v4';
299
+ params: EthereumSignTypedDataRpcInput.Params;
300
+ address?: string;
301
+ chain_type?: 'ethereum';
302
+ }
303
+ export declare namespace EthereumSignTypedDataRpcInput {
304
+ interface Params {
305
+ typed_data: Params.TypedData;
306
+ }
307
+ namespace Params {
308
+ interface TypedData {
309
+ domain: {
310
+ [key: string]: unknown;
311
+ };
312
+ message: {
313
+ [key: string]: unknown;
314
+ };
315
+ primary_type: string;
316
+ types: {
317
+ [key: string]: Array<TypedData.Type>;
318
+ };
319
+ }
320
+ namespace TypedData {
321
+ interface Type {
322
+ name: string;
323
+ type: string;
324
+ }
325
+ }
326
+ }
327
+ }
328
+ /**
329
+ * Signs an EIP-7702 authorization.
330
+ */
331
+ export interface EthereumSign7702AuthorizationRpcInput {
332
+ method: 'eth_sign7702Authorization';
333
+ params: EthereumSign7702AuthorizationRpcInput.Params;
334
+ address?: string;
335
+ chain_type?: 'ethereum';
336
+ }
337
+ export declare namespace EthereumSign7702AuthorizationRpcInput {
338
+ interface Params {
339
+ chain_id: string | number;
340
+ contract: string;
341
+ nonce?: string | number;
342
+ }
343
+ }
344
+ /**
345
+ * Signs a raw hash on the secp256k1 curve.
346
+ */
347
+ export interface EthereumSecp256k1SignRpcInput {
348
+ method: 'secp256k1_sign';
349
+ params: EthereumSecp256k1SignRpcInput.Params;
350
+ address?: string;
351
+ chain_type?: 'ethereum';
352
+ }
353
+ export declare namespace EthereumSecp256k1SignRpcInput {
354
+ interface Params {
355
+ hash: string;
356
+ }
357
+ }
358
+ /**
359
+ * Executes the SVM `signTransaction` RPC to sign a transaction.
360
+ */
361
+ export interface SolanaSignTransactionRpcInput {
362
+ method: 'signTransaction';
363
+ params: SolanaSignTransactionRpcInput.Params;
364
+ address?: string;
365
+ chain_type?: 'solana';
366
+ }
367
+ export declare namespace SolanaSignTransactionRpcInput {
368
+ interface Params {
369
+ encoding: 'base64';
370
+ transaction: string;
371
+ }
372
+ }
373
+ /**
374
+ * Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
375
+ * transaction.
376
+ */
377
+ export interface SolanaSignAndSendTransactionRpcInput {
378
+ caip2: string;
379
+ method: 'signAndSendTransaction';
380
+ params: SolanaSignAndSendTransactionRpcInput.Params;
381
+ address?: string;
382
+ chain_type?: 'solana';
383
+ sponsor?: boolean;
384
+ }
385
+ export declare namespace SolanaSignAndSendTransactionRpcInput {
386
+ interface Params {
387
+ encoding: 'base64';
388
+ transaction: string;
389
+ }
390
+ }
391
+ /**
392
+ * Executes the SVM `signMessage` RPC to sign a message.
393
+ */
394
+ export interface SolanaSignMessageRpcInput {
395
+ method: 'signMessage';
396
+ params: SolanaSignMessageRpcInput.Params;
397
+ address?: string;
398
+ chain_type?: 'solana';
399
+ }
400
+ export declare namespace SolanaSignMessageRpcInput {
401
+ interface Params {
402
+ encoding: 'base64';
403
+ message: string;
404
+ }
405
+ }
406
+ /**
407
+ * Response to the EVM `eth_signTransaction` RPC.
408
+ */
409
+ export interface EthereumSignTransactionRpcResponse {
410
+ data: EthereumSignTransactionRpcResponse.Data;
411
+ method: 'eth_signTransaction';
412
+ }
413
+ export declare namespace EthereumSignTransactionRpcResponse {
414
+ interface Data {
415
+ encoding: 'rlp';
416
+ signed_transaction: string;
417
+ }
418
+ }
419
+ /**
420
+ * Response to the EVM `eth_sendTransaction` RPC.
421
+ */
422
+ export interface EthereumSendTransactionRpcResponse {
423
+ data: EthereumSendTransactionRpcResponse.Data;
424
+ method: 'eth_sendTransaction';
425
+ }
426
+ export declare namespace EthereumSendTransactionRpcResponse {
427
+ interface Data {
428
+ caip2: string;
429
+ hash: string;
430
+ transaction_id?: string;
431
+ transaction_request?: Data.TransactionRequest;
432
+ }
433
+ namespace Data {
434
+ interface TransactionRequest {
435
+ chain_id?: string | number;
436
+ data?: string;
437
+ from?: string;
438
+ gas_limit?: string | number;
439
+ gas_price?: string | number;
440
+ max_fee_per_gas?: string | number;
441
+ max_priority_fee_per_gas?: string | number;
442
+ nonce?: string | number;
443
+ to?: string;
444
+ type?: 0 | 1 | 2;
445
+ value?: string | number;
446
+ }
447
+ }
448
+ }
449
+ /**
450
+ * Response to the EVM `personal_sign` RPC.
451
+ */
452
+ export interface EthereumPersonalSignRpcResponse {
453
+ data: EthereumPersonalSignRpcResponse.Data;
454
+ method: 'personal_sign';
455
+ }
456
+ export declare namespace EthereumPersonalSignRpcResponse {
457
+ interface Data {
458
+ encoding: 'hex';
459
+ signature: string;
460
+ }
461
+ }
462
+ /**
463
+ * Response to the EVM `eth_signTypedData_v4` RPC.
464
+ */
465
+ export interface EthereumSignTypedDataRpcResponse {
466
+ data: EthereumSignTypedDataRpcResponse.Data;
467
+ method: 'eth_signTypedData_v4';
468
+ }
469
+ export declare namespace EthereumSignTypedDataRpcResponse {
470
+ interface Data {
471
+ encoding: 'hex';
472
+ signature: string;
473
+ }
474
+ }
475
+ /**
476
+ * Response to the EVM `eth_sign7702Authorization` RPC.
477
+ */
478
+ export interface EthereumSign7702AuthorizationRpcResponse {
479
+ data: EthereumSign7702AuthorizationRpcResponse.Data;
480
+ method: 'eth_sign7702Authorization';
481
+ }
482
+ export declare namespace EthereumSign7702AuthorizationRpcResponse {
483
+ interface Data {
484
+ authorization: Data.Authorization;
485
+ }
486
+ namespace Data {
487
+ interface Authorization {
488
+ chain_id: string | number;
489
+ contract: string;
490
+ nonce: string | number;
491
+ r: string;
492
+ s: string;
493
+ y_parity: number;
494
+ }
495
+ }
496
+ }
497
+ /**
498
+ * Response to the EVM `secp256k1_sign` RPC.
499
+ */
500
+ export interface EthereumSecp256k1SignRpcResponse {
501
+ data: EthereumSecp256k1SignRpcResponse.Data;
502
+ method: 'secp256k1_sign';
503
+ }
504
+ export declare namespace EthereumSecp256k1SignRpcResponse {
505
+ interface Data {
506
+ encoding: 'hex';
507
+ signature: string;
508
+ }
509
+ }
510
+ /**
511
+ * Response to the SVM `signTransaction` RPC.
512
+ */
513
+ export interface SolanaSignTransactionRpcResponse {
514
+ data: SolanaSignTransactionRpcResponse.Data;
515
+ method: 'signTransaction';
516
+ }
517
+ export declare namespace SolanaSignTransactionRpcResponse {
518
+ interface Data {
519
+ encoding: 'base64';
520
+ signed_transaction: string;
521
+ }
522
+ }
523
+ /**
524
+ * Response to the SVM `signAndSendTransaction` RPC.
525
+ */
526
+ export interface SolanaSignAndSendTransactionRpcResponse {
527
+ data: SolanaSignAndSendTransactionRpcResponse.Data;
528
+ method: 'signAndSendTransaction';
529
+ }
530
+ export declare namespace SolanaSignAndSendTransactionRpcResponse {
531
+ interface Data {
532
+ caip2: string;
533
+ hash: string;
534
+ transaction_id?: string;
535
+ }
536
+ }
537
+ /**
538
+ * Response to the SVM `signMessage` RPC.
539
+ */
540
+ export interface SolanaSignMessageRpcResponse {
541
+ data: SolanaSignMessageRpcResponse.Data;
542
+ method: 'signMessage';
543
+ }
544
+ export declare namespace SolanaSignMessageRpcResponse {
545
+ interface Data {
546
+ encoding: 'base64';
547
+ signature: string;
548
+ }
549
+ }
214
550
  export interface WalletExportResponse {
215
551
  /**
216
552
  * The encrypted private key.
@@ -245,126 +581,10 @@ export declare namespace WalletRawSignResponse {
245
581
  signature: string;
246
582
  }
247
583
  }
248
- export type WalletRpcResponse = WalletRpcResponse.SolanaSignTransactionRpcResponse | WalletRpcResponse.SolanaSignAndSendTransactionRpcResponse | WalletRpcResponse.SolanaSignMessageRpcResponse | WalletRpcResponse.EthereumSignTransactionRpcResponse | WalletRpcResponse.EthereumSendTransactionRpcResponse | WalletRpcResponse.EthereumPersonalSignRpcResponse | WalletRpcResponse.EthereumSignTypedDataRpcResponse | WalletRpcResponse.EthereumSign7702AuthorizationRpcResponse | WalletRpcResponse.EthereumSecp256k1SignRpcResponse;
249
- export declare namespace WalletRpcResponse {
250
- interface SolanaSignTransactionRpcResponse {
251
- data: SolanaSignTransactionRpcResponse.Data;
252
- method: 'signTransaction';
253
- }
254
- namespace SolanaSignTransactionRpcResponse {
255
- interface Data {
256
- encoding: 'base64';
257
- signed_transaction: string;
258
- }
259
- }
260
- interface SolanaSignAndSendTransactionRpcResponse {
261
- data: SolanaSignAndSendTransactionRpcResponse.Data;
262
- method: 'signAndSendTransaction';
263
- }
264
- namespace SolanaSignAndSendTransactionRpcResponse {
265
- interface Data {
266
- caip2: string;
267
- hash: string;
268
- transaction_id?: string;
269
- }
270
- }
271
- interface SolanaSignMessageRpcResponse {
272
- data: SolanaSignMessageRpcResponse.Data;
273
- method: 'signMessage';
274
- }
275
- namespace SolanaSignMessageRpcResponse {
276
- interface Data {
277
- encoding: 'base64';
278
- signature: string;
279
- }
280
- }
281
- interface EthereumSignTransactionRpcResponse {
282
- data: EthereumSignTransactionRpcResponse.Data;
283
- method: 'eth_signTransaction';
284
- }
285
- namespace EthereumSignTransactionRpcResponse {
286
- interface Data {
287
- encoding: 'rlp';
288
- signed_transaction: string;
289
- }
290
- }
291
- interface EthereumSendTransactionRpcResponse {
292
- data: EthereumSendTransactionRpcResponse.Data;
293
- method: 'eth_sendTransaction';
294
- }
295
- namespace EthereumSendTransactionRpcResponse {
296
- interface Data {
297
- caip2: string;
298
- hash: string;
299
- transaction_id?: string;
300
- transaction_request?: Data.TransactionRequest;
301
- }
302
- namespace Data {
303
- interface TransactionRequest {
304
- chain_id?: string | number;
305
- data?: string;
306
- from?: string;
307
- gas_limit?: string | number;
308
- gas_price?: string | number;
309
- max_fee_per_gas?: string | number;
310
- max_priority_fee_per_gas?: string | number;
311
- nonce?: string | number;
312
- to?: string;
313
- type?: 0 | 1 | 2;
314
- value?: string | number;
315
- }
316
- }
317
- }
318
- interface EthereumPersonalSignRpcResponse {
319
- data: EthereumPersonalSignRpcResponse.Data;
320
- method: 'personal_sign';
321
- }
322
- namespace EthereumPersonalSignRpcResponse {
323
- interface Data {
324
- encoding: 'hex';
325
- signature: string;
326
- }
327
- }
328
- interface EthereumSignTypedDataRpcResponse {
329
- data: EthereumSignTypedDataRpcResponse.Data;
330
- method: 'eth_signTypedData_v4';
331
- }
332
- namespace EthereumSignTypedDataRpcResponse {
333
- interface Data {
334
- encoding: 'hex';
335
- signature: string;
336
- }
337
- }
338
- interface EthereumSign7702AuthorizationRpcResponse {
339
- data: EthereumSign7702AuthorizationRpcResponse.Data;
340
- method: 'eth_sign7702Authorization';
341
- }
342
- namespace EthereumSign7702AuthorizationRpcResponse {
343
- interface Data {
344
- authorization: Data.Authorization;
345
- }
346
- namespace Data {
347
- interface Authorization {
348
- chain_id: string | number;
349
- contract: string;
350
- nonce: string | number;
351
- r: string;
352
- s: string;
353
- y_parity: number;
354
- }
355
- }
356
- }
357
- interface EthereumSecp256k1SignRpcResponse {
358
- data: EthereumSecp256k1SignRpcResponse.Data;
359
- method: 'secp256k1_sign';
360
- }
361
- namespace EthereumSecp256k1SignRpcResponse {
362
- interface Data {
363
- encoding: 'hex';
364
- signature: string;
365
- }
366
- }
367
- }
584
+ /**
585
+ * Response to the EVM `personal_sign` RPC.
586
+ */
587
+ export type WalletRpcResponse = EthereumPersonalSignRpcResponse | EthereumSignTypedDataRpcResponse | EthereumSignTransactionRpcResponse | EthereumSendTransactionRpcResponse | EthereumSign7702AuthorizationRpcResponse | EthereumSecp256k1SignRpcResponse | SolanaSignMessageRpcResponse | SolanaSignTransactionRpcResponse | SolanaSignAndSendTransactionRpcResponse;
368
588
  export type WalletAuthenticateWithJwtResponse = WalletAuthenticateWithJwtResponse.WithEncryption | WalletAuthenticateWithJwtResponse.WithoutEncryption;
369
589
  export declare namespace WalletAuthenticateWithJwtResponse {
370
590
  interface WithEncryption {
@@ -462,8 +682,9 @@ export declare namespace WalletCreateParams {
462
682
  override_policy_ids?: Array<string>;
463
683
  }
464
684
  /**
465
- * The P-256 public key of the owner of the resource. If you provide this, do not
466
- * specify an owner_id as it will be generated automatically.
685
+ * The P-256 public key of the owner of the resource, in base64-encoded DER format.
686
+ * If you provide this, do not specify an owner_id as it will be generated
687
+ * automatically.
467
688
  */
468
689
  interface PublicKeyOwner {
469
690
  public_key: string;
@@ -542,9 +763,9 @@ export declare namespace WalletInitImportParams {
542
763
  }
543
764
  export interface WalletRawSignParams {
544
765
  /**
545
- * Body param:
766
+ * Body param: Sign a pre-computed hash
546
767
  */
547
- params: WalletRawSignParams.Params;
768
+ params: WalletRawSignParams.Hash | WalletRawSignParams.Bytes;
548
769
  /**
549
770
  * Header param: Request authorization signature. If multiple signatures are
550
771
  * required, they should be comma separated.
@@ -557,24 +778,40 @@ export interface WalletRawSignParams {
557
778
  'privy-idempotency-key'?: string;
558
779
  }
559
780
  export declare namespace WalletRawSignParams {
560
- interface Params {
781
+ /**
782
+ * Sign a pre-computed hash
783
+ */
784
+ interface Hash {
561
785
  /**
562
786
  * The hash to sign. Must start with `0x`.
563
787
  */
564
- hash?: string;
788
+ hash: string;
789
+ }
790
+ /**
791
+ * Hash and sign bytes (Tron only)
792
+ */
793
+ interface Bytes {
794
+ /**
795
+ * The bytes to hash and sign.
796
+ */
797
+ bytes: string;
798
+ /**
799
+ * Encoding scheme. Currently only utf-8 is supported.
800
+ */
801
+ encoding: 'utf-8';
565
802
  }
566
803
  }
567
- export type WalletRpcParams = WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput | WalletRpcParams.SolanaSignMessageRpcInput;
804
+ export type WalletRpcParams = WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignMessageRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
568
805
  export declare namespace WalletRpcParams {
569
- interface EthereumSignTransactionRpcInput {
806
+ interface EthereumPersonalSignRpcInput {
570
807
  /**
571
808
  * Body param:
572
809
  */
573
- method: 'eth_signTransaction';
810
+ method: 'personal_sign';
574
811
  /**
575
812
  * Body param:
576
813
  */
577
- params: EthereumSignTransactionRpcInput.Params;
814
+ params: EthereumPersonalSignRpcInput.Params;
578
815
  /**
579
816
  * Body param:
580
817
  */
@@ -594,39 +831,21 @@ export declare namespace WalletRpcParams {
594
831
  */
595
832
  'privy-idempotency-key'?: string;
596
833
  }
597
- namespace EthereumSignTransactionRpcInput {
834
+ namespace EthereumPersonalSignRpcInput {
598
835
  interface Params {
599
- transaction: Params.Transaction;
600
- }
601
- namespace Params {
602
- interface Transaction {
603
- chain_id?: string | number;
604
- data?: string;
605
- from?: string;
606
- gas_limit?: string | number;
607
- gas_price?: string | number;
608
- max_fee_per_gas?: string | number;
609
- max_priority_fee_per_gas?: string | number;
610
- nonce?: string | number;
611
- to?: string;
612
- type?: 0 | 1 | 2;
613
- value?: string | number;
614
- }
836
+ encoding: 'utf-8' | 'hex';
837
+ message: string;
615
838
  }
616
839
  }
617
- interface EthereumSendTransactionRpcInput {
618
- /**
619
- * Body param:
620
- */
621
- caip2: string;
840
+ interface EthereumSignTypedDataRpcInput {
622
841
  /**
623
842
  * Body param:
624
843
  */
625
- method: 'eth_sendTransaction';
844
+ method: 'eth_signTypedData_v4';
626
845
  /**
627
846
  * Body param:
628
847
  */
629
- params: EthereumSendTransactionRpcInput.Params;
848
+ params: EthereumSignTypedDataRpcInput.Params;
630
849
  /**
631
850
  * Body param:
632
851
  */
@@ -635,10 +854,6 @@ export declare namespace WalletRpcParams {
635
854
  * Body param:
636
855
  */
637
856
  chain_type?: 'ethereum';
638
- /**
639
- * Body param:
640
- */
641
- sponsor?: boolean;
642
857
  /**
643
858
  * Header param: Request authorization signature. If multiple signatures are
644
859
  * required, they should be comma separated.
@@ -650,35 +865,40 @@ export declare namespace WalletRpcParams {
650
865
  */
651
866
  'privy-idempotency-key'?: string;
652
867
  }
653
- namespace EthereumSendTransactionRpcInput {
868
+ namespace EthereumSignTypedDataRpcInput {
654
869
  interface Params {
655
- transaction: Params.Transaction;
870
+ typed_data: Params.TypedData;
656
871
  }
657
872
  namespace Params {
658
- interface Transaction {
659
- chain_id?: string | number;
660
- data?: string;
661
- from?: string;
662
- gas_limit?: string | number;
663
- gas_price?: string | number;
664
- max_fee_per_gas?: string | number;
665
- max_priority_fee_per_gas?: string | number;
666
- nonce?: string | number;
667
- to?: string;
668
- type?: 0 | 1 | 2;
669
- value?: string | number;
873
+ interface TypedData {
874
+ domain: {
875
+ [key: string]: unknown;
876
+ };
877
+ message: {
878
+ [key: string]: unknown;
879
+ };
880
+ primary_type: string;
881
+ types: {
882
+ [key: string]: Array<TypedData.Type>;
883
+ };
884
+ }
885
+ namespace TypedData {
886
+ interface Type {
887
+ name: string;
888
+ type: string;
889
+ }
670
890
  }
671
891
  }
672
892
  }
673
- interface EthereumPersonalSignRpcInput {
893
+ interface EthereumSignTransactionRpcInput {
674
894
  /**
675
895
  * Body param:
676
896
  */
677
- method: 'personal_sign';
897
+ method: 'eth_signTransaction';
678
898
  /**
679
899
  * Body param:
680
900
  */
681
- params: EthereumPersonalSignRpcInput.Params;
901
+ params: EthereumSignTransactionRpcInput.Params;
682
902
  /**
683
903
  * Body param:
684
904
  */
@@ -698,21 +918,39 @@ export declare namespace WalletRpcParams {
698
918
  */
699
919
  'privy-idempotency-key'?: string;
700
920
  }
701
- namespace EthereumPersonalSignRpcInput {
921
+ namespace EthereumSignTransactionRpcInput {
702
922
  interface Params {
703
- encoding: 'utf-8' | 'hex';
704
- message: string;
923
+ transaction: Params.Transaction;
924
+ }
925
+ namespace Params {
926
+ interface Transaction {
927
+ chain_id?: string | number;
928
+ data?: string;
929
+ from?: string;
930
+ gas_limit?: string | number;
931
+ gas_price?: string | number;
932
+ max_fee_per_gas?: string | number;
933
+ max_priority_fee_per_gas?: string | number;
934
+ nonce?: string | number;
935
+ to?: string;
936
+ type?: 0 | 1 | 2;
937
+ value?: string | number;
938
+ }
705
939
  }
706
940
  }
707
- interface EthereumSignTypedDataRpcInput {
941
+ interface EthereumSendTransactionRpcInput {
708
942
  /**
709
943
  * Body param:
710
944
  */
711
- method: 'eth_signTypedData_v4';
945
+ caip2: string;
712
946
  /**
713
947
  * Body param:
714
948
  */
715
- params: EthereumSignTypedDataRpcInput.Params;
949
+ method: 'eth_sendTransaction';
950
+ /**
951
+ * Body param:
952
+ */
953
+ params: EthereumSendTransactionRpcInput.Params;
716
954
  /**
717
955
  * Body param:
718
956
  */
@@ -721,6 +959,10 @@ export declare namespace WalletRpcParams {
721
959
  * Body param:
722
960
  */
723
961
  chain_type?: 'ethereum';
962
+ /**
963
+ * Body param:
964
+ */
965
+ sponsor?: boolean;
724
966
  /**
725
967
  * Header param: Request authorization signature. If multiple signatures are
726
968
  * required, they should be comma separated.
@@ -732,28 +974,23 @@ export declare namespace WalletRpcParams {
732
974
  */
733
975
  'privy-idempotency-key'?: string;
734
976
  }
735
- namespace EthereumSignTypedDataRpcInput {
977
+ namespace EthereumSendTransactionRpcInput {
736
978
  interface Params {
737
- typed_data: Params.TypedData;
979
+ transaction: Params.Transaction;
738
980
  }
739
981
  namespace Params {
740
- interface TypedData {
741
- domain: {
742
- [key: string]: unknown;
743
- };
744
- message: {
745
- [key: string]: unknown;
746
- };
747
- primary_type: string;
748
- types: {
749
- [key: string]: Array<TypedData.Type>;
750
- };
751
- }
752
- namespace TypedData {
753
- interface Type {
754
- name: string;
755
- type: string;
756
- }
982
+ interface Transaction {
983
+ chain_id?: string | number;
984
+ data?: string;
985
+ from?: string;
986
+ gas_limit?: string | number;
987
+ gas_price?: string | number;
988
+ max_fee_per_gas?: string | number;
989
+ max_priority_fee_per_gas?: string | number;
990
+ nonce?: string | number;
991
+ to?: string;
992
+ type?: 0 | 1 | 2;
993
+ value?: string | number;
757
994
  }
758
995
  }
759
996
  }
@@ -825,15 +1062,15 @@ export declare namespace WalletRpcParams {
825
1062
  hash: string;
826
1063
  }
827
1064
  }
828
- interface SolanaSignTransactionRpcInput {
1065
+ interface SolanaSignMessageRpcInput {
829
1066
  /**
830
1067
  * Body param:
831
1068
  */
832
- method: 'signTransaction';
1069
+ method: 'signMessage';
833
1070
  /**
834
1071
  * Body param:
835
1072
  */
836
- params: SolanaSignTransactionRpcInput.Params;
1073
+ params: SolanaSignMessageRpcInput.Params;
837
1074
  /**
838
1075
  * Body param:
839
1076
  */
@@ -853,25 +1090,21 @@ export declare namespace WalletRpcParams {
853
1090
  */
854
1091
  'privy-idempotency-key'?: string;
855
1092
  }
856
- namespace SolanaSignTransactionRpcInput {
1093
+ namespace SolanaSignMessageRpcInput {
857
1094
  interface Params {
858
1095
  encoding: 'base64';
859
- transaction: string;
1096
+ message: string;
860
1097
  }
861
1098
  }
862
- interface SolanaSignAndSendTransactionRpcInput {
863
- /**
864
- * Body param:
865
- */
866
- caip2: string;
1099
+ interface SolanaSignTransactionRpcInput {
867
1100
  /**
868
1101
  * Body param:
869
1102
  */
870
- method: 'signAndSendTransaction';
1103
+ method: 'signTransaction';
871
1104
  /**
872
1105
  * Body param:
873
1106
  */
874
- params: SolanaSignAndSendTransactionRpcInput.Params;
1107
+ params: SolanaSignTransactionRpcInput.Params;
875
1108
  /**
876
1109
  * Body param:
877
1110
  */
@@ -880,10 +1113,6 @@ export declare namespace WalletRpcParams {
880
1113
  * Body param:
881
1114
  */
882
1115
  chain_type?: 'solana';
883
- /**
884
- * Body param:
885
- */
886
- sponsor?: boolean;
887
1116
  /**
888
1117
  * Header param: Request authorization signature. If multiple signatures are
889
1118
  * required, they should be comma separated.
@@ -895,21 +1124,25 @@ export declare namespace WalletRpcParams {
895
1124
  */
896
1125
  'privy-idempotency-key'?: string;
897
1126
  }
898
- namespace SolanaSignAndSendTransactionRpcInput {
1127
+ namespace SolanaSignTransactionRpcInput {
899
1128
  interface Params {
900
1129
  encoding: 'base64';
901
1130
  transaction: string;
902
1131
  }
903
1132
  }
904
- interface SolanaSignMessageRpcInput {
1133
+ interface SolanaSignAndSendTransactionRpcInput {
905
1134
  /**
906
1135
  * Body param:
907
1136
  */
908
- method: 'signMessage';
1137
+ caip2: string;
909
1138
  /**
910
1139
  * Body param:
911
1140
  */
912
- params: SolanaSignMessageRpcInput.Params;
1141
+ method: 'signAndSendTransaction';
1142
+ /**
1143
+ * Body param:
1144
+ */
1145
+ params: SolanaSignAndSendTransactionRpcInput.Params;
913
1146
  /**
914
1147
  * Body param:
915
1148
  */
@@ -918,6 +1151,10 @@ export declare namespace WalletRpcParams {
918
1151
  * Body param:
919
1152
  */
920
1153
  chain_type?: 'solana';
1154
+ /**
1155
+ * Body param:
1156
+ */
1157
+ sponsor?: boolean;
921
1158
  /**
922
1159
  * Header param: Request authorization signature. If multiple signatures are
923
1160
  * required, they should be comma separated.
@@ -929,10 +1166,10 @@ export declare namespace WalletRpcParams {
929
1166
  */
930
1167
  'privy-idempotency-key'?: string;
931
1168
  }
932
- namespace SolanaSignMessageRpcInput {
1169
+ namespace SolanaSignAndSendTransactionRpcInput {
933
1170
  interface Params {
934
1171
  encoding: 'base64';
935
- message: string;
1172
+ transaction: string;
936
1173
  }
937
1174
  }
938
1175
  }
@@ -1049,8 +1286,9 @@ export declare namespace WalletUpdateParams {
1049
1286
  override_policy_ids?: Array<string>;
1050
1287
  }
1051
1288
  /**
1052
- * The P-256 public key of the owner of the resource. If you provide this, do not
1053
- * specify an owner_id as it will be generated automatically.
1289
+ * The P-256 public key of the owner of the resource, in base64-encoded DER format.
1290
+ * If you provide this, do not specify an owner_id as it will be generated
1291
+ * automatically.
1054
1292
  */
1055
1293
  interface PublicKeyOwner {
1056
1294
  public_key: string;
@@ -1124,7 +1362,7 @@ export declare namespace WalletCreateWalletsWithRecoveryParams {
1124
1362
  }
1125
1363
  }
1126
1364
  export declare namespace Wallets {
1127
- export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type WalletChainType as WalletChainType, type WalletExportResponse as WalletExportResponse, type WalletInitImportResponse as WalletInitImportResponse, type WalletRawSignResponse as WalletRawSignResponse, type WalletRpcResponse as WalletRpcResponse, type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse, type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse, type WalletsCursor as WalletsCursor, type WalletCreateParams as WalletCreateParams, type WalletListParams as WalletListParams, type WalletExportParams as WalletExportParams, type WalletInitImportParams as WalletInitImportParams, type WalletRawSignParams as WalletRawSignParams, type WalletRpcParams as WalletRpcParams, type WalletSubmitImportParams as WalletSubmitImportParams, type WalletUpdateParams as WalletUpdateParams, type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams, type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams, };
1365
+ export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type WalletChainType as WalletChainType, type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput, type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput, type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput, type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput, type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput, type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput, type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput, type SolanaSignAndSendTransactionRpcInput as SolanaSignAndSendTransactionRpcInput, type SolanaSignMessageRpcInput as SolanaSignMessageRpcInput, type EthereumSignTransactionRpcResponse as EthereumSignTransactionRpcResponse, type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse, type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse, type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse, type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse, type EthereumSecp256k1SignRpcResponse as EthereumSecp256k1SignRpcResponse, type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse, type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse, type SolanaSignMessageRpcResponse as SolanaSignMessageRpcResponse, type WalletExportResponse as WalletExportResponse, type WalletInitImportResponse as WalletInitImportResponse, type WalletRawSignResponse as WalletRawSignResponse, type WalletRpcResponse as WalletRpcResponse, type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse, type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse, type WalletsCursor as WalletsCursor, type WalletCreateParams as WalletCreateParams, type WalletListParams as WalletListParams, type WalletExportParams as WalletExportParams, type WalletInitImportParams as WalletInitImportParams, type WalletRawSignParams as WalletRawSignParams, type WalletRpcParams as WalletRpcParams, type WalletSubmitImportParams as WalletSubmitImportParams, type WalletUpdateParams as WalletUpdateParams, type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams, type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams, };
1128
1366
  export { Transactions as Transactions, type TransactionGetResponse as TransactionGetResponse, type TransactionGetParams as TransactionGetParams, };
1129
1367
  export { Balance as Balance, type BalanceGetResponse as BalanceGetResponse, type BalanceGetParams as BalanceGetParams, };
1130
1368
  }