@privy-io/node 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/analytics.d.mts +17 -0
- package/resources/analytics.d.mts.map +1 -0
- package/resources/analytics.d.ts +17 -0
- package/resources/analytics.d.ts.map +1 -0
- package/resources/analytics.js +9 -0
- package/resources/analytics.js.map +1 -0
- package/resources/analytics.mjs +5 -0
- package/resources/analytics.mjs.map +1 -0
- package/resources/apps.d.mts +126 -0
- package/resources/apps.d.mts.map +1 -0
- package/resources/apps.d.ts +126 -0
- package/resources/apps.d.ts.map +1 -0
- package/resources/apps.js +9 -0
- package/resources/apps.js.map +1 -0
- package/resources/apps.mjs +5 -0
- package/resources/apps.mjs.map +1 -0
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/policies.d.mts +122 -18
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +122 -18
- package/resources/policies.d.ts.map +1 -1
- package/resources/users.d.mts +4 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +4 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +2 -2
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +2 -2
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/wallets.d.mts +123 -9
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +123 -9
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs.map +1 -1
- package/src/client.ts +18 -0
- package/src/resources/analytics.ts +20 -0
- package/src/resources/apps.ts +213 -0
- package/src/resources/index.ts +6 -0
- package/src/resources/policies.ts +210 -2
- package/src/resources/users.ts +4 -14
- package/src/resources/wallets/index.ts +4 -0
- package/src/resources/wallets/transactions.ts +2 -2
- package/src/resources/wallets/wallets.ts +185 -19
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -13,7 +13,7 @@ export class Transactions extends APIResource {
|
|
|
13
13
|
* ```ts
|
|
14
14
|
* const transaction = await client.wallets.transactions.get(
|
|
15
15
|
* 'wallet_id',
|
|
16
|
-
* { asset: 'usdc', chain: '
|
|
16
|
+
* { asset: 'usdc', chain: 'ethereum' },
|
|
17
17
|
* );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
@@ -141,7 +141,7 @@ export namespace TransactionGetResponse {
|
|
|
141
141
|
export interface TransactionGetParams {
|
|
142
142
|
asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'sol' | Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'sol'>;
|
|
143
143
|
|
|
144
|
-
chain: 'base';
|
|
144
|
+
chain: 'ethereum' | 'arbitrum' | 'base' | 'linea' | 'optimism' | 'polygon' | 'solana' | 'sepolia';
|
|
145
145
|
|
|
146
146
|
cursor?: string;
|
|
147
147
|
|
|
@@ -288,7 +288,7 @@ export type CurveSigningChainType =
|
|
|
288
288
|
/**
|
|
289
289
|
* The wallet chain types that offer first class support.
|
|
290
290
|
*/
|
|
291
|
-
export type FirstClassChainType = '
|
|
291
|
+
export type FirstClassChainType = 'ethereum' | 'solana';
|
|
292
292
|
|
|
293
293
|
export interface Wallet {
|
|
294
294
|
/**
|
|
@@ -362,8 +362,24 @@ export namespace Wallet {
|
|
|
362
362
|
* The wallet chain types.
|
|
363
363
|
*/
|
|
364
364
|
export type WalletChainType =
|
|
365
|
-
| 'solana'
|
|
366
365
|
| 'ethereum'
|
|
366
|
+
| 'solana'
|
|
367
|
+
| 'cosmos'
|
|
368
|
+
| 'stellar'
|
|
369
|
+
| 'sui'
|
|
370
|
+
| 'aptos'
|
|
371
|
+
| 'movement'
|
|
372
|
+
| 'tron'
|
|
373
|
+
| 'bitcoin-segwit'
|
|
374
|
+
| 'near'
|
|
375
|
+
| 'ton'
|
|
376
|
+
| 'starknet'
|
|
377
|
+
| 'spark';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The wallet chain types that are not first class chains.
|
|
381
|
+
*/
|
|
382
|
+
export type ExtendedChainType =
|
|
367
383
|
| 'cosmos'
|
|
368
384
|
| 'stellar'
|
|
369
385
|
| 'sui'
|
|
@@ -376,6 +392,13 @@ export type WalletChainType =
|
|
|
376
392
|
| 'starknet'
|
|
377
393
|
| 'spark';
|
|
378
394
|
|
|
395
|
+
/**
|
|
396
|
+
* Information about the custodian managing this wallet.
|
|
397
|
+
*/
|
|
398
|
+
export interface WalletCustodian {
|
|
399
|
+
name: string;
|
|
400
|
+
}
|
|
401
|
+
|
|
379
402
|
/**
|
|
380
403
|
* Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
|
|
381
404
|
*/
|
|
@@ -531,6 +554,57 @@ export namespace EthereumSignTypedDataRpcInput {
|
|
|
531
554
|
}
|
|
532
555
|
}
|
|
533
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Executes an RPC method to hash and sign a UserOperation.
|
|
559
|
+
*/
|
|
560
|
+
export interface EthereumSignUserOperationRpcInput {
|
|
561
|
+
method: 'eth_signUserOperation';
|
|
562
|
+
|
|
563
|
+
params: EthereumSignUserOperationRpcInput.Params;
|
|
564
|
+
|
|
565
|
+
address?: string;
|
|
566
|
+
|
|
567
|
+
chain_type?: 'ethereum';
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export namespace EthereumSignUserOperationRpcInput {
|
|
571
|
+
export interface Params {
|
|
572
|
+
chain_id: string | number;
|
|
573
|
+
|
|
574
|
+
contract: string;
|
|
575
|
+
|
|
576
|
+
user_operation: Params.UserOperation;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export namespace Params {
|
|
580
|
+
export interface UserOperation {
|
|
581
|
+
call_data: string;
|
|
582
|
+
|
|
583
|
+
call_gas_limit: string;
|
|
584
|
+
|
|
585
|
+
max_fee_per_gas: string;
|
|
586
|
+
|
|
587
|
+
max_priority_fee_per_gas: string;
|
|
588
|
+
|
|
589
|
+
nonce: string;
|
|
590
|
+
|
|
591
|
+
paymaster: string;
|
|
592
|
+
|
|
593
|
+
paymaster_data: string;
|
|
594
|
+
|
|
595
|
+
paymaster_post_op_gas_limit: string;
|
|
596
|
+
|
|
597
|
+
paymaster_verification_gas_limit: string;
|
|
598
|
+
|
|
599
|
+
pre_verification_gas: string;
|
|
600
|
+
|
|
601
|
+
sender: string;
|
|
602
|
+
|
|
603
|
+
verification_gas_limit: string;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
|
|
534
608
|
/**
|
|
535
609
|
* Signs an EIP-7702 authorization.
|
|
536
610
|
*/
|
|
@@ -739,6 +813,23 @@ export namespace EthereumSignTypedDataRpcResponse {
|
|
|
739
813
|
}
|
|
740
814
|
}
|
|
741
815
|
|
|
816
|
+
/**
|
|
817
|
+
* Response to the EVM `eth_signUserOperation` RPC.
|
|
818
|
+
*/
|
|
819
|
+
export interface EthereumSignUserOperationRpcResponse {
|
|
820
|
+
data: EthereumSignUserOperationRpcResponse.Data;
|
|
821
|
+
|
|
822
|
+
method: 'eth_signUserOperation';
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export namespace EthereumSignUserOperationRpcResponse {
|
|
826
|
+
export interface Data {
|
|
827
|
+
encoding: 'hex';
|
|
828
|
+
|
|
829
|
+
signature: string;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
742
833
|
/**
|
|
743
834
|
* Response to the EVM `eth_sign7702Authorization` RPC.
|
|
744
835
|
*/
|
|
@@ -872,6 +963,8 @@ export interface WalletInitImportResponse {
|
|
|
872
963
|
|
|
873
964
|
export interface WalletRawSignResponse {
|
|
874
965
|
data: WalletRawSignResponse.Data;
|
|
966
|
+
|
|
967
|
+
method: 'raw_sign';
|
|
875
968
|
}
|
|
876
969
|
|
|
877
970
|
export namespace WalletRawSignResponse {
|
|
@@ -890,6 +983,7 @@ export type WalletRpcResponse =
|
|
|
890
983
|
| EthereumSignTypedDataRpcResponse
|
|
891
984
|
| EthereumSignTransactionRpcResponse
|
|
892
985
|
| EthereumSendTransactionRpcResponse
|
|
986
|
+
| EthereumSignUserOperationRpcResponse
|
|
893
987
|
| EthereumSign7702AuthorizationRpcResponse
|
|
894
988
|
| EthereumSecp256k1SignRpcResponse
|
|
895
989
|
| SolanaSignMessageRpcResponse
|
|
@@ -1034,20 +1128,10 @@ export namespace WalletCreateParams {
|
|
|
1034
1128
|
}
|
|
1035
1129
|
|
|
1036
1130
|
export interface WalletListParams extends CursorParams {
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
| 'aptos'
|
|
1042
|
-
| 'movement'
|
|
1043
|
-
| 'tron'
|
|
1044
|
-
| 'bitcoin-segwit'
|
|
1045
|
-
| 'near'
|
|
1046
|
-
| 'ton'
|
|
1047
|
-
| 'starknet'
|
|
1048
|
-
| 'spark'
|
|
1049
|
-
| 'solana'
|
|
1050
|
-
| 'ethereum';
|
|
1131
|
+
/**
|
|
1132
|
+
* The wallet chain types.
|
|
1133
|
+
*/
|
|
1134
|
+
chain_type?: WalletChainType;
|
|
1051
1135
|
|
|
1052
1136
|
user_id?: string;
|
|
1053
1137
|
}
|
|
@@ -1157,7 +1241,7 @@ export namespace WalletRawSignParams {
|
|
|
1157
1241
|
}
|
|
1158
1242
|
|
|
1159
1243
|
/**
|
|
1160
|
-
* Hash and sign bytes
|
|
1244
|
+
* Hash and sign bytes using the specified encoding and hash function.
|
|
1161
1245
|
*/
|
|
1162
1246
|
export interface Bytes {
|
|
1163
1247
|
/**
|
|
@@ -1166,9 +1250,14 @@ export namespace WalletRawSignParams {
|
|
|
1166
1250
|
bytes: string;
|
|
1167
1251
|
|
|
1168
1252
|
/**
|
|
1169
|
-
*
|
|
1253
|
+
* The encoding scheme for the bytes.
|
|
1254
|
+
*/
|
|
1255
|
+
encoding: 'utf-8' | 'hex';
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* The hash function to hash the bytes.
|
|
1170
1259
|
*/
|
|
1171
|
-
|
|
1260
|
+
hash_function: 'keccak256' | 'sha256';
|
|
1172
1261
|
}
|
|
1173
1262
|
}
|
|
1174
1263
|
|
|
@@ -1176,6 +1265,7 @@ export type WalletRpcParams =
|
|
|
1176
1265
|
| WalletRpcParams.EthereumPersonalSignRpcInput
|
|
1177
1266
|
| WalletRpcParams.EthereumSignTypedDataRpcInput
|
|
1178
1267
|
| WalletRpcParams.EthereumSignTransactionRpcInput
|
|
1268
|
+
| WalletRpcParams.EthereumSignUserOperationRpcInput
|
|
1179
1269
|
| WalletRpcParams.EthereumSendTransactionRpcInput
|
|
1180
1270
|
| WalletRpcParams.EthereumSign7702AuthorizationRpcInput
|
|
1181
1271
|
| WalletRpcParams.EthereumSecp256k1SignRpcInput
|
|
@@ -1352,6 +1442,78 @@ export declare namespace WalletRpcParams {
|
|
|
1352
1442
|
}
|
|
1353
1443
|
}
|
|
1354
1444
|
|
|
1445
|
+
export interface EthereumSignUserOperationRpcInput {
|
|
1446
|
+
/**
|
|
1447
|
+
* Body param:
|
|
1448
|
+
*/
|
|
1449
|
+
method: 'eth_signUserOperation';
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* Body param:
|
|
1453
|
+
*/
|
|
1454
|
+
params: EthereumSignUserOperationRpcInput.Params;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Body param:
|
|
1458
|
+
*/
|
|
1459
|
+
address?: string;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* Body param:
|
|
1463
|
+
*/
|
|
1464
|
+
chain_type?: 'ethereum';
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
1468
|
+
* required, they should be comma separated.
|
|
1469
|
+
*/
|
|
1470
|
+
'privy-authorization-signature'?: string;
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
1474
|
+
* a 24-hour window.
|
|
1475
|
+
*/
|
|
1476
|
+
'privy-idempotency-key'?: string;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
export namespace EthereumSignUserOperationRpcInput {
|
|
1480
|
+
export interface Params {
|
|
1481
|
+
chain_id: string | number;
|
|
1482
|
+
|
|
1483
|
+
contract: string;
|
|
1484
|
+
|
|
1485
|
+
user_operation: Params.UserOperation;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
export namespace Params {
|
|
1489
|
+
export interface UserOperation {
|
|
1490
|
+
call_data: string;
|
|
1491
|
+
|
|
1492
|
+
call_gas_limit: string;
|
|
1493
|
+
|
|
1494
|
+
max_fee_per_gas: string;
|
|
1495
|
+
|
|
1496
|
+
max_priority_fee_per_gas: string;
|
|
1497
|
+
|
|
1498
|
+
nonce: string;
|
|
1499
|
+
|
|
1500
|
+
paymaster: string;
|
|
1501
|
+
|
|
1502
|
+
paymaster_data: string;
|
|
1503
|
+
|
|
1504
|
+
paymaster_post_op_gas_limit: string;
|
|
1505
|
+
|
|
1506
|
+
paymaster_verification_gas_limit: string;
|
|
1507
|
+
|
|
1508
|
+
pre_verification_gas: string;
|
|
1509
|
+
|
|
1510
|
+
sender: string;
|
|
1511
|
+
|
|
1512
|
+
verification_gas_limit: string;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1355
1517
|
export interface EthereumSendTransactionRpcInput {
|
|
1356
1518
|
/**
|
|
1357
1519
|
* Body param:
|
|
@@ -1891,10 +2053,13 @@ export declare namespace Wallets {
|
|
|
1891
2053
|
type FirstClassChainType as FirstClassChainType,
|
|
1892
2054
|
type Wallet as Wallet,
|
|
1893
2055
|
type WalletChainType as WalletChainType,
|
|
2056
|
+
type ExtendedChainType as ExtendedChainType,
|
|
2057
|
+
type WalletCustodian as WalletCustodian,
|
|
1894
2058
|
type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput,
|
|
1895
2059
|
type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput,
|
|
1896
2060
|
type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput,
|
|
1897
2061
|
type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput,
|
|
2062
|
+
type EthereumSignUserOperationRpcInput as EthereumSignUserOperationRpcInput,
|
|
1898
2063
|
type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput,
|
|
1899
2064
|
type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput,
|
|
1900
2065
|
type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput,
|
|
@@ -1904,6 +2069,7 @@ export declare namespace Wallets {
|
|
|
1904
2069
|
type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse,
|
|
1905
2070
|
type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse,
|
|
1906
2071
|
type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse,
|
|
2072
|
+
type EthereumSignUserOperationRpcResponse as EthereumSignUserOperationRpcResponse,
|
|
1907
2073
|
type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse,
|
|
1908
2074
|
type EthereumSecp256k1SignRpcResponse as EthereumSecp256k1SignRpcResponse,
|
|
1909
2075
|
type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|