@privy-io/node 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/aggregations.d.mts +296 -0
  12. package/resources/aggregations.d.mts.map +1 -0
  13. package/resources/aggregations.d.ts +296 -0
  14. package/resources/aggregations.d.ts.map +1 -0
  15. package/resources/aggregations.js +9 -0
  16. package/resources/aggregations.js.map +1 -0
  17. package/resources/aggregations.mjs +5 -0
  18. package/resources/aggregations.mjs.map +1 -0
  19. package/resources/index.d.mts +1 -0
  20. package/resources/index.d.mts.map +1 -1
  21. package/resources/index.d.ts +1 -0
  22. package/resources/index.d.ts.map +1 -1
  23. package/resources/index.js +3 -1
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs +1 -0
  26. package/resources/index.mjs.map +1 -1
  27. package/resources/key-quorums.d.mts +4 -1
  28. package/resources/key-quorums.d.mts.map +1 -1
  29. package/resources/key-quorums.d.ts +4 -1
  30. package/resources/key-quorums.d.ts.map +1 -1
  31. package/resources/policies.d.mts +19 -16
  32. package/resources/policies.d.mts.map +1 -1
  33. package/resources/policies.d.ts +19 -16
  34. package/resources/policies.d.ts.map +1 -1
  35. package/resources/users.d.mts +5 -5
  36. package/resources/users.d.mts.map +1 -1
  37. package/resources/users.d.ts +5 -5
  38. package/resources/users.d.ts.map +1 -1
  39. package/resources/wallets/balance.d.mts +3 -3
  40. package/resources/wallets/balance.d.mts.map +1 -1
  41. package/resources/wallets/balance.d.ts +3 -3
  42. package/resources/wallets/balance.d.ts.map +1 -1
  43. package/resources/wallets/transactions.d.mts +3 -3
  44. package/resources/wallets/transactions.d.mts.map +1 -1
  45. package/resources/wallets/transactions.d.ts +3 -3
  46. package/resources/wallets/transactions.d.ts.map +1 -1
  47. package/resources/wallets/wallets.d.mts +118 -50
  48. package/resources/wallets/wallets.d.mts.map +1 -1
  49. package/resources/wallets/wallets.d.ts +118 -50
  50. package/resources/wallets/wallets.d.ts.map +1 -1
  51. package/resources/wallets/wallets.js.map +1 -1
  52. package/resources/wallets/wallets.mjs.map +1 -1
  53. package/src/client.ts +19 -0
  54. package/src/resources/aggregations.ts +497 -0
  55. package/src/resources/index.ts +8 -0
  56. package/src/resources/key-quorums.ts +4 -1
  57. package/src/resources/policies.ts +19 -16
  58. package/src/resources/users.ts +6 -6
  59. package/src/resources/wallets/balance.ts +11 -3
  60. package/src/resources/wallets/transactions.ts +11 -3
  61. package/src/resources/wallets/wallets.ts +159 -50
  62. package/src/version.ts +1 -1
  63. package/version.d.mts +1 -1
  64. package/version.d.ts +1 -1
  65. package/version.js +1 -1
  66. package/version.mjs +1 -1
