@privy-io/node 0.4.1 → 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 (65) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/lib/identity-token.d.mts.map +1 -1
  9. package/lib/identity-token.d.ts.map +1 -1
  10. package/lib/identity-token.js +10 -0
  11. package/lib/identity-token.js.map +1 -1
  12. package/lib/identity-token.mjs +10 -0
  13. package/lib/identity-token.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/public-api/services/ethereum.d.mts +7 -7
  16. package/public-api/services/ethereum.d.mts.map +1 -1
  17. package/public-api/services/ethereum.d.ts +7 -7
  18. package/public-api/services/ethereum.d.ts.map +1 -1
  19. package/public-api/services/ethereum.js.map +1 -1
  20. package/public-api/services/ethereum.mjs.map +1 -1
  21. package/public-api/services/solana.d.mts +4 -4
  22. package/public-api/services/solana.d.mts.map +1 -1
  23. package/public-api/services/solana.d.ts +4 -4
  24. package/public-api/services/solana.d.ts.map +1 -1
  25. package/public-api/services/solana.js.map +1 -1
  26. package/public-api/services/solana.mjs.map +1 -1
  27. package/resources/index.d.mts +1 -1
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +1 -1
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/users.d.mts +2 -2
  34. package/resources/users.d.mts.map +1 -1
  35. package/resources/users.d.ts +2 -2
  36. package/resources/users.d.ts.map +1 -1
  37. package/resources/users.js +1 -1
  38. package/resources/users.mjs +1 -1
  39. package/resources/wallets/index.d.mts +1 -1
  40. package/resources/wallets/index.d.mts.map +1 -1
  41. package/resources/wallets/index.d.ts +1 -1
  42. package/resources/wallets/index.d.ts.map +1 -1
  43. package/resources/wallets/index.js.map +1 -1
  44. package/resources/wallets/index.mjs.map +1 -1
  45. package/resources/wallets/wallets.d.mts +437 -221
  46. package/resources/wallets/wallets.d.mts.map +1 -1
  47. package/resources/wallets/wallets.d.ts +437 -221
  48. package/resources/wallets/wallets.d.ts.map +1 -1
  49. package/resources/wallets/wallets.js +2 -2
  50. package/resources/wallets/wallets.js.map +1 -1
  51. package/resources/wallets/wallets.mjs +2 -2
  52. package/resources/wallets/wallets.mjs.map +1 -1
  53. package/src/client.ts +36 -0
  54. package/src/lib/identity-token.ts +11 -0
  55. package/src/public-api/services/ethereum.ts +15 -7
  56. package/src/public-api/services/solana.ts +9 -4
  57. package/src/resources/index.ts +18 -0
  58. package/src/resources/users.ts +2 -2
  59. package/src/resources/wallets/index.ts +18 -0
  60. package/src/resources/wallets/wallets.ts +563 -252
  61. package/src/version.ts +1 -1
  62. package/version.d.mts +1 -1
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/version.mjs +1 -1
@@ -152,8 +152,8 @@ export class Wallets extends APIResource {
152
152
  * @example
153
153
  * ```ts
154
154
  * const response = await client.wallets._rpc('wallet_id', {
155
- * method: 'eth_signTransaction',
156
- * params: { transaction: {} },
155
+ * method: 'personal_sign',
156
+ * params: { encoding: 'utf-8', message: 'message' },
157
157
  * });
158
158
  * ```
159
159
  */
@@ -376,233 +376,526 @@ export type WalletChainType =
376
376
  | 'starknet'
377
377
  | 'spark';
378
378
 
379
- export interface WalletExportResponse {
380
- /**
381
- * The encrypted private key.
382
- */
383
- ciphertext: string;
379
+ /**
380
+ * Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
381
+ */
382
+ export interface EthereumPersonalSignRpcInput {
383
+ method: 'personal_sign';
384
384
 
385
- /**
386
- * The base64-encoded encapsulated key that was generated during encryption, for
387
- * use during decryption.
388
- */
389
- encapsulated_key: string;
385
+ params: EthereumPersonalSignRpcInput.Params;
390
386
 
391
- /**
392
- * The encryption type of the wallet to import. Currently only supports `HPKE`.
393
- */
394
- encryption_type: 'HPKE';
387
+ address?: string;
388
+
389
+ chain_type?: 'ethereum';
395
390
  }
396
391
 
397
- export interface WalletInitImportResponse {
398
- /**
399
- * The base64-encoded encryption public key to encrypt the wallet entropy with.
400
- */
401
- encryption_public_key: string;
392
+ export namespace EthereumPersonalSignRpcInput {
393
+ export interface Params {
394
+ encoding: 'utf-8' | 'hex';
402
395
 
403
- /**
404
- * The encryption type of the wallet to import. Currently only supports `HPKE`.
405
- */
406
- encryption_type: 'HPKE';
396
+ message: string;
397
+ }
407
398
  }
408
399
 
409
- export interface WalletRawSignResponse {
410
- data: WalletRawSignResponse.Data;
400
+ /**
401
+ * Executes the EVM `eth_signTransaction` RPC to sign a transaction.
402
+ */
403
+ export interface EthereumSignTransactionRpcInput {
404
+ method: 'eth_signTransaction';
405
+
406
+ params: EthereumSignTransactionRpcInput.Params;
407
+
408
+ address?: string;
409
+
410
+ chain_type?: 'ethereum';
411
411
  }
412
412
 
413
- export namespace WalletRawSignResponse {
414
- export interface Data {
415
- encoding: 'hex';
413
+ export namespace EthereumSignTransactionRpcInput {
414
+ export interface Params {
415
+ transaction: Params.Transaction;
416
+ }
416
417
 
417
- signature: string;
418
+ export namespace Params {
419
+ export interface Transaction {
420
+ chain_id?: string | number;
421
+
422
+ data?: string;
423
+
424
+ from?: string;
425
+
426
+ gas_limit?: string | number;
427
+
428
+ gas_price?: string | number;
429
+
430
+ max_fee_per_gas?: string | number;
431
+
432
+ max_priority_fee_per_gas?: string | number;
433
+
434
+ nonce?: string | number;
435
+
436
+ to?: string;
437
+
438
+ type?: 0 | 1 | 2;
439
+
440
+ value?: string | number;
441
+ }
418
442
  }
419
443
  }
420
444
 
421
- export type WalletRpcResponse =
422
- | WalletRpcResponse.SolanaSignTransactionRpcResponse
423
- | WalletRpcResponse.SolanaSignAndSendTransactionRpcResponse
424
- | WalletRpcResponse.SolanaSignMessageRpcResponse
425
- | WalletRpcResponse.EthereumSignTransactionRpcResponse
426
- | WalletRpcResponse.EthereumSendTransactionRpcResponse
427
- | WalletRpcResponse.EthereumPersonalSignRpcResponse
428
- | WalletRpcResponse.EthereumSignTypedDataRpcResponse
429
- | WalletRpcResponse.EthereumSign7702AuthorizationRpcResponse
430
- | WalletRpcResponse.EthereumSecp256k1SignRpcResponse;
431
-
432
- export namespace WalletRpcResponse {
433
- export interface SolanaSignTransactionRpcResponse {
434
- data: SolanaSignTransactionRpcResponse.Data;
445
+ /**
446
+ * Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
447
+ */
448
+ export interface EthereumSendTransactionRpcInput {
449
+ caip2: string;
435
450
 
436
- method: 'signTransaction';
451
+ method: 'eth_sendTransaction';
452
+
453
+ params: EthereumSendTransactionRpcInput.Params;
454
+
455
+ address?: string;
456
+
457
+ chain_type?: 'ethereum';
458
+
459
+ sponsor?: boolean;
460
+ }
461
+
462
+ export namespace EthereumSendTransactionRpcInput {
463
+ export interface Params {
464
+ transaction: Params.Transaction;
437
465
  }
438
466
 
439
- export namespace SolanaSignTransactionRpcResponse {
440
- export interface Data {
441
- encoding: 'base64';
467
+ export namespace Params {
468
+ export interface Transaction {
469
+ chain_id?: string | number;
470
+
471
+ data?: string;
442
472
 
443
- signed_transaction: string;
473
+ from?: string;
474
+
475
+ gas_limit?: string | number;
476
+
477
+ gas_price?: string | number;
478
+
479
+ max_fee_per_gas?: string | number;
480
+
481
+ max_priority_fee_per_gas?: string | number;
482
+
483
+ nonce?: string | number;
484
+
485
+ to?: string;
486
+
487
+ type?: 0 | 1 | 2;
488
+
489
+ value?: string | number;
444
490
  }
445
491
  }
492
+ }
493
+
494
+ /**
495
+ * Executes the EVM `eth_signTypedData_v4` RPC (EIP-712) to sign a typed data
496
+ * object.
497
+ */
498
+ export interface EthereumSignTypedDataRpcInput {
499
+ method: 'eth_signTypedData_v4';
446
500
 
447
- export interface SolanaSignAndSendTransactionRpcResponse {
448
- data: SolanaSignAndSendTransactionRpcResponse.Data;
501
+ params: EthereumSignTypedDataRpcInput.Params;
449
502
 
450
- method: 'signAndSendTransaction';
503
+ address?: string;
504
+
505
+ chain_type?: 'ethereum';
506
+ }
507
+
508
+ export namespace EthereumSignTypedDataRpcInput {
509
+ export interface Params {
510
+ typed_data: Params.TypedData;
451
511
  }
452
512
 
453
- export namespace SolanaSignAndSendTransactionRpcResponse {
454
- export interface Data {
455
- caip2: string;
513
+ export namespace Params {
514
+ export interface TypedData {
515
+ domain: { [key: string]: unknown };
456
516
 
457
- hash: string;
517
+ message: { [key: string]: unknown };
518
+
519
+ primary_type: string;
520
+
521
+ types: { [key: string]: Array<TypedData.Type> };
522
+ }
523
+
524
+ export namespace TypedData {
525
+ export interface Type {
526
+ name: string;
458
527
 
459
- transaction_id?: string;
528
+ type: string;
529
+ }
460
530
  }
461
531
  }
532
+ }
462
533
 
463
- export interface SolanaSignMessageRpcResponse {
464
- data: SolanaSignMessageRpcResponse.Data;
534
+ /**
535
+ * Signs an EIP-7702 authorization.
536
+ */
537
+ export interface EthereumSign7702AuthorizationRpcInput {
538
+ method: 'eth_sign7702Authorization';
465
539
 
466
- method: 'signMessage';
540
+ params: EthereumSign7702AuthorizationRpcInput.Params;
541
+
542
+ address?: string;
543
+
544
+ chain_type?: 'ethereum';
545
+ }
546
+
547
+ export namespace EthereumSign7702AuthorizationRpcInput {
548
+ export interface Params {
549
+ chain_id: string | number;
550
+
551
+ contract: string;
552
+
553
+ nonce?: string | number;
467
554
  }
555
+ }
468
556
 
469
- export namespace SolanaSignMessageRpcResponse {
470
- export interface Data {
471
- encoding: 'base64';
557
+ /**
558
+ * Signs a raw hash on the secp256k1 curve.
559
+ */
560
+ export interface EthereumSecp256k1SignRpcInput {
561
+ method: 'secp256k1_sign';
472
562
 
473
- signature: string;
474
- }
563
+ params: EthereumSecp256k1SignRpcInput.Params;
564
+
565
+ address?: string;
566
+
567
+ chain_type?: 'ethereum';
568
+ }
569
+
570
+ export namespace EthereumSecp256k1SignRpcInput {
571
+ export interface Params {
572
+ hash: string;
475
573
  }
574
+ }
476
575
 
477
- export interface EthereumSignTransactionRpcResponse {
478
- data: EthereumSignTransactionRpcResponse.Data;
576
+ /**
577
+ * Executes the SVM `signTransaction` RPC to sign a transaction.
578
+ */
579
+ export interface SolanaSignTransactionRpcInput {
580
+ method: 'signTransaction';
479
581
 
480
- method: 'eth_signTransaction';
582
+ params: SolanaSignTransactionRpcInput.Params;
583
+
584
+ address?: string;
585
+
586
+ chain_type?: 'solana';
587
+ }
588
+
589
+ export namespace SolanaSignTransactionRpcInput {
590
+ export interface Params {
591
+ encoding: 'base64';
592
+
593
+ transaction: string;
481
594
  }
595
+ }
482
596
 
483
- export namespace EthereumSignTransactionRpcResponse {
484
- export interface Data {
485
- encoding: 'rlp';
597
+ /**
598
+ * Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
599
+ * transaction.
600
+ */
601
+ export interface SolanaSignAndSendTransactionRpcInput {
602
+ caip2: string;
486
603
 
487
- signed_transaction: string;
488
- }
604
+ method: 'signAndSendTransaction';
605
+
606
+ params: SolanaSignAndSendTransactionRpcInput.Params;
607
+
608
+ address?: string;
609
+
610
+ chain_type?: 'solana';
611
+
612
+ sponsor?: boolean;
613
+ }
614
+
615
+ export namespace SolanaSignAndSendTransactionRpcInput {
616
+ export interface Params {
617
+ encoding: 'base64';
618
+
619
+ transaction: string;
489
620
  }
621
+ }
490
622
 
491
- export interface EthereumSendTransactionRpcResponse {
492
- data: EthereumSendTransactionRpcResponse.Data;
623
+ /**
624
+ * Executes the SVM `signMessage` RPC to sign a message.
625
+ */
626
+ export interface SolanaSignMessageRpcInput {
627
+ method: 'signMessage';
493
628
 
494
- method: 'eth_sendTransaction';
629
+ params: SolanaSignMessageRpcInput.Params;
630
+
631
+ address?: string;
632
+
633
+ chain_type?: 'solana';
634
+ }
635
+
636
+ export namespace SolanaSignMessageRpcInput {
637
+ export interface Params {
638
+ encoding: 'base64';
639
+
640
+ message: string;
495
641
  }
642
+ }
496
643
 
497
- export namespace EthereumSendTransactionRpcResponse {
498
- export interface Data {
499
- caip2: string;
644
+ /**
645
+ * Response to the EVM `eth_signTransaction` RPC.
646
+ */
647
+ export interface EthereumSignTransactionRpcResponse {
648
+ data: EthereumSignTransactionRpcResponse.Data;
500
649
 
501
- hash: string;
650
+ method: 'eth_signTransaction';
651
+ }
502
652
 
503
- transaction_id?: string;
653
+ export namespace EthereumSignTransactionRpcResponse {
654
+ export interface Data {
655
+ encoding: 'rlp';
504
656
 
505
- transaction_request?: Data.TransactionRequest;
506
- }
657
+ signed_transaction: string;
658
+ }
659
+ }
507
660
 
508
- export namespace Data {
509
- export interface TransactionRequest {
510
- chain_id?: string | number;
661
+ /**
662
+ * Response to the EVM `eth_sendTransaction` RPC.
663
+ */
664
+ export interface EthereumSendTransactionRpcResponse {
665
+ data: EthereumSendTransactionRpcResponse.Data;
511
666
 
512
- data?: string;
667
+ method: 'eth_sendTransaction';
668
+ }
513
669
 
514
- from?: string;
670
+ export namespace EthereumSendTransactionRpcResponse {
671
+ export interface Data {
672
+ caip2: string;
515
673
 
516
- gas_limit?: string | number;
674
+ hash: string;
517
675
 
518
- gas_price?: string | number;
676
+ transaction_id?: string;
519
677
 
520
- max_fee_per_gas?: string | number;
678
+ transaction_request?: Data.TransactionRequest;
679
+ }
521
680
 
522
- max_priority_fee_per_gas?: string | number;
681
+ export namespace Data {
682
+ export interface TransactionRequest {
683
+ chain_id?: string | number;
523
684
 
524
- nonce?: string | number;
685
+ data?: string;
525
686
 
526
- to?: string;
687
+ from?: string;
527
688
 
528
- type?: 0 | 1 | 2;
689
+ gas_limit?: string | number;
529
690
 
530
- value?: string | number;
531
- }
691
+ gas_price?: string | number;
692
+
693
+ max_fee_per_gas?: string | number;
694
+
695
+ max_priority_fee_per_gas?: string | number;
696
+
697
+ nonce?: string | number;
698
+
699
+ to?: string;
700
+
701
+ type?: 0 | 1 | 2;
702
+
703
+ value?: string | number;
532
704
  }
533
705
  }
706
+ }
534
707
 
535
- export interface EthereumPersonalSignRpcResponse {
536
- data: EthereumPersonalSignRpcResponse.Data;
708
+ /**
709
+ * Response to the EVM `personal_sign` RPC.
710
+ */
711
+ export interface EthereumPersonalSignRpcResponse {
712
+ data: EthereumPersonalSignRpcResponse.Data;
537
713
 
538
- method: 'personal_sign';
714
+ method: 'personal_sign';
715
+ }
716
+
717
+ export namespace EthereumPersonalSignRpcResponse {
718
+ export interface Data {
719
+ encoding: 'hex';
720
+
721
+ signature: string;
539
722
  }
723
+ }
540
724
 
541
- export namespace EthereumPersonalSignRpcResponse {
542
- export interface Data {
543
- encoding: 'hex';
725
+ /**
726
+ * Response to the EVM `eth_signTypedData_v4` RPC.
727
+ */
728
+ export interface EthereumSignTypedDataRpcResponse {
729
+ data: EthereumSignTypedDataRpcResponse.Data;
544
730
 
545
- signature: string;
546
- }
731
+ method: 'eth_signTypedData_v4';
732
+ }
733
+
734
+ export namespace EthereumSignTypedDataRpcResponse {
735
+ export interface Data {
736
+ encoding: 'hex';
737
+
738
+ signature: string;
547
739
  }
740
+ }
741
+
742
+ /**
743
+ * Response to the EVM `eth_sign7702Authorization` RPC.
744
+ */
745
+ export interface EthereumSign7702AuthorizationRpcResponse {
746
+ data: EthereumSign7702AuthorizationRpcResponse.Data;
548
747
 
549
- export interface EthereumSignTypedDataRpcResponse {
550
- data: EthereumSignTypedDataRpcResponse.Data;
748
+ method: 'eth_sign7702Authorization';
749
+ }
551
750
 
552
- method: 'eth_signTypedData_v4';
751
+ export namespace EthereumSign7702AuthorizationRpcResponse {
752
+ export interface Data {
753
+ authorization: Data.Authorization;
553
754
  }
554
755
 
555
- export namespace EthereumSignTypedDataRpcResponse {
556
- export interface Data {
557
- encoding: 'hex';
756
+ export namespace Data {
757
+ export interface Authorization {
758
+ chain_id: string | number;
759
+
760
+ contract: string;
761
+
762
+ nonce: string | number;
558
763
 
559
- signature: string;
764
+ r: string;
765
+
766
+ s: string;
767
+
768
+ y_parity: number;
560
769
  }
561
770
  }
771
+ }
772
+
773
+ /**
774
+ * Response to the EVM `secp256k1_sign` RPC.
775
+ */
776
+ export interface EthereumSecp256k1SignRpcResponse {
777
+ data: EthereumSecp256k1SignRpcResponse.Data;
562
778
 
563
- export interface EthereumSign7702AuthorizationRpcResponse {
564
- data: EthereumSign7702AuthorizationRpcResponse.Data;
779
+ method: 'secp256k1_sign';
780
+ }
565
781
 
566
- method: 'eth_sign7702Authorization';
782
+ export namespace EthereumSecp256k1SignRpcResponse {
783
+ export interface Data {
784
+ encoding: 'hex';
785
+
786
+ signature: string;
567
787
  }
788
+ }
568
789
 
569
- export namespace EthereumSign7702AuthorizationRpcResponse {
570
- export interface Data {
571
- authorization: Data.Authorization;
572
- }
790
+ /**
791
+ * Response to the SVM `signTransaction` RPC.
792
+ */
793
+ export interface SolanaSignTransactionRpcResponse {
794
+ data: SolanaSignTransactionRpcResponse.Data;
573
795
 
574
- export namespace Data {
575
- export interface Authorization {
576
- chain_id: string | number;
796
+ method: 'signTransaction';
797
+ }
577
798
 
578
- contract: string;
799
+ export namespace SolanaSignTransactionRpcResponse {
800
+ export interface Data {
801
+ encoding: 'base64';
579
802
 
580
- nonce: string | number;
803
+ signed_transaction: string;
804
+ }
805
+ }
581
806
 
582
- r: string;
807
+ /**
808
+ * Response to the SVM `signAndSendTransaction` RPC.
809
+ */
810
+ export interface SolanaSignAndSendTransactionRpcResponse {
811
+ data: SolanaSignAndSendTransactionRpcResponse.Data;
583
812
 
584
- s: string;
813
+ method: 'signAndSendTransaction';
814
+ }
585
815
 
586
- y_parity: number;
587
- }
588
- }
816
+ export namespace SolanaSignAndSendTransactionRpcResponse {
817
+ export interface Data {
818
+ caip2: string;
819
+
820
+ hash: string;
821
+
822
+ transaction_id?: string;
589
823
  }
824
+ }
825
+
826
+ /**
827
+ * Response to the SVM `signMessage` RPC.
828
+ */
829
+ export interface SolanaSignMessageRpcResponse {
830
+ data: SolanaSignMessageRpcResponse.Data;
590
831
 
591
- export interface EthereumSecp256k1SignRpcResponse {
592
- data: EthereumSecp256k1SignRpcResponse.Data;
832
+ method: 'signMessage';
833
+ }
593
834
 
594
- method: 'secp256k1_sign';
835
+ export namespace SolanaSignMessageRpcResponse {
836
+ export interface Data {
837
+ encoding: 'base64';
838
+
839
+ signature: string;
595
840
  }
841
+ }
596
842
 
597
- export namespace EthereumSecp256k1SignRpcResponse {
598
- export interface Data {
599
- encoding: 'hex';
843
+ export interface WalletExportResponse {
844
+ /**
845
+ * The encrypted private key.
846
+ */
847
+ ciphertext: string;
600
848
 
601
- signature: string;
602
- }
849
+ /**
850
+ * The base64-encoded encapsulated key that was generated during encryption, for
851
+ * use during decryption.
852
+ */
853
+ encapsulated_key: string;
854
+
855
+ /**
856
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
857
+ */
858
+ encryption_type: 'HPKE';
859
+ }
860
+
861
+ export interface WalletInitImportResponse {
862
+ /**
863
+ * The base64-encoded encryption public key to encrypt the wallet entropy with.
864
+ */
865
+ encryption_public_key: string;
866
+
867
+ /**
868
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
869
+ */
870
+ encryption_type: 'HPKE';
871
+ }
872
+
873
+ export interface WalletRawSignResponse {
874
+ data: WalletRawSignResponse.Data;
875
+ }
876
+
877
+ export namespace WalletRawSignResponse {
878
+ export interface Data {
879
+ encoding: 'hex';
880
+
881
+ signature: string;
603
882
  }
604
883
  }
605
884
 
885
+ /**
886
+ * Response to the EVM `personal_sign` RPC.
887
+ */
888
+ export type WalletRpcResponse =
889
+ | EthereumPersonalSignRpcResponse
890
+ | EthereumSignTypedDataRpcResponse
891
+ | EthereumSignTransactionRpcResponse
892
+ | EthereumSendTransactionRpcResponse
893
+ | EthereumSign7702AuthorizationRpcResponse
894
+ | EthereumSecp256k1SignRpcResponse
895
+ | SolanaSignMessageRpcResponse
896
+ | SolanaSignTransactionRpcResponse
897
+ | SolanaSignAndSendTransactionRpcResponse;
898
+
606
899
  export type WalletAuthenticateWithJwtResponse =
607
900
  | WalletAuthenticateWithJwtResponse.WithEncryption
608
901
  | WalletAuthenticateWithJwtResponse.WithoutEncryption;
@@ -837,7 +1130,7 @@ export interface WalletRawSignParams {
837
1130
  /**
838
1131
  * Body param: Sign a pre-computed hash
839
1132
  */
840
- params: WalletRawSignParams.Hash | WalletRawSignParams.UnionMember1;
1133
+ params: WalletRawSignParams.Hash | WalletRawSignParams.Bytes;
841
1134
 
842
1135
  /**
843
1136
  * Header param: Request authorization signature. If multiple signatures are
@@ -866,7 +1159,7 @@ export namespace WalletRawSignParams {
866
1159
  /**
867
1160
  * Hash and sign bytes (Tron only)
868
1161
  */
869
- export interface UnionMember1 {
1162
+ export interface Bytes {
870
1163
  /**
871
1164
  * The bytes to hash and sign.
872
1165
  */
@@ -880,27 +1173,27 @@ export namespace WalletRawSignParams {
880
1173
  }
881
1174
 
882
1175
  export type WalletRpcParams =
883
- | WalletRpcParams.EthereumSignTransactionRpcInput
884
- | WalletRpcParams.EthereumSendTransactionRpcInput
885
1176
  | WalletRpcParams.EthereumPersonalSignRpcInput
886
1177
  | WalletRpcParams.EthereumSignTypedDataRpcInput
1178
+ | WalletRpcParams.EthereumSignTransactionRpcInput
1179
+ | WalletRpcParams.EthereumSendTransactionRpcInput
887
1180
  | WalletRpcParams.EthereumSign7702AuthorizationRpcInput
888
1181
  | WalletRpcParams.EthereumSecp256k1SignRpcInput
1182
+ | WalletRpcParams.SolanaSignMessageRpcInput
889
1183
  | WalletRpcParams.SolanaSignTransactionRpcInput
890
- | WalletRpcParams.SolanaSignAndSendTransactionRpcInput
891
- | WalletRpcParams.SolanaSignMessageRpcInput;
1184
+ | WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
892
1185
 
893
1186
  export declare namespace WalletRpcParams {
894
- export interface EthereumSignTransactionRpcInput {
1187
+ export interface EthereumPersonalSignRpcInput {
895
1188
  /**
896
1189
  * Body param:
897
1190
  */
898
- method: 'eth_signTransaction';
1191
+ method: 'personal_sign';
899
1192
 
900
1193
  /**
901
1194
  * Body param:
902
1195
  */
903
- params: EthereumSignTransactionRpcInput.Params;
1196
+ params: EthereumPersonalSignRpcInput.Params;
904
1197
 
905
1198
  /**
906
1199
  * Body param:
@@ -925,53 +1218,24 @@ export declare namespace WalletRpcParams {
925
1218
  'privy-idempotency-key'?: string;
926
1219
  }
927
1220
 
928
- export namespace EthereumSignTransactionRpcInput {
1221
+ export namespace EthereumPersonalSignRpcInput {
929
1222
  export interface Params {
930
- transaction: Params.Transaction;
931
- }
932
-
933
- export namespace Params {
934
- export interface Transaction {
935
- chain_id?: string | number;
936
-
937
- data?: string;
938
-
939
- from?: string;
940
-
941
- gas_limit?: string | number;
942
-
943
- gas_price?: string | number;
944
-
945
- max_fee_per_gas?: string | number;
946
-
947
- max_priority_fee_per_gas?: string | number;
948
-
949
- nonce?: string | number;
950
-
951
- to?: string;
952
-
953
- type?: 0 | 1 | 2;
1223
+ encoding: 'utf-8' | 'hex';
954
1224
 
955
- value?: string | number;
956
- }
1225
+ message: string;
957
1226
  }
958
1227
  }
959
1228
 
960
- export interface EthereumSendTransactionRpcInput {
961
- /**
962
- * Body param:
963
- */
964
- caip2: string;
965
-
1229
+ export interface EthereumSignTypedDataRpcInput {
966
1230
  /**
967
1231
  * Body param:
968
1232
  */
969
- method: 'eth_sendTransaction';
1233
+ method: 'eth_signTypedData_v4';
970
1234
 
971
1235
  /**
972
1236
  * Body param:
973
1237
  */
974
- params: EthereumSendTransactionRpcInput.Params;
1238
+ params: EthereumSignTypedDataRpcInput.Params;
975
1239
 
976
1240
  /**
977
1241
  * Body param:
@@ -983,11 +1247,6 @@ export declare namespace WalletRpcParams {
983
1247
  */
984
1248
  chain_type?: 'ethereum';
985
1249
 
986
- /**
987
- * Body param:
988
- */
989
- sponsor?: boolean;
990
-
991
1250
  /**
992
1251
  * Header param: Request authorization signature. If multiple signatures are
993
1252
  * required, they should be comma separated.
@@ -1001,48 +1260,42 @@ export declare namespace WalletRpcParams {
1001
1260
  'privy-idempotency-key'?: string;
1002
1261
  }
1003
1262
 
1004
- export namespace EthereumSendTransactionRpcInput {
1263
+ export namespace EthereumSignTypedDataRpcInput {
1005
1264
  export interface Params {
1006
- transaction: Params.Transaction;
1265
+ typed_data: Params.TypedData;
1007
1266
  }
1008
1267
 
1009
1268
  export namespace Params {
1010
- export interface Transaction {
1011
- chain_id?: string | number;
1012
-
1013
- data?: string;
1014
-
1015
- from?: string;
1016
-
1017
- gas_limit?: string | number;
1018
-
1019
- gas_price?: string | number;
1020
-
1021
- max_fee_per_gas?: string | number;
1269
+ export interface TypedData {
1270
+ domain: { [key: string]: unknown };
1022
1271
 
1023
- max_priority_fee_per_gas?: string | number;
1272
+ message: { [key: string]: unknown };
1024
1273
 
1025
- nonce?: string | number;
1274
+ primary_type: string;
1026
1275
 
1027
- to?: string;
1276
+ types: { [key: string]: Array<TypedData.Type> };
1277
+ }
1028
1278
 
1029
- type?: 0 | 1 | 2;
1279
+ export namespace TypedData {
1280
+ export interface Type {
1281
+ name: string;
1030
1282
 
1031
- value?: string | number;
1283
+ type: string;
1284
+ }
1032
1285
  }
1033
1286
  }
1034
1287
  }
1035
1288
 
1036
- export interface EthereumPersonalSignRpcInput {
1289
+ export interface EthereumSignTransactionRpcInput {
1037
1290
  /**
1038
1291
  * Body param:
1039
1292
  */
1040
- method: 'personal_sign';
1293
+ method: 'eth_signTransaction';
1041
1294
 
1042
1295
  /**
1043
1296
  * Body param:
1044
1297
  */
1045
- params: EthereumPersonalSignRpcInput.Params;
1298
+ params: EthereumSignTransactionRpcInput.Params;
1046
1299
 
1047
1300
  /**
1048
1301
  * Body param:
@@ -1067,24 +1320,53 @@ export declare namespace WalletRpcParams {
1067
1320
  'privy-idempotency-key'?: string;
1068
1321
  }
1069
1322
 
1070
- export namespace EthereumPersonalSignRpcInput {
1323
+ export namespace EthereumSignTransactionRpcInput {
1071
1324
  export interface Params {
1072
- encoding: 'utf-8' | 'hex';
1325
+ transaction: Params.Transaction;
1326
+ }
1073
1327
 
1074
- message: string;
1328
+ export namespace Params {
1329
+ export interface Transaction {
1330
+ chain_id?: string | number;
1331
+
1332
+ data?: string;
1333
+
1334
+ from?: string;
1335
+
1336
+ gas_limit?: string | number;
1337
+
1338
+ gas_price?: string | number;
1339
+
1340
+ max_fee_per_gas?: string | number;
1341
+
1342
+ max_priority_fee_per_gas?: string | number;
1343
+
1344
+ nonce?: string | number;
1345
+
1346
+ to?: string;
1347
+
1348
+ type?: 0 | 1 | 2;
1349
+
1350
+ value?: string | number;
1351
+ }
1075
1352
  }
1076
1353
  }
1077
1354
 
1078
- export interface EthereumSignTypedDataRpcInput {
1355
+ export interface EthereumSendTransactionRpcInput {
1079
1356
  /**
1080
1357
  * Body param:
1081
1358
  */
1082
- method: 'eth_signTypedData_v4';
1359
+ caip2: string;
1083
1360
 
1084
1361
  /**
1085
1362
  * Body param:
1086
1363
  */
1087
- params: EthereumSignTypedDataRpcInput.Params;
1364
+ method: 'eth_sendTransaction';
1365
+
1366
+ /**
1367
+ * Body param:
1368
+ */
1369
+ params: EthereumSendTransactionRpcInput.Params;
1088
1370
 
1089
1371
  /**
1090
1372
  * Body param:
@@ -1096,6 +1378,11 @@ export declare namespace WalletRpcParams {
1096
1378
  */
1097
1379
  chain_type?: 'ethereum';
1098
1380
 
1381
+ /**
1382
+ * Body param:
1383
+ */
1384
+ sponsor?: boolean;
1385
+
1099
1386
  /**
1100
1387
  * Header param: Request authorization signature. If multiple signatures are
1101
1388
  * required, they should be comma separated.
@@ -1109,28 +1396,34 @@ export declare namespace WalletRpcParams {
1109
1396
  'privy-idempotency-key'?: string;
1110
1397
  }
1111
1398
 
1112
- export namespace EthereumSignTypedDataRpcInput {
1399
+ export namespace EthereumSendTransactionRpcInput {
1113
1400
  export interface Params {
1114
- typed_data: Params.TypedData;
1401
+ transaction: Params.Transaction;
1115
1402
  }
1116
1403
 
1117
1404
  export namespace Params {
1118
- export interface TypedData {
1119
- domain: { [key: string]: unknown };
1405
+ export interface Transaction {
1406
+ chain_id?: string | number;
1120
1407
 
1121
- message: { [key: string]: unknown };
1408
+ data?: string;
1122
1409
 
1123
- primary_type: string;
1410
+ from?: string;
1124
1411
 
1125
- types: { [key: string]: Array<TypedData.Type> };
1126
- }
1412
+ gas_limit?: string | number;
1127
1413
 
1128
- export namespace TypedData {
1129
- export interface Type {
1130
- name: string;
1414
+ gas_price?: string | number;
1131
1415
 
1132
- type: string;
1133
- }
1416
+ max_fee_per_gas?: string | number;
1417
+
1418
+ max_priority_fee_per_gas?: string | number;
1419
+
1420
+ nonce?: string | number;
1421
+
1422
+ to?: string;
1423
+
1424
+ type?: 0 | 1 | 2;
1425
+
1426
+ value?: string | number;
1134
1427
  }
1135
1428
  }
1136
1429
  }
@@ -1219,16 +1512,16 @@ export declare namespace WalletRpcParams {
1219
1512
  }
1220
1513
  }
1221
1514
 
1222
- export interface SolanaSignTransactionRpcInput {
1515
+ export interface SolanaSignMessageRpcInput {
1223
1516
  /**
1224
1517
  * Body param:
1225
1518
  */
1226
- method: 'signTransaction';
1519
+ method: 'signMessage';
1227
1520
 
1228
1521
  /**
1229
1522
  * Body param:
1230
1523
  */
1231
- params: SolanaSignTransactionRpcInput.Params;
1524
+ params: SolanaSignMessageRpcInput.Params;
1232
1525
 
1233
1526
  /**
1234
1527
  * Body param:
@@ -1253,29 +1546,24 @@ export declare namespace WalletRpcParams {
1253
1546
  'privy-idempotency-key'?: string;
1254
1547
  }
1255
1548
 
1256
- export namespace SolanaSignTransactionRpcInput {
1549
+ export namespace SolanaSignMessageRpcInput {
1257
1550
  export interface Params {
1258
1551
  encoding: 'base64';
1259
1552
 
1260
- transaction: string;
1553
+ message: string;
1261
1554
  }
1262
1555
  }
1263
1556
 
1264
- export interface SolanaSignAndSendTransactionRpcInput {
1265
- /**
1266
- * Body param:
1267
- */
1268
- caip2: string;
1269
-
1557
+ export interface SolanaSignTransactionRpcInput {
1270
1558
  /**
1271
1559
  * Body param:
1272
1560
  */
1273
- method: 'signAndSendTransaction';
1561
+ method: 'signTransaction';
1274
1562
 
1275
1563
  /**
1276
1564
  * Body param:
1277
1565
  */
1278
- params: SolanaSignAndSendTransactionRpcInput.Params;
1566
+ params: SolanaSignTransactionRpcInput.Params;
1279
1567
 
1280
1568
  /**
1281
1569
  * Body param:
@@ -1287,11 +1575,6 @@ export declare namespace WalletRpcParams {
1287
1575
  */
1288
1576
  chain_type?: 'solana';
1289
1577
 
1290
- /**
1291
- * Body param:
1292
- */
1293
- sponsor?: boolean;
1294
-
1295
1578
  /**
1296
1579
  * Header param: Request authorization signature. If multiple signatures are
1297
1580
  * required, they should be comma separated.
@@ -1305,7 +1588,7 @@ export declare namespace WalletRpcParams {
1305
1588
  'privy-idempotency-key'?: string;
1306
1589
  }
1307
1590
 
1308
- export namespace SolanaSignAndSendTransactionRpcInput {
1591
+ export namespace SolanaSignTransactionRpcInput {
1309
1592
  export interface Params {
1310
1593
  encoding: 'base64';
1311
1594
 
@@ -1313,16 +1596,21 @@ export declare namespace WalletRpcParams {
1313
1596
  }
1314
1597
  }
1315
1598
 
1316
- export interface SolanaSignMessageRpcInput {
1599
+ export interface SolanaSignAndSendTransactionRpcInput {
1317
1600
  /**
1318
1601
  * Body param:
1319
1602
  */
1320
- method: 'signMessage';
1603
+ caip2: string;
1321
1604
 
1322
1605
  /**
1323
1606
  * Body param:
1324
1607
  */
1325
- params: SolanaSignMessageRpcInput.Params;
1608
+ method: 'signAndSendTransaction';
1609
+
1610
+ /**
1611
+ * Body param:
1612
+ */
1613
+ params: SolanaSignAndSendTransactionRpcInput.Params;
1326
1614
 
1327
1615
  /**
1328
1616
  * Body param:
@@ -1334,6 +1622,11 @@ export declare namespace WalletRpcParams {
1334
1622
  */
1335
1623
  chain_type?: 'solana';
1336
1624
 
1625
+ /**
1626
+ * Body param:
1627
+ */
1628
+ sponsor?: boolean;
1629
+
1337
1630
  /**
1338
1631
  * Header param: Request authorization signature. If multiple signatures are
1339
1632
  * required, they should be comma separated.
@@ -1347,11 +1640,11 @@ export declare namespace WalletRpcParams {
1347
1640
  'privy-idempotency-key'?: string;
1348
1641
  }
1349
1642
 
1350
- export namespace SolanaSignMessageRpcInput {
1643
+ export namespace SolanaSignAndSendTransactionRpcInput {
1351
1644
  export interface Params {
1352
1645
  encoding: 'base64';
1353
1646
 
1354
- message: string;
1647
+ transaction: string;
1355
1648
  }
1356
1649
  }
1357
1650
  }
@@ -1598,6 +1891,24 @@ export declare namespace Wallets {
1598
1891
  type FirstClassChainType as FirstClassChainType,
1599
1892
  type Wallet as Wallet,
1600
1893
  type WalletChainType as WalletChainType,
1894
+ type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput,
1895
+ type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput,
1896
+ type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput,
1897
+ type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput,
1898
+ type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput,
1899
+ type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput,
1900
+ type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput,
1901
+ type SolanaSignAndSendTransactionRpcInput as SolanaSignAndSendTransactionRpcInput,
1902
+ type SolanaSignMessageRpcInput as SolanaSignMessageRpcInput,
1903
+ type EthereumSignTransactionRpcResponse as EthereumSignTransactionRpcResponse,
1904
+ type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse,
1905
+ type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse,
1906
+ type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse,
1907
+ type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse,
1908
+ type EthereumSecp256k1SignRpcResponse as EthereumSecp256k1SignRpcResponse,
1909
+ type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse,
1910
+ type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse,
1911
+ type SolanaSignMessageRpcResponse as SolanaSignMessageRpcResponse,
1601
1912
  type WalletExportResponse as WalletExportResponse,
1602
1913
  type WalletInitImportResponse as WalletInitImportResponse,
1603
1914
  type WalletRawSignResponse as WalletRawSignResponse,