@privy-io/node 0.9.0 → 0.10.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/client.d.mts +13 -7
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +13 -7
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -2
  9. package/client.mjs.map +1 -1
  10. package/index.d.mts +1 -1
  11. package/index.d.mts.map +1 -1
  12. package/index.d.ts +1 -1
  13. package/index.d.ts.map +1 -1
  14. package/internal/tslib.js +17 -17
  15. package/internal/utils/query.d.mts +2 -0
  16. package/internal/utils/query.d.mts.map +1 -0
  17. package/internal/utils/query.d.ts +2 -0
  18. package/internal/utils/query.d.ts.map +1 -0
  19. package/internal/utils/query.js +10 -0
  20. package/internal/utils/query.js.map +1 -0
  21. package/internal/utils/query.mjs +6 -0
  22. package/internal/utils/query.mjs.map +1 -0
  23. package/internal/utils.d.mts +1 -0
  24. package/internal/utils.d.ts +1 -0
  25. package/internal/utils.js +1 -0
  26. package/internal/utils.js.map +1 -1
  27. package/internal/utils.mjs +1 -0
  28. package/package.json +1 -1
  29. package/public-api/services/ethereum.d.mts +4 -1
  30. package/public-api/services/ethereum.d.mts.map +1 -1
  31. package/public-api/services/ethereum.d.ts +4 -1
  32. package/public-api/services/ethereum.d.ts.map +1 -1
  33. package/public-api/services/ethereum.js +8 -0
  34. package/public-api/services/ethereum.js.map +1 -1
  35. package/public-api/services/ethereum.mjs +8 -0
  36. package/public-api/services/ethereum.mjs.map +1 -1
  37. package/public-api/services/webhooks.d.mts +3 -1
  38. package/public-api/services/webhooks.d.mts.map +1 -1
  39. package/public-api/services/webhooks.d.ts +3 -1
  40. package/public-api/services/webhooks.d.ts.map +1 -1
  41. package/public-api/services/webhooks.js +1 -0
  42. package/public-api/services/webhooks.js.map +1 -1
  43. package/public-api/services/webhooks.mjs +1 -0
  44. package/public-api/services/webhooks.mjs.map +1 -1
  45. package/resources/accounts.d.mts +85 -0
  46. package/resources/accounts.d.mts.map +1 -0
  47. package/resources/accounts.d.ts +85 -0
  48. package/resources/accounts.d.ts.map +1 -0
  49. package/resources/accounts.js +9 -0
  50. package/resources/accounts.js.map +1 -0
  51. package/resources/accounts.mjs +5 -0
  52. package/resources/accounts.mjs.map +1 -0
  53. package/resources/client-auth.d.mts +15 -1
  54. package/resources/client-auth.d.mts.map +1 -1
  55. package/resources/client-auth.d.ts +15 -1
  56. package/resources/client-auth.d.ts.map +1 -1
  57. package/resources/index.d.mts +5 -3
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +5 -3
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +5 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +2 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/intents.d.mts +104 -0
  66. package/resources/intents.d.mts.map +1 -0
  67. package/resources/intents.d.ts +104 -0
  68. package/resources/intents.d.ts.map +1 -0
  69. package/resources/intents.js +9 -0
  70. package/resources/intents.js.map +1 -0
  71. package/resources/intents.mjs +5 -0
  72. package/resources/intents.mjs.map +1 -0
  73. package/resources/key-quorums.d.mts +14 -0
  74. package/resources/key-quorums.d.mts.map +1 -1
  75. package/resources/key-quorums.d.ts +14 -0
  76. package/resources/key-quorums.d.ts.map +1 -1
  77. package/resources/policies.d.mts +8 -8
  78. package/resources/policies.d.ts +8 -8
  79. package/resources/wallets/wallets.d.mts +11 -4
  80. package/resources/wallets/wallets.d.mts.map +1 -1
  81. package/resources/wallets/wallets.d.ts +11 -4
  82. package/resources/wallets/wallets.d.ts.map +1 -1
  83. package/resources/wallets/wallets.js.map +1 -1
  84. package/resources/wallets/wallets.mjs.map +1 -1
  85. package/resources/webhooks.d.mts +38 -1
  86. package/resources/webhooks.d.mts.map +1 -1
  87. package/resources/webhooks.d.ts +38 -1
  88. package/resources/webhooks.d.ts.map +1 -1
  89. package/resources/yield.d.mts +48 -1
  90. package/resources/yield.d.mts.map +1 -1
  91. package/resources/yield.d.ts +48 -1
  92. package/resources/yield.d.ts.map +1 -1
  93. package/src/client.ts +56 -4
  94. package/src/index.ts +1 -1
  95. package/src/internal/utils/query.ts +7 -0
  96. package/src/internal/utils.ts +1 -0
  97. package/src/public-api/services/ethereum.ts +16 -0
  98. package/src/public-api/services/webhooks.ts +49 -2
  99. package/src/resources/accounts.ts +106 -0
  100. package/src/resources/client-auth.ts +22 -0
  101. package/src/resources/index.ts +17 -0
  102. package/src/resources/intents.ts +138 -0
  103. package/src/resources/key-quorums.ts +17 -0
  104. package/src/resources/policies.ts +8 -8
  105. package/src/resources/wallets/wallets.ts +13 -5
  106. package/src/resources/webhooks.ts +60 -0
  107. package/src/resources/yield.ts +59 -0
  108. package/src/version.ts +1 -1
  109. package/version.d.mts +1 -1
  110. package/version.d.mts.map +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.d.ts.map +1 -1
  113. package/version.js +1 -1
  114. package/version.js.map +1 -1
  115. package/version.mjs +1 -1
  116. package/version.mjs.map +1 -1