@@ -28,7 +28,7 @@ export interface BalanceGetResponse {
28
28
 
29
29
  export namespace BalanceGetResponse {
30
30
  export interface Balance {
31
- asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'sol';
31
+ asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol';
32
32
 
33
33
  chain:
34
34
  | 'ethereum'
@@ -57,7 +57,15 @@ export namespace BalanceGetResponse {
57
57
  }
58
58
 
59
59
  export interface BalanceGetParams {
60
- asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'sol' | Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'sol'>;
60
+ asset:
61
+ | 'usdc'
62
+ | 'eth'
63
+ | 'pol'
64
+ | 'usdt'
65
+ | 'eurc'
66
+ | 'usdb'
67
+ | 'sol'
68
+ | Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
61
69
 
62
70
  chain:
63
71
  | 'ethereum'
@@ -95,7 +103,7 @@ export interface BalanceGetParams {
95
103
  | 'solana_testnet'
96
104
  >;
97
105
 
98
- include_currency?: 'usd';
106
+ include_currency?: 'usd' | 'eur';
99
107
  }
100
108
 
101
109
  export declare namespace Balance {
@@ -61,7 +61,7 @@ export namespace TransactionGetResponse {
61
61
 
62
62
  export namespace Transaction {
63
63
  export interface UnionMember0 {
64
- asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'sol';
64
+ asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol';
65
65
 
66
66
  chain:
67
67
  | 'ethereum'
@@ -99,7 +99,7 @@ export namespace TransactionGetResponse {
99
99
  }
100
100
 
101
101
  export interface UnionMember1 {
102
- asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'sol';
102
+ asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol';
103
103
 
104
104
  chain:
105
105
  | 'ethereum'
@@ -139,7 +139,15 @@ export namespace TransactionGetResponse {
139
139
  }
140
140
 
141
141
  export interface TransactionGetParams {
142
- asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'sol' | Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'sol'>;
142
+ asset:
143
+ | 'usdc'
144
+ | 'eth'
145
+ | 'pol'
146
+ | 'usdt'
147
+ | 'eurc'
148
+ | 'usdb'
149
+ | 'sol'
150
+ | Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
143
151
 
144
152
  chain: 'ethereum' | 'arbitrum' | 'base' | 'linea' | 'optimism' | 'polygon' | 'solana' | 'sepolia';
145
153
 
@@ -290,6 +290,9 @@ export type CurveSigningChainType =
290
290
  */
291
291
  export type FirstClassChainType = 'ethereum' | 'solana';
292
292
 
293
+ /**
294
+ * A wallet managed by Privy's wallet infrastructure.
295
+ */
293
296
  export interface Wallet {
294
297
  /**
295
298
  * Unique ID of the wallet. This will be the primary identifier when using the
@@ -463,12 +466,26 @@ export interface CustodialWallet {
463
466
  /**
464
467
  * The chain type of the custodial wallet.
465
468
  */
466
- chainType: CustodialWalletChainType;
469
+ chain_type: CustodialWalletChainType;
470
+
471
+ owner_id: string | null;
467
472
 
468
473
  /**
469
474
  * The provider of the custodial wallet.
470
475
  */
471
476
  provider: CustodialWalletProvider;
477
+
478
+ additional_signers?: Array<CustodialWallet.AdditionalSigner>;
479
+
480
+ policy_ids?: Array<string>;
481
+ }
482
+
483
+ export namespace CustodialWallet {
484
+ export interface AdditionalSigner {
485
+ signer_id: string;
486
+
487
+ override_policy_ids?: Array<string>;
488
+ }
472
489
  }
473
490
 
474
491
  /**
@@ -542,6 +559,8 @@ export namespace EthereumSignTransactionRpcInput {
542
559
 
543
560
  export namespace Params {
544
561
  export interface Transaction {
562
+ authorization_list?: Array<Transaction.AuthorizationList>;
563
+
545
564
  chain_id?: string | number;
546
565
 
547
566
  data?: string;
@@ -560,10 +579,26 @@ export namespace EthereumSignTransactionRpcInput {
560
579
 
561
580
  to?: string;
562
581
 
563
- type?: 0 | 1 | 2;
582
+ type?: 0 | 1 | 2 | 4;
564
583
 
565
584
  value?: string | number;
566
585
  }
586
+
587
+ export namespace Transaction {
588
+ export interface AuthorizationList {
589
+ chain_id: string | number;
590
+
591
+ contract: string;
592
+
593
+ nonce: string | number;
594
+
595
+ r: string;
596
+
597
+ s: string;
598
+
599
+ y_parity: number;
600
+ }
601
+ }
567
602
  }
568
603
  }
569
604
 
@@ -591,6 +626,8 @@ export namespace EthereumSendTransactionRpcInput {
591
626
 
592
627
  export namespace Params {
593
628
  export interface Transaction {
629
+ authorization_list?: Array<Transaction.AuthorizationList>;
630
+
594
631
  chain_id?: string | number;
595
632
 
596
633
  data?: string;
@@ -609,10 +646,26 @@ export namespace EthereumSendTransactionRpcInput {
609
646
 
610
647
  to?: string;
611
648
 
612
- type?: 0 | 1 | 2;
649
+ type?: 0 | 1 | 2 | 4;
613
650
 
614
651
  value?: string | number;
615
652
  }
653
+
654
+ export namespace Transaction {
655
+ export interface AuthorizationList {
656
+ chain_id: string | number;
657
+
658
+ contract: string;
659
+
660
+ nonce: string | number;
661
+
662
+ r: string;
663
+
664
+ s: string;
665
+
666
+ y_parity: number;
667
+ }
668
+ }
616
669
  }
617
670
  }
618
671
 
@@ -852,10 +905,14 @@ export namespace EthereumSendTransactionRpcResponse {
852
905
  transaction_id?: string;
853
906
 
854
907
  transaction_request?: Data.TransactionRequest;
908
+
909
+ user_operation_hash?: string;
855
910
  }
856
911
 
857
912
  export namespace Data {
858
913
  export interface TransactionRequest {
914
+ authorization_list?: Array<TransactionRequest.AuthorizationList>;
915
+
859
916
  chain_id?: string | number;
860
917
 
861
918
  data?: string;
@@ -874,10 +931,26 @@ export namespace EthereumSendTransactionRpcResponse {
874
931
 
875
932
  to?: string;
876
933
 
877
- type?: 0 | 1 | 2;
934
+ type?: 0 | 1 | 2 | 4;
878
935
 
879
936
  value?: string | number;
880
937
  }
938
+
939
+ export namespace TransactionRequest {
940
+ export interface AuthorizationList {
941
+ chain_id: string | number;
942
+
943
+ contract: string;
944
+
945
+ nonce: string | number;
946
+
947
+ r: string;
948
+
949
+ s: string;
950
+
951
+ y_parity: number;
952
+ }
953
+ }
881
954
  }
882
955
  }
883
956
 
@@ -1378,22 +1451,22 @@ export type WalletRpcParams =
1378
1451
  export declare namespace WalletRpcParams {
1379
1452
  export interface EthereumPersonalSignRpcInput {
1380
1453
  /**
1381
- * Body param:
1454
+ * Body param
1382
1455
  */
1383
1456
  method: 'personal_sign';
1384
1457
 
1385
1458
  /**
1386
- * Body param:
1459
+ * Body param
1387
1460
  */
1388
1461
  params: EthereumPersonalSignRpcInput.Params;
1389
1462
 
1390
1463
  /**
1391
- * Body param:
1464
+ * Body param
1392
1465
  */
1393
1466
  address?: string;
1394
1467
 
1395
1468
  /**
1396
- * Body param:
1469
+ * Body param
1397
1470
  */
1398
1471
  chain_type?: 'ethereum';
1399
1472
 
@@ -1420,22 +1493,22 @@ export declare namespace WalletRpcParams {
1420
1493
 
1421
1494
  export interface EthereumSignTypedDataRpcInput {
1422
1495
  /**
1423
- * Body param:
1496
+ * Body param
1424
1497
  */
1425
1498
  method: 'eth_signTypedData_v4';
1426
1499
 
1427
1500
  /**
1428
- * Body param:
1501
+ * Body param
1429
1502
  */
1430
1503
  params: EthereumSignTypedDataRpcInput.Params;
1431
1504
 
1432
1505
  /**
1433
- * Body param:
1506
+ * Body param
1434
1507
  */
1435
1508
  address?: string;
1436
1509
 
1437
1510
  /**
1438
- * Body param:
1511
+ * Body param
1439
1512
  */
1440
1513
  chain_type?: 'ethereum';
1441
1514
 
@@ -1480,22 +1553,22 @@ export declare namespace WalletRpcParams {
1480
1553
 
1481
1554
  export interface EthereumSignTransactionRpcInput {
1482
1555
  /**
1483
- * Body param:
1556
+ * Body param
1484
1557
  */
1485
1558
  method: 'eth_signTransaction';
1486
1559
 
1487
1560
  /**
1488
- * Body param:
1561
+ * Body param
1489
1562
  */
1490
1563
  params: EthereumSignTransactionRpcInput.Params;
1491
1564
 
1492
1565
  /**
1493
- * Body param:
1566
+ * Body param
1494
1567
  */
1495
1568
  address?: string;
1496
1569
 
1497
1570
  /**
1498
- * Body param:
1571
+ * Body param
1499
1572
  */
1500
1573
  chain_type?: 'ethereum';
1501
1574
 
@@ -1519,6 +1592,8 @@ export declare namespace WalletRpcParams {
1519
1592
 
1520
1593
  export namespace Params {
1521
1594
  export interface Transaction {
1595
+ authorization_list?: Array<Transaction.AuthorizationList>;
1596
+
1522
1597
  chain_id?: string | number;
1523
1598
 
1524
1599
  data?: string;
@@ -1537,31 +1612,47 @@ export declare namespace WalletRpcParams {
1537
1612
 
1538
1613
  to?: string;
1539
1614
 
1540
- type?: 0 | 1 | 2;
1615
+ type?: 0 | 1 | 2 | 4;
1541
1616
 
1542
1617
  value?: string | number;
1543
1618
  }
1619
+
1620
+ export namespace Transaction {
1621
+ export interface AuthorizationList {
1622
+ chain_id: string | number;
1623
+
1624
+ contract: string;
1625
+
1626
+ nonce: string | number;
1627
+
1628
+ r: string;
1629
+
1630
+ s: string;
1631
+
1632
+ y_parity: number;
1633
+ }
1634
+ }
1544
1635
  }
1545
1636
  }
1546
1637
 
1547
1638
  export interface EthereumSignUserOperationRpcInput {
1548
1639
  /**
1549
- * Body param:
1640
+ * Body param
1550
1641
  */
1551
1642
  method: 'eth_signUserOperation';
1552
1643
 
1553
1644
  /**
1554
- * Body param:
1645
+ * Body param
1555
1646
  */
1556
1647
  params: EthereumSignUserOperationRpcInput.Params;
1557
1648
 
1558
1649
  /**
1559
- * Body param:
1650
+ * Body param
1560
1651
  */
1561
1652
  address?: string;
1562
1653
 
1563
1654
  /**
1564
- * Body param:
1655
+ * Body param
1565
1656
  */
1566
1657
  chain_type?: 'ethereum';
1567
1658
 
@@ -1618,32 +1709,32 @@ export declare namespace WalletRpcParams {
1618
1709
 
1619
1710
  export interface EthereumSendTransactionRpcInput {
1620
1711
  /**
1621
- * Body param:
1712
+ * Body param
1622
1713
  */
1623
1714
  caip2: string;
1624
1715
 
1625
1716
  /**
1626
- * Body param:
1717
+ * Body param
1627
1718
  */
1628
1719
  method: 'eth_sendTransaction';
1629
1720
 
1630
1721
  /**
1631
- * Body param:
1722
+ * Body param
1632
1723
  */
1633
1724
  params: EthereumSendTransactionRpcInput.Params;
1634
1725
 
1635
1726
  /**
1636
- * Body param:
1727
+ * Body param
1637
1728
  */
1638
1729
  address?: string;
1639
1730
 
1640
1731
  /**
1641
- * Body param:
1732
+ * Body param
1642
1733
  */
1643
1734
  chain_type?: 'ethereum';
1644
1735
 
1645
1736
  /**
1646
- * Body param:
1737
+ * Body param
1647
1738
  */
1648
1739
  sponsor?: boolean;
1649
1740
 
@@ -1667,6 +1758,8 @@ export declare namespace WalletRpcParams {
1667
1758
 
1668
1759
  export namespace Params {
1669
1760
  export interface Transaction {
1761
+ authorization_list?: Array<Transaction.AuthorizationList>;
1762
+
1670
1763
  chain_id?: string | number;
1671
1764
 
1672
1765
  data?: string;
@@ -1685,31 +1778,47 @@ export declare namespace WalletRpcParams {
1685
1778
 
1686
1779
  to?: string;
1687
1780
 
1688
- type?: 0 | 1 | 2;
1781
+ type?: 0 | 1 | 2 | 4;
1689
1782
 
1690
1783
  value?: string | number;
1691
1784
  }
1785
+
1786
+ export namespace Transaction {
1787
+ export interface AuthorizationList {
1788
+ chain_id: string | number;
1789
+
1790
+ contract: string;
1791
+
1792
+ nonce: string | number;
1793
+
1794
+ r: string;
1795
+
1796
+ s: string;
1797
+
1798
+ y_parity: number;
1799
+ }
1800
+ }
1692
1801
  }
1693
1802
  }
1694
1803
 
1695
1804
  export interface EthereumSign7702AuthorizationRpcInput {
1696
1805
  /**
1697
- * Body param:
1806
+ * Body param
1698
1807
  */
1699
1808
  method: 'eth_sign7702Authorization';
1700
1809
 
1701
1810
  /**
1702
- * Body param:
1811
+ * Body param
1703
1812
  */
1704
1813
  params: EthereumSign7702AuthorizationRpcInput.Params;
1705
1814
 
1706
1815
  /**
1707
- * Body param:
1816
+ * Body param
1708
1817
  */
1709
1818
  address?: string;
1710
1819
 
1711
1820
  /**
1712
- * Body param:
1821
+ * Body param
1713
1822
  */
1714
1823
  chain_type?: 'ethereum';
1715
1824
 
@@ -1738,22 +1847,22 @@ export declare namespace WalletRpcParams {
1738
1847
 
1739
1848
  export interface EthereumSecp256k1SignRpcInput {
1740
1849
  /**
1741
- * Body param:
1850
+ * Body param
1742
1851
  */
1743
1852
  method: 'secp256k1_sign';
1744
1853
 
1745
1854
  /**
1746
- * Body param:
1855
+ * Body param
1747
1856
  */
1748
1857
  params: EthereumSecp256k1SignRpcInput.Params;
1749
1858
 
1750
1859
  /**
1751
- * Body param:
1860
+ * Body param
1752
1861
  */
1753
1862
  address?: string;
1754
1863
 
1755
1864
  /**
1756
- * Body param:
1865
+ * Body param
1757
1866
  */
1758
1867
  chain_type?: 'ethereum';
1759
1868
 
@@ -1778,22 +1887,22 @@ export declare namespace WalletRpcParams {
1778
1887
 
1779
1888
  export interface SolanaSignMessageRpcInput {
1780
1889
  /**
1781
- * Body param:
1890
+ * Body param
1782
1891
  */
1783
1892
  method: 'signMessage';
1784
1893
 
1785
1894
  /**
1786
- * Body param:
1895
+ * Body param
1787
1896
  */
1788
1897
  params: SolanaSignMessageRpcInput.Params;
1789
1898
 
1790
1899
  /**
1791
- * Body param:
1900
+ * Body param
1792
1901
  */
1793
1902
  address?: string;
1794
1903
 
1795
1904
  /**
1796
- * Body param:
1905
+ * Body param
1797
1906
  */
1798
1907
  chain_type?: 'solana';
1799
1908
 
@@ -1820,22 +1929,22 @@ export declare namespace WalletRpcParams {
1820
1929
 
1821
1930
  export interface SolanaSignTransactionRpcInput {
1822
1931
  /**
1823
- * Body param:
1932
+ * Body param
1824
1933
  */
1825
1934
  method: 'signTransaction';
1826
1935
 
1827
1936
  /**
1828
- * Body param:
1937
+ * Body param
1829
1938
  */
1830
1939
  params: SolanaSignTransactionRpcInput.Params;
1831
1940
 
1832
1941
  /**
1833
- * Body param:
1942
+ * Body param
1834
1943
  */
1835
1944
  address?: string;
1836
1945
 
1837
1946
  /**
1838
- * Body param:
1947
+ * Body param
1839
1948
  */
1840
1949
  chain_type?: 'solana';
1841
1950
 
@@ -1862,32 +1971,32 @@ export declare namespace WalletRpcParams {
1862
1971
 
1863
1972
  export interface SolanaSignAndSendTransactionRpcInput {
1864
1973
  /**
1865
- * Body param:
1974
+ * Body param
1866
1975
  */
1867
1976
  caip2: string;
1868
1977
 
1869
1978
  /**
1870
- * Body param:
1979
+ * Body param
1871
1980
  */
1872
1981
  method: 'signAndSendTransaction';
1873
1982
 
1874
1983
  /**
1875
- * Body param:
1984
+ * Body param
1876
1985
  */
1877
1986
  params: SolanaSignAndSendTransactionRpcInput.Params;
1878
1987
 
1879
1988
  /**
1880
- * Body param:
1989
+ * Body param
1881
1990
  */
1882
1991
  address?: string;
1883
1992
 
1884
1993
  /**
1885
- * Body param:
1994
+ * Body param
1886
1995
  */
1887
1996
  chain_type?: 'solana';
1888
1997
 
1889
1998
  /**
1890
- * Body param:
1999
+ * Body param
1891
2000
  */
1892
2001
  sponsor?: boolean;
1893
2002
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.7.0'; // x-release-please-version
1
+ export const VERSION = '0.8.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.7.0";
1
+ export declare const VERSION = "0.8.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.7.0";
1
+ export declare const VERSION = "0.8.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.7.0'; // x-release-please-version
4
+ exports.VERSION = '0.8.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.7.0'; // x-release-please-version
1
+ export const VERSION = '0.8.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map