@privy-io/api-types 0.5.0 → 0.6.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 (89) hide show
  1. package/CHANGELOG.md +29 -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/internal/tslib.js +17 -17
  11. package/internal/utils/query.d.mts +2 -0
  12. package/internal/utils/query.d.mts.map +1 -0
  13. package/internal/utils/query.d.ts +2 -0
  14. package/internal/utils/query.d.ts.map +1 -0
  15. package/internal/utils/query.js +10 -0
  16. package/internal/utils/query.js.map +1 -0
  17. package/internal/utils/query.mjs +6 -0
  18. package/internal/utils/query.mjs.map +1 -0
  19. package/internal/utils.d.mts +1 -0
  20. package/internal/utils.d.ts +1 -0
  21. package/internal/utils.js +1 -0
  22. package/internal/utils.js.map +1 -1
  23. package/internal/utils.mjs +1 -0
  24. package/package.json +1 -1
  25. package/resources/accounts.d.mts +85 -0
  26. package/resources/accounts.d.mts.map +1 -0
  27. package/resources/accounts.d.ts +85 -0
  28. package/resources/accounts.d.ts.map +1 -0
  29. package/resources/accounts.js +9 -0
  30. package/resources/accounts.js.map +1 -0
  31. package/resources/accounts.mjs +5 -0
  32. package/resources/accounts.mjs.map +1 -0
  33. package/resources/client-auth.d.mts +15 -1
  34. package/resources/client-auth.d.mts.map +1 -1
  35. package/resources/client-auth.d.ts +15 -1
  36. package/resources/client-auth.d.ts.map +1 -1
  37. package/resources/index.d.mts +5 -3
  38. package/resources/index.d.mts.map +1 -1
  39. package/resources/index.d.ts +5 -3
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/index.js +5 -1
  42. package/resources/index.js.map +1 -1
  43. package/resources/index.mjs +2 -0
  44. package/resources/index.mjs.map +1 -1
  45. package/resources/intents.d.mts +104 -0
  46. package/resources/intents.d.mts.map +1 -0
  47. package/resources/intents.d.ts +104 -0
  48. package/resources/intents.d.ts.map +1 -0
  49. package/resources/intents.js +9 -0
  50. package/resources/intents.js.map +1 -0
  51. package/resources/intents.mjs +5 -0
  52. package/resources/intents.mjs.map +1 -0
  53. package/resources/key-quorums.d.mts +14 -0
  54. package/resources/key-quorums.d.mts.map +1 -1
  55. package/resources/key-quorums.d.ts +14 -0
  56. package/resources/key-quorums.d.ts.map +1 -1
  57. package/resources/policies.d.mts +8 -8
  58. package/resources/policies.d.ts +8 -8
  59. package/resources/wallets/wallets.d.mts +11 -4
  60. package/resources/wallets/wallets.d.mts.map +1 -1
  61. package/resources/wallets/wallets.d.ts +11 -4
  62. package/resources/wallets/wallets.d.ts.map +1 -1
  63. package/resources/wallets/wallets.js.map +1 -1
  64. package/resources/wallets/wallets.mjs.map +1 -1
  65. package/resources/webhooks.d.mts +38 -1
  66. package/resources/webhooks.d.mts.map +1 -1
  67. package/resources/webhooks.d.ts +38 -1
  68. package/resources/webhooks.d.ts.map +1 -1
  69. package/resources/yield.d.mts +48 -1
  70. package/resources/yield.d.mts.map +1 -1
  71. package/resources/yield.d.ts +48 -1
  72. package/resources/yield.d.ts.map +1 -1
  73. package/src/client.ts +56 -4
  74. package/src/internal/utils/query.ts +7 -0
  75. package/src/internal/utils.ts +1 -0
  76. package/src/resources/accounts.ts +106 -0
  77. package/src/resources/client-auth.ts +22 -0
  78. package/src/resources/index.ts +17 -0
  79. package/src/resources/intents.ts +138 -0
  80. package/src/resources/key-quorums.ts +17 -0
  81. package/src/resources/policies.ts +8 -8
  82. package/src/resources/wallets/wallets.ts +13 -5
  83. package/src/resources/webhooks.ts +60 -0
  84. package/src/resources/yield.ts +59 -0
  85. package/src/version.ts +1 -1
  86. package/version.d.mts +1 -1
  87. package/version.d.ts +1 -1
  88. package/version.js +1 -1
  89. package/version.mjs +1 -1