@@ -105,6 +105,11 @@ export interface KeyQuorum {
105
105
 
106
106
  display_name?: string;
107
107
 
108
+ /**
109
+ * List of nested key quorum IDs that are members of this key quorum.
110
+ */
111
+ key_quorum_ids?: Array<string>;
112
+
108
113
  user_ids?: Array<string>;
109
114
  }
110
115
 
@@ -132,6 +137,12 @@ export interface KeyQuorumCreateParams {
132
137
 
133
138
  display_name?: string;
134
139
 
140
+ /**
141
+ * List of key quorum IDs that should be members of this key quorum. Key quorums
142
+ * can only be nested 1 level deep.
143
+ */
144
+ key_quorum_ids?: Array<string>;
145
+
135
146
  /**
136
147
  * List of P-256 public keys of the keys that should be authorized to sign on the
137
148
  * key quorum, in base64-encoded DER format.
@@ -165,6 +176,12 @@ export interface KeyQuorumUpdateParams {
165
176
  */
166
177
  display_name?: string;
167
178
 
179
+ /**
180
+ * Body param: List of key quorum IDs that should be members of this key quorum.
181
+ * Key quorums can only be nested 1 level deep.
182
+ */
183
+ key_quorum_ids?: Array<string>;
184
+
168
185
  /**
169
186
  * Body param: List of P-256 public keys of the keys that should be authorized to
170
187
  * sign on the key quorum, in base64-encoded DER format.
@@ -417,7 +417,7 @@ export namespace Policy {
417
417
  }
418
418
 
419
419
  /**
420
- * Allowed contract addresses for eth_signAuthorization requests.
420
+ * Allowed contract addresses for eth_sign7702Authorization requests.
421
421
  */
422
422
  export interface Ethereum7702AuthorizationCondition {
423
423
  field: 'contract';
@@ -689,7 +689,7 @@ export namespace PolicyCreateRuleResponse {
689
689
  }
690
690
 
691
691
  /**
692
- * Allowed contract addresses for eth_signAuthorization requests.
692
+ * Allowed contract addresses for eth_sign7702Authorization requests.
693
693
  */
694
694
  export interface Ethereum7702AuthorizationCondition {
695
695
  field: 'contract';
@@ -895,7 +895,7 @@ export namespace PolicyUpdateRuleResponse {
895
895
  }
896
896
 
897
897
  /**
898
- * Allowed contract addresses for eth_signAuthorization requests.
898
+ * Allowed contract addresses for eth_sign7702Authorization requests.
899
899
  */
900
900
  export interface Ethereum7702AuthorizationCondition {
901
901
  field: 'contract';
@@ -1091,7 +1091,7 @@ export namespace PolicyGetRuleResponse {
1091
1091
  }
1092
1092
 
1093
1093
  /**
1094
- * Allowed contract addresses for eth_signAuthorization requests.
1094
+ * Allowed contract addresses for eth_sign7702Authorization requests.
1095
1095
  */
1096
1096
  export interface Ethereum7702AuthorizationCondition {
1097
1097
  field: 'contract';
@@ -1325,7 +1325,7 @@ export namespace PolicyCreateParams {
1325
1325
  }
1326
1326
 
1327
1327
  /**
1328
- * Allowed contract addresses for eth_signAuthorization requests.
1328
+ * Allowed contract addresses for eth_sign7702Authorization requests.
1329
1329
  */
1330
1330
  export interface Ethereum7702AuthorizationCondition {
1331
1331
  field: 'contract';
@@ -1546,7 +1546,7 @@ export namespace PolicyCreateRuleParams {
1546
1546
  }
1547
1547
 
1548
1548
  /**
1549
- * Allowed contract addresses for eth_signAuthorization requests.
1549
+ * Allowed contract addresses for eth_sign7702Authorization requests.
1550
1550
  */
1551
1551
  export interface Ethereum7702AuthorizationCondition {
1552
1552
  field: 'contract';
@@ -1809,7 +1809,7 @@ export namespace PolicyUpdateParams {
1809
1809
  }
1810
1810
 
1811
1811
  /**
1812
- * Allowed contract addresses for eth_signAuthorization requests.
1812
+ * Allowed contract addresses for eth_sign7702Authorization requests.
1813
1813
  */
1814
1814
  export interface Ethereum7702AuthorizationCondition {
1815
1815
  field: 'contract';
@@ -2017,7 +2017,7 @@ export namespace PolicyUpdateRuleParams {
2017
2017
  }
2018
2018
 
2019
2019
  /**
2020
- * Allowed contract addresses for eth_signAuthorization requests.
2020
+ * Allowed contract addresses for eth_sign7702Authorization requests.
2021
2021
  */
2022
2022
  export interface Ethereum7702AuthorizationCondition {
2023
2023
  field: 'contract';
@@ -399,7 +399,15 @@ export type WalletChainType =
399
399
  * Information about the custodian managing this wallet.
400
400
  */
401
401
  export interface WalletCustodian {
402
- name: string;
402
+ /**
403
+ * The custodian responsible for the wallet.
404
+ */
405
+ provider: string;
406
+
407
+ /**
408
+ * The resource ID of the beneficiary of the custodial wallet.
409
+ */
410
+ provider_user_id: string;
403
411
  }
404
412
 
405
413
  /**
@@ -468,12 +476,12 @@ export interface CustodialWallet {
468
476
  */
469
477
  chain_type: CustodialWalletChainType;
470
478
 
471
- owner_id: string | null;
472
-
473
479
  /**
474
- * The provider of the custodial wallet.
480
+ * Information about the custodian managing this wallet.
475
481
  */
476
- provider: CustodialWalletProvider;
482
+ custody: WalletCustodian;
483
+
484
+ owner_id: string | null;
477
485
 
478
486
  additional_signers?: Array<CustodialWallet.AdditionalSigner>;
479
487
 
@@ -1252,6 +1252,64 @@ export interface KrakenEmbedUserClosedWebhookPayload {
1252
1252
  user_id: string;
1253
1253
  }
1254
1254
 
1255
+ /**
1256
+ * Payload for the yield.deposit.confirmed webhook event.
1257
+ */
1258
+ export interface YieldDepositConfirmedWebhookPayload {
1259
+ assets: string;
1260
+
1261
+ block_number: number;
1262
+
1263
+ caip2: string;
1264
+
1265
+ log_index: number;
1266
+
1267
+ owner: string;
1268
+
1269
+ sender: string;
1270
+
1271
+ shares: string;
1272
+
1273
+ transaction_hash: string;
1274
+
1275
+ /**
1276
+ * The type of webhook event.
1277
+ */
1278
+ type: 'yield.deposit.confirmed';
1279
+
1280
+ vault_address: string;
1281
+ }
1282
+
1283
+ /**
1284
+ * Payload for the yield.withdraw.confirmed webhook event.
1285
+ */
1286
+ export interface YieldWithdrawConfirmedWebhookPayload {
1287
+ assets: string;
1288
+
1289
+ block_number: number;
1290
+
1291
+ caip2: string;
1292
+
1293
+ log_index: number;
1294
+
1295
+ owner: string;
1296
+
1297
+ receiver: string;
1298
+
1299
+ sender: string;
1300
+
1301
+ shares: string;
1302
+
1303
+ transaction_hash: string;
1304
+
1305
+ /**
1306
+ * The type of webhook event.
1307
+ */
1308
+ type: 'yield.withdraw.confirmed';
1309
+
1310
+ vault_address: string;
1311
+ }
1312
+
1255
1313
  export declare namespace Webhooks {
1256
1314
  export {
1257
1315
  type UserCreatedWebhookPayload as UserCreatedWebhookPayload,
@@ -1283,5 +1341,7 @@ export declare namespace Webhooks {
1283
1341
  type KrakenEmbedUserVerifiedWebhookPayload as KrakenEmbedUserVerifiedWebhookPayload,
1284
1342
  type KrakenEmbedUserDisabledWebhookPayload as KrakenEmbedUserDisabledWebhookPayload,
1285
1343
  type KrakenEmbedUserClosedWebhookPayload as KrakenEmbedUserClosedWebhookPayload,
1344
+ type YieldDepositConfirmedWebhookPayload as YieldDepositConfirmedWebhookPayload,
1345
+ type YieldWithdrawConfirmedWebhookPayload as YieldWithdrawConfirmedWebhookPayload,
1286
1346
  };
1287
1347
  }
@@ -4,6 +4,11 @@ import { APIResource } from '../core/resource';
4
4
 
5
5
  export class Yield extends APIResource {}
6
6
 
7
+ /**
8
+ * An EVM CAIP-2 chain identifier (e.g., "eip155:8453" for Base).
9
+ */
10
+ export type EvmCaip2ChainID = string;
11
+
7
12
  /**
8
13
  * Supported yield/lending protocol providers.
9
14
  */
@@ -311,8 +316,59 @@ export namespace EthereumYieldPositionResponse {
311
316
  }
312
317
  }
313
318
 
319
+ /**
320
+ * Input for claiming incentive rewards from vault participation.
321
+ */
322
+ export interface EthereumYieldClaimInput {
323
+ /**
324
+ * An EVM CAIP-2 chain identifier (e.g., "eip155:8453" for Base).
325
+ */
326
+ caip2: EvmCaip2ChainID;
327
+ }
328
+
329
+ /**
330
+ * A single reward token claimed from vault participation.
331
+ */
332
+ export interface EthereumYieldClaimReward {
333
+ /**
334
+ * Amount claimed in the smallest unit.
335
+ */
336
+ amount: string;
337
+
338
+ /**
339
+ * Reward token contract address.
340
+ */
341
+ token_address: string;
342
+
343
+ /**
344
+ * Reward token symbol (e.g., "MORPHO").
345
+ */
346
+ token_symbol: string;
347
+ }
348
+
349
+ /**
350
+ * Response from a yield reward claim operation.
351
+ */
352
+ export interface EthereumYieldClaimResponse {
353
+ /**
354
+ * Privy transaction record ID for the claim operation.
355
+ */
356
+ id: string;
357
+
358
+ /**
359
+ * An EVM CAIP-2 chain identifier (e.g., "eip155:8453" for Base).
360
+ */
361
+ caip2: EvmCaip2ChainID;
362
+
363
+ /**
364
+ * List of reward tokens claimed.
365
+ */
366
+ rewards: Array<EthereumYieldClaimReward>;
367
+ }
368
+
314
369
  export declare namespace Yield {
315
370
  export {
371
+ type EvmCaip2ChainID as EvmCaip2ChainID,
316
372
  type EthereumYieldProvider as EthereumYieldProvider,
317
373
  type EthereumYieldSweepType as EthereumYieldSweepType,
318
374
  type EthereumYieldSweepStatus as EthereumYieldSweepStatus,
@@ -326,5 +382,8 @@ export declare namespace Yield {
326
382
  type EthereumYieldPositionsInput as EthereumYieldPositionsInput,
327
383
  type EthereumVaultPosition as EthereumVaultPosition,
328
384
  type EthereumYieldPositionResponse as EthereumYieldPositionResponse,
385
+ type EthereumYieldClaimInput as EthereumYieldClaimInput,
386
+ type EthereumYieldClaimReward as EthereumYieldClaimReward,
387
+ type EthereumYieldClaimResponse as EthereumYieldClaimResponse,
329
388
  };
330
389
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.9.0'; // x-release-please-version
1
+ export const VERSION = '0.10.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.9.0";
1
+ export declare const VERSION = "0.10.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.9.0";
1
+ export declare const VERSION = "0.10.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
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.9.0'; // x-release-please-version
4
+ exports.VERSION = '0.10.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.9.0'; // x-release-please-version
1
+ export const VERSION = '0.10.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}