@@ -0,0 +1,138 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as IntentsAPI from './intents';
5
+
6
+ export class Intents extends APIResource {}
7
+
8
+ /**
9
+ * A leaf member (user or key) of a nested key quorum in an intent authorization.
10
+ */
11
+ export type IntentAuthorizationKeyQuorumMember =
12
+ | IntentAuthorizationKeyQuorumMember.UserMember
13
+ | IntentAuthorizationKeyQuorumMember.KeyMember;
14
+
15
+ export namespace IntentAuthorizationKeyQuorumMember {
16
+ export interface UserMember {
17
+ /**
18
+ * Whether this member has signed the intent
19
+ */
20
+ has_signed: boolean;
21
+
22
+ type: 'user';
23
+
24
+ /**
25
+ * User ID of the key quorum member
26
+ */
27
+ user_id: string;
28
+
29
+ /**
30
+ * Display name for the user (email, etc)
31
+ */
32
+ display_name?: string;
33
+ }
34
+
35
+ export interface KeyMember {
36
+ /**
37
+ * Whether this key has signed the intent
38
+ */
39
+ has_signed: boolean;
40
+
41
+ /**
42
+ * Public key of the key quorum member
43
+ */
44
+ public_key: string;
45
+
46
+ type: 'key';
47
+
48
+ /**
49
+ * Display name for the key (if any)
50
+ */
51
+ display_name?: string;
52
+ }
53
+ }
54
+
55
+ /**
56
+ * A member of an intent authorization quorum. Can be a user, key, or nested key
57
+ * quorum.
58
+ */
59
+ export type IntentAuthorizationMember =
60
+ | IntentAuthorizationMember.UserMember
61
+ | IntentAuthorizationMember.KeyMember
62
+ | IntentAuthorizationMember.KeyQuorumMember;
63
+
64
+ export namespace IntentAuthorizationMember {
65
+ export interface UserMember {
66
+ /**
67
+ * Whether this member has signed the intent
68
+ */
69
+ has_signed: boolean;
70
+
71
+ type: 'user';
72
+
73
+ /**
74
+ * User ID of the key quorum member
75
+ */
76
+ user_id: string;
77
+
78
+ /**
79
+ * Display name for the user (email, etc)
80
+ */
81
+ display_name?: string;
82
+ }
83
+
84
+ export interface KeyMember {
85
+ /**
86
+ * Whether this key has signed the intent
87
+ */
88
+ has_signed: boolean;
89
+
90
+ /**
91
+ * Public key of the key quorum member
92
+ */
93
+ public_key: string;
94
+
95
+ type: 'key';
96
+
97
+ /**
98
+ * Display name for the key (if any)
99
+ */
100
+ display_name?: string;
101
+ }
102
+
103
+ export interface KeyQuorumMember {
104
+ /**
105
+ * Whether this child key quorum has fulfilled its threshold
106
+ */
107
+ has_signed: boolean;
108
+
109
+ /**
110
+ * ID of the child key quorum member
111
+ */
112
+ key_quorum_id: string;
113
+
114
+ /**
115
+ * Members of this child quorum
116
+ */
117
+ members: Array<IntentsAPI.IntentAuthorizationKeyQuorumMember>;
118
+
119
+ /**
120
+ * Number of signatures required from this child quorum
121
+ */
122
+ threshold: number;
123
+
124
+ type: 'key_quorum';
125
+
126
+ /**
127
+ * Display name for the child key quorum (if any)
128
+ */
129
+ display_name?: string;
130
+ }
131
+ }
132
+
133
+ export declare namespace Intents {
134
+ export {
135
+ type IntentAuthorizationKeyQuorumMember as IntentAuthorizationKeyQuorumMember,
136
+ type IntentAuthorizationMember as IntentAuthorizationMember,
137
+ };
138
+ }
@@ -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.
@@ -492,7 +492,7 @@ export namespace Policy {
492
492
  }
493
493
 
494
494
  /**
495
- * Allowed contract addresses for eth_signAuthorization requests.
495
+ * Allowed contract addresses for eth_sign7702Authorization requests.
496
496
  */
497
497
  export interface Ethereum7702AuthorizationCondition {
498
498
  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';
@@ -335,7 +335,15 @@ export type WalletChainType =
335
335
  * Information about the custodian managing this wallet.
336
336
  */
337
337
  export interface WalletCustodian {
338
- name: string;
338
+ /**
339
+ * The custodian responsible for the wallet.
340
+ */
341
+ provider: string;
342
+
343
+ /**
344
+ * The resource ID of the beneficiary of the custodial wallet.
345
+ */
346
+ provider_user_id: string;
339
347
  }
340
348
 
341
349
  /**
@@ -404,12 +412,12 @@ export interface CustodialWallet {
404
412
  */
405
413
  chain_type: CustodialWalletChainType;
406
414
 
407
- owner_id: string | null;
408
-
409
415
  /**
410
- * The provider of the custodial wallet.
416
+ * Information about the custodian managing this wallet.
411
417
  */
412
- provider: CustodialWalletProvider;
418
+ custody: WalletCustodian;
419
+
420
+ owner_id: string | null;
413
421
 
414
422
  additional_signers?: Array<CustodialWallet.AdditionalSigner>;
415
423
 
@@ -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.5.0'; // x-release-please-version
1
+ export const VERSION = '0.6.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.5.0";
1
+ export declare const VERSION = "0.6.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.5.0";
1
+ export declare const VERSION = "0.6.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.5.0'; // x-release-please-version
4
+ exports.VERSION = '0.6.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.5.0'; // x-release-please-version
1
+ export const VERSION = '0.6.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map