@privy-io/node 0.8.0 → 0.9.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 (108) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/client.d.mts +17 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +17 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +17 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +17 -3
  9. package/client.mjs.map +1 -1
  10. package/internal/parse.d.mts.map +1 -1
  11. package/internal/parse.d.ts.map +1 -1
  12. package/internal/parse.js +5 -0
  13. package/internal/parse.js.map +1 -1
  14. package/internal/parse.mjs +5 -0
  15. package/internal/parse.mjs.map +1 -1
  16. package/package.json +21 -1
  17. package/resources/aggregations.d.mts +213 -2
  18. package/resources/aggregations.d.mts.map +1 -1
  19. package/resources/aggregations.d.ts +213 -2
  20. package/resources/aggregations.d.ts.map +1 -1
  21. package/resources/client-auth.d.mts +168 -2
  22. package/resources/client-auth.d.mts.map +1 -1
  23. package/resources/client-auth.d.ts +168 -2
  24. package/resources/client-auth.d.ts.map +1 -1
  25. package/resources/index.d.mts +6 -4
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +6 -4
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js +5 -1
  30. package/resources/index.js.map +1 -1
  31. package/resources/index.mjs +2 -0
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/policies.d.mts +2 -4
  34. package/resources/policies.d.mts.map +1 -1
  35. package/resources/policies.d.ts +2 -4
  36. package/resources/policies.d.ts.map +1 -1
  37. package/resources/users.d.mts +16 -6
  38. package/resources/users.d.mts.map +1 -1
  39. package/resources/users.d.ts +16 -6
  40. package/resources/users.d.ts.map +1 -1
  41. package/resources/wallets/balance.d.mts +10 -5
  42. package/resources/wallets/balance.d.mts.map +1 -1
  43. package/resources/wallets/balance.d.ts +10 -5
  44. package/resources/wallets/balance.d.ts.map +1 -1
  45. package/resources/wallets/balance.js +1 -2
  46. package/resources/wallets/balance.js.map +1 -1
  47. package/resources/wallets/balance.mjs +1 -2
  48. package/resources/wallets/balance.mjs.map +1 -1
  49. package/resources/wallets/index.d.mts +1 -1
  50. package/resources/wallets/index.d.mts.map +1 -1
  51. package/resources/wallets/index.d.ts +1 -1
  52. package/resources/wallets/index.d.ts.map +1 -1
  53. package/resources/wallets/index.js.map +1 -1
  54. package/resources/wallets/index.mjs.map +1 -1
  55. package/resources/wallets/transactions.d.mts +2 -2
  56. package/resources/wallets/transactions.d.mts.map +1 -1
  57. package/resources/wallets/transactions.d.ts +2 -2
  58. package/resources/wallets/transactions.d.ts.map +1 -1
  59. package/resources/wallets/wallets.d.mts +133 -13
  60. package/resources/wallets/wallets.d.mts.map +1 -1
  61. package/resources/wallets/wallets.d.ts +133 -13
  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 +940 -0
  66. package/resources/webhooks.d.mts.map +1 -0
  67. package/resources/webhooks.d.ts +940 -0
  68. package/resources/webhooks.d.ts.map +1 -0
  69. package/resources/webhooks.js +9 -0
  70. package/resources/webhooks.js.map +1 -0
  71. package/resources/webhooks.mjs +5 -0
  72. package/resources/webhooks.mjs.map +1 -0
  73. package/resources/yield.d.mts +264 -0
  74. package/resources/yield.d.mts.map +1 -0
  75. package/resources/yield.d.ts +264 -0
  76. package/resources/yield.d.ts.map +1 -0
  77. package/resources/yield.js +9 -0
  78. package/resources/yield.js.map +1 -0
  79. package/resources/yield.mjs +5 -0
  80. package/resources/yield.mjs.map +1 -0
  81. package/src/client.ts +179 -9
  82. package/src/internal/parse.ts +6 -0
  83. package/src/resources/aggregations.ts +361 -5
  84. package/src/resources/client-auth.ts +288 -1
  85. package/src/resources/index.ts +79 -3
  86. package/src/resources/policies.ts +2 -4
  87. package/src/resources/users.ts +52 -35
  88. package/src/resources/wallets/balance.ts +15 -5
  89. package/src/resources/wallets/index.ts +6 -2
  90. package/src/resources/wallets/transactions.ts +2 -2
  91. package/src/resources/wallets/wallets.ts +176 -30
  92. package/src/resources/webhooks.ts +1287 -0
  93. package/src/resources/yield.ts +330 -0
  94. package/src/types/x402.d.ts +18 -0
  95. package/src/version.ts +1 -1
  96. package/src/x402.ts +87 -0
  97. package/version.d.mts +1 -1
  98. package/version.d.ts +1 -1
  99. package/version.js +1 -1
  100. package/version.mjs +1 -1
  101. package/x402.d.mts +54 -0
  102. package/x402.d.mts.map +1 -0
  103. package/x402.d.ts +54 -0
  104. package/x402.d.ts.map +1 -0
  105. package/x402.js +75 -0
  106. package/x402.js.map +1 -0
  107. package/x402.mjs +72 -0
  108. package/x402.mjs.map +1 -0
@@ -7,6 +7,7 @@ export {
7
7
  type AggregationWindow,
8
8
  type AggregationGroupBy,
9
9
  type Aggregation,
10
+ type AggregationInput,
10
11
  } from './aggregations';
11
12
  export { Analytics, type AnalyticsEventInput } from './analytics';
12
13
  export { Apps, type AppResponse } from './apps';
@@ -16,6 +17,28 @@ export {
16
17
  type PrivyOAuthProviderID,
17
18
  type CustomOAuthProviderID,
18
19
  type OAuthProviderID,
20
+ type OnrampProvider,
21
+ type GetFiatCustomerRequestInput,
22
+ type CreateOrUpdateFiatCustomerRequestInput,
23
+ type BridgeFiatCustomerResponse,
24
+ type BridgeSandboxFiatCustomerResponse,
25
+ type FiatCustomerResponse,
26
+ type BridgeDestinationAsset,
27
+ type BridgeSourceAsset,
28
+ type BridgeFiatVirtualAccountSource,
29
+ type BridgeFiatVirtualAccountDestination,
30
+ type BridgeFiatVirtualAccountRequest,
31
+ type BridgeSandboxFiatVirtualAccountRequest,
32
+ type FiatVirtualAccountRequest,
33
+ type BridgeUsdFiatVirtualAccountDepositInstructions,
34
+ type BridgeEurFiatVirtualAccountDepositInstructions,
35
+ type BridgeMxnFiatVirtualAccountDepositInstructions,
36
+ type BridgeBrlFiatVirtualAccountDepositInstructions,
37
+ type BridgeGbpFiatVirtualAccountDepositInstructions,
38
+ type BridgeFiatVirtualAccountDepositInstructions,
39
+ type BridgeFiatVirtualAccountResponse,
40
+ type BridgeSandboxFiatVirtualAccountResponse,
41
+ type FiatVirtualAccountResponse,
19
42
  } from './client-auth';
20
43
  export {
21
44
  KeyQuorums,
@@ -50,7 +73,6 @@ export { Transactions, type TransactionGetResponse } from './transactions';
50
73
  export {
51
74
  Users,
52
75
  type AuthenticatedUser,
53
- type LinkedAccount,
54
76
  type User,
55
77
  type LinkedAccountEmail,
56
78
  type LinkedAccountPhone,
@@ -87,6 +109,7 @@ export {
87
109
  type CrossAppSmartWallet,
88
110
  type LinkedAccountCrossApp,
89
111
  type LinkedAccountAuthorizationKey,
112
+ type LinkedAccount,
90
113
  type LinkedAccountType,
91
114
  type CustomMetadata,
92
115
  type LinkedAccountWalletInput,
@@ -106,6 +129,7 @@ export {
106
129
  type LinkedAccountFarcasterInput,
107
130
  type LinkedAccountTelegramInput,
108
131
  type LinkedAccountCustomJwtInput,
132
+ type LinkedAccountPasskeyInput,
109
133
  type LinkedAccountInput,
110
134
  type UserBatchCreateInput,
111
135
  type SMSMfaMethod,
@@ -136,11 +160,11 @@ export {
136
160
  } from './users';
137
161
  export {
138
162
  Wallets,
163
+ type Wallet,
139
164
  type CurveSigningChainType,
165
+ type ExtendedChainType,
140
166
  type FirstClassChainType,
141
- type Wallet,
142
167
  type WalletChainType,
143
- type ExtendedChainType,
144
168
  type WalletCustodian,
145
169
  type CustodialWalletProvider,
146
170
  type CustodialWalletChainType,
@@ -148,6 +172,10 @@ export {
148
172
  type CustodialWallet,
149
173
  type HpkeImportConfig,
150
174
  type SuiCommandName,
175
+ type WalletBatchItemInput,
176
+ type WalletBatchCreateInput,
177
+ type WalletBatchCreateResult,
178
+ type WalletBatchCreateResponse,
151
179
  type EthereumPersonalSignRpcInput,
152
180
  type EthereumSignTransactionRpcInput,
153
181
  type EthereumSendTransactionRpcInput,
@@ -186,3 +214,51 @@ export {
186
214
  type WalletCreateWalletsWithRecoveryParams,
187
215
  type WalletsCursor,
188
216
  } from './wallets/wallets';
217
+ export {
218
+ Webhooks,
219
+ type UserCreatedWebhookPayload,
220
+ type UserAuthenticatedWebhookPayload,
221
+ type UserLinkedAccountWebhookPayload,
222
+ type UserUnlinkedAccountWebhookPayload,
223
+ type UserUpdatedAccountWebhookPayload,
224
+ type UserTransferredAccountWebhookPayload,
225
+ type UserWalletCreatedWebhookPayload,
226
+ type TransactionBroadcastedWebhookPayload,
227
+ type TransactionConfirmedWebhookPayload,
228
+ type TransactionExecutionRevertedWebhookPayload,
229
+ type TransactionStillPendingWebhookPayload,
230
+ type TransactionFailedWebhookPayload,
231
+ type TransactionReplacedWebhookPayload,
232
+ type TransactionProviderErrorWebhookPayload,
233
+ type FundsDepositedWebhookPayload,
234
+ type FundsWithdrawnWebhookPayload,
235
+ type PrivateKeyExportWebhookPayload,
236
+ type WalletRecoverySetupWebhookPayload,
237
+ type WalletRecoveredWebhookPayload,
238
+ type MfaEnabledWebhookPayload,
239
+ type MfaDisabledWebhookPayload,
240
+ type KrakenEmbedVerificationCompletedWebhookPayload,
241
+ type KrakenEmbedVerificationFailedWebhookPayload,
242
+ type KrakenEmbedQuoteExecutedWebhookPayload,
243
+ type KrakenEmbedQuoteExecutionFailedWebhookPayload,
244
+ type KrakenEmbedQuoteCancelledWebhookPayload,
245
+ type KrakenEmbedUserVerifiedWebhookPayload,
246
+ type KrakenEmbedUserDisabledWebhookPayload,
247
+ type KrakenEmbedUserClosedWebhookPayload,
248
+ } from './webhooks';
249
+ export {
250
+ Yield,
251
+ type EthereumYieldProvider,
252
+ type EthereumYieldSweepType,
253
+ type EthereumYieldSweepStatus,
254
+ type EthereumYieldDepositInput,
255
+ type EthereumYieldWithdrawInput,
256
+ type EthereumYieldSweepResponse,
257
+ type EthereumVaultDetailsInput,
258
+ type EthereumYieldSweepIDInput,
259
+ type EthereumVaultResponse,
260
+ type EthereumVaultDetailsResponse,
261
+ type EthereumYieldPositionsInput,
262
+ type EthereumVaultPosition,
263
+ type EthereumYieldPositionResponse,
264
+ } from './yield';
@@ -1193,8 +1193,7 @@ export interface PolicyCreateParams {
1193
1193
  owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
1194
1194
 
1195
1195
  /**
1196
- * Body param: The key quorum ID to set as the owner of the resource. If you
1197
- * provide this, do not specify an owner.
1196
+ * Body param
1198
1197
  */
1199
1198
  owner_id?: string | null;
1200
1199
 
@@ -1655,8 +1654,7 @@ export interface PolicyUpdateParams {
1655
1654
  owner?: PolicyUpdateParams.PublicKeyOwner | PolicyUpdateParams.UserOwner | null;
1656
1655
 
1657
1656
  /**
1658
- * Body param: The key quorum ID to set as the owner of the resource. If you
1659
- * provide this, do not specify an owner.
1657
+ * Body param
1660
1658
  */
1661
1659
  owner_id?: string | null;
1662
1660
 
@@ -348,39 +348,6 @@ export interface AuthenticatedUser {
348
348
  oauth_tokens?: OAuthTokens;
349
349
  }
350
350
 
351
- /**
352
- * A linked account for the user.
353
- */
354
- export type LinkedAccount =
355
- | LinkedAccountEmail
356
- | LinkedAccountPhone
357
- | LinkedAccountEthereum
358
- | LinkedAccountSolana
359
- | LinkedAccountSmartWallet
360
- | LinkedAccountEthereumEmbeddedWallet
361
- | LinkedAccountSolanaEmbeddedWallet
362
- | LinkedAccountBitcoinSegwitEmbeddedWallet
363
- | LinkedAccountBitcoinTaprootEmbeddedWallet
364
- | LinkedAccountCurveSigningEmbeddedWallet
365
- | LinkedAccountGoogleOAuth
366
- | LinkedAccountTwitterOAuth
367
- | LinkedAccountDiscordOAuth
368
- | LinkedAccountGitHubOAuth
369
- | LinkedAccountSpotifyOAuth
370
- | LinkedAccountInstagramOAuth
371
- | LinkedAccountTiktokOAuth
372
- | LinkedAccountLineOAuth
373
- | LinkedAccountTwitchOAuth
374
- | LinkedAccountLinkedInOAuth
375
- | LinkedAccountAppleOAuth
376
- | LinkedAccountCustomOAuth
377
- | LinkedAccountCustomJwt
378
- | LinkedAccountFarcaster
379
- | LinkedAccountPasskey
380
- | LinkedAccountTelegram
381
- | LinkedAccountCrossApp
382
- | LinkedAccountAuthorizationKey;
383
-
384
351
  /**
385
352
  * A Privy user object.
386
353
  */
@@ -1201,6 +1168,39 @@ export interface LinkedAccountAuthorizationKey {
1201
1168
  verified_at: number;
1202
1169
  }
1203
1170
 
1171
+ /**
1172
+ * A linked account for the user.
1173
+ */
1174
+ export type LinkedAccount =
1175
+ | LinkedAccountEmail
1176
+ | LinkedAccountPhone
1177
+ | LinkedAccountEthereum
1178
+ | LinkedAccountSolana
1179
+ | LinkedAccountSmartWallet
1180
+ | LinkedAccountEthereumEmbeddedWallet
1181
+ | LinkedAccountSolanaEmbeddedWallet
1182
+ | LinkedAccountBitcoinSegwitEmbeddedWallet
1183
+ | LinkedAccountBitcoinTaprootEmbeddedWallet
1184
+ | LinkedAccountCurveSigningEmbeddedWallet
1185
+ | LinkedAccountGoogleOAuth
1186
+ | LinkedAccountTwitterOAuth
1187
+ | LinkedAccountDiscordOAuth
1188
+ | LinkedAccountGitHubOAuth
1189
+ | LinkedAccountSpotifyOAuth
1190
+ | LinkedAccountInstagramOAuth
1191
+ | LinkedAccountTiktokOAuth
1192
+ | LinkedAccountLineOAuth
1193
+ | LinkedAccountTwitchOAuth
1194
+ | LinkedAccountLinkedInOAuth
1195
+ | LinkedAccountAppleOAuth
1196
+ | LinkedAccountCustomOAuth
1197
+ | LinkedAccountCustomJwt
1198
+ | LinkedAccountFarcaster
1199
+ | LinkedAccountPasskey
1200
+ | LinkedAccountTelegram
1201
+ | LinkedAccountCrossApp
1202
+ | LinkedAccountAuthorizationKey;
1203
+
1204
1204
  /**
1205
1205
  * The possible types of linked accounts.
1206
1206
  */
@@ -1454,6 +1454,21 @@ export interface LinkedAccountCustomJwtInput {
1454
1454
  type: 'custom_auth';
1455
1455
  }
1456
1456
 
1457
+ /**
1458
+ * The payload for importing a passkey account.
1459
+ */
1460
+ export interface LinkedAccountPasskeyInput {
1461
+ credential_device_type: 'singleDevice' | 'multiDevice';
1462
+
1463
+ credential_id: string;
1464
+
1465
+ credential_public_key: string;
1466
+
1467
+ credential_username: string;
1468
+
1469
+ type: 'passkey';
1470
+ }
1471
+
1457
1472
  /**
1458
1473
  * The input for adding a linked account to a user.
1459
1474
  */
@@ -1474,7 +1489,8 @@ export type LinkedAccountInput =
1474
1489
  | LinkedAccountLinkedInInput
1475
1490
  | LinkedAccountFarcasterInput
1476
1491
  | LinkedAccountTelegramInput
1477
- | LinkedAccountCustomJwtInput;
1492
+ | LinkedAccountCustomJwtInput
1493
+ | LinkedAccountPasskeyInput;
1478
1494
 
1479
1495
  /**
1480
1496
  * The payload for batch creating users.
@@ -1762,7 +1778,6 @@ export interface UserUnlinkLinkedAccountParams {
1762
1778
  export declare namespace Users {
1763
1779
  export {
1764
1780
  type AuthenticatedUser as AuthenticatedUser,
1765
- type LinkedAccount as LinkedAccount,
1766
1781
  type User as User,
1767
1782
  type LinkedAccountEmail as LinkedAccountEmail,
1768
1783
  type LinkedAccountPhone as LinkedAccountPhone,
@@ -1799,6 +1814,7 @@ export declare namespace Users {
1799
1814
  type CrossAppSmartWallet as CrossAppSmartWallet,
1800
1815
  type LinkedAccountCrossApp as LinkedAccountCrossApp,
1801
1816
  type LinkedAccountAuthorizationKey as LinkedAccountAuthorizationKey,
1817
+ type LinkedAccount as LinkedAccount,
1802
1818
  type LinkedAccountType as LinkedAccountType,
1803
1819
  type CustomMetadata as CustomMetadata,
1804
1820
  type LinkedAccountWalletInput as LinkedAccountWalletInput,
@@ -1818,6 +1834,7 @@ export declare namespace Users {
1818
1834
  type LinkedAccountFarcasterInput as LinkedAccountFarcasterInput,
1819
1835
  type LinkedAccountTelegramInput as LinkedAccountTelegramInput,
1820
1836
  type LinkedAccountCustomJwtInput as LinkedAccountCustomJwtInput,
1837
+ type LinkedAccountPasskeyInput as LinkedAccountPasskeyInput,
1821
1838
  type LinkedAccountInput as LinkedAccountInput,
1822
1839
  type UserBatchCreateInput as UserBatchCreateInput,
1823
1840
  type SMSMfaMethod as SMSMfaMethod,
@@ -13,11 +13,14 @@ export class Balance extends APIResource {
13
13
  * ```ts
14
14
  * const balance = await client.wallets.balance.get(
15
15
  * 'wallet_id',
16
- * { asset: 'usdc', chain: 'ethereum' },
17
16
  * );
18
17
  * ```
19
18
  */
20
- get(walletID: string, query: BalanceGetParams, options?: RequestOptions): APIPromise<BalanceGetResponse> {
19
+ get(
20
+ walletID: string,
21
+ query: BalanceGetParams | null | undefined = {},
22
+ options?: RequestOptions,
23
+ ): APIPromise<BalanceGetResponse> {
21
24
  return this._client.get(path`/v1/wallets/${walletID}/balance`, { query, ...options });
22
25
  }
23
26
  }
@@ -28,7 +31,7 @@ export interface BalanceGetResponse {
28
31
 
29
32
  export namespace BalanceGetResponse {
30
33
  export interface Balance {
31
- asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol';
34
+ asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
32
35
 
33
36
  chain:
34
37
  | 'ethereum'
@@ -57,7 +60,14 @@ export namespace BalanceGetResponse {
57
60
  }
58
61
 
59
62
  export interface BalanceGetParams {
60
- asset:
63
+ /**
64
+ * The token contract address(es) to query in format "chain:address" (e.g.,
65
+ * "base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" or
66
+ * "solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v").
67
+ */
68
+ token?: string | Array<string>;
69
+
70
+ asset?:
61
71
  | 'usdc'
62
72
  | 'eth'
63
73
  | 'pol'
@@ -67,7 +77,7 @@ export interface BalanceGetParams {
67
77
  | 'sol'
68
78
  | Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
69
79
 
70
- chain:
80
+ chain?:
71
81
  | 'ethereum'
72
82
  | 'arbitrum'
73
83
  | 'base'
@@ -4,11 +4,11 @@ export { Balance, type BalanceGetResponse, type BalanceGetParams } from './balan
4
4
  export { Transactions, type TransactionGetResponse, type TransactionGetParams } from './transactions';
5
5
  export {
6
6
  Wallets,
7
+ type Wallet,
7
8
  type CurveSigningChainType,
9
+ type ExtendedChainType,
8
10
  type FirstClassChainType,
9
- type Wallet,
10
11
  type WalletChainType,
11
- type ExtendedChainType,
12
12
  type WalletCustodian,
13
13
  type CustodialWalletProvider,
14
14
  type CustodialWalletChainType,
@@ -16,6 +16,10 @@ export {
16
16
  type CustodialWallet,
17
17
  type HpkeImportConfig,
18
18
  type SuiCommandName,
19
+ type WalletBatchItemInput,
20
+ type WalletBatchCreateInput,
21
+ type WalletBatchCreateResult,
22
+ type WalletBatchCreateResponse,
19
23
  type EthereumPersonalSignRpcInput,
20
24
  type EthereumSignTransactionRpcInput,
21
25
  type EthereumSendTransactionRpcInput,
@@ -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' | 'eurc' | 'usdb' | 'sol';
64
+ asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
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' | 'eurc' | 'usdb' | 'sol';
102
+ asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
103
103
 
104
104
  chain:
105
105
  | 'ethereum'
@@ -270,26 +270,6 @@ export class Wallets extends APIResource {
270
270
 
271
271
  export type WalletsCursor = Cursor<Wallet>;
272
272
 
273
- /**
274
- * The wallet chain types that support curve-based signing.
275
- */
276
- export type CurveSigningChainType =
277
- | 'cosmos'
278
- | 'stellar'
279
- | 'sui'
280
- | 'aptos'
281
- | 'movement'
282
- | 'tron'
283
- | 'bitcoin-segwit'
284
- | 'near'
285
- | 'ton'
286
- | 'starknet';
287
-
288
- /**
289
- * The wallet chain types that offer first class support.
290
- */
291
- export type FirstClassChainType = 'ethereum' | 'solana';
292
-
293
273
  /**
294
274
  * A wallet managed by Privy's wallet infrastructure.
295
275
  */
@@ -362,11 +342,9 @@ export namespace Wallet {
362
342
  }
363
343
 
364
344
  /**
365
- * The wallet chain types.
345
+ * The wallet chain types that support curve-based signing.
366
346
  */
367
- export type WalletChainType =
368
- | 'ethereum'
369
- | 'solana'
347
+ export type CurveSigningChainType =
370
348
  | 'cosmos'
371
349
  | 'stellar'
372
350
  | 'sui'
@@ -376,8 +354,7 @@ export type WalletChainType =
376
354
  | 'bitcoin-segwit'
377
355
  | 'near'
378
356
  | 'ton'
379
- | 'starknet'
380
- | 'spark';
357
+ | 'starknet';
381
358
 
382
359
  /**
383
360
  * The wallet chain types that are not first class chains.
@@ -395,6 +372,29 @@ export type ExtendedChainType =
395
372
  | 'starknet'
396
373
  | 'spark';
397
374
 
375
+ /**
376
+ * The wallet chain types that offer first class support.
377
+ */
378
+ export type FirstClassChainType = 'ethereum' | 'solana';
379
+
380
+ /**
381
+ * The wallet chain types.
382
+ */
383
+ export type WalletChainType =
384
+ | 'ethereum'
385
+ | 'solana'
386
+ | 'cosmos'
387
+ | 'stellar'
388
+ | 'sui'
389
+ | 'aptos'
390
+ | 'movement'
391
+ | 'tron'
392
+ | 'bitcoin-segwit'
393
+ | 'near'
394
+ | 'ton'
395
+ | 'starknet'
396
+ | 'spark';
397
+
398
398
  /**
399
399
  * Information about the custodian managing this wallet.
400
400
  */
@@ -518,6 +518,139 @@ export interface HpkeImportConfig {
518
518
  */
519
519
  export type SuiCommandName = 'TransferObjects' | 'SplitCoins' | 'MergeCoins';
520
520
 
521
+ /**
522
+ * Input for a single wallet in a batch creation request.
523
+ */
524
+ export interface WalletBatchItemInput {
525
+ /**
526
+ * The wallet chain types.
527
+ */
528
+ chain_type: WalletChainType;
529
+
530
+ /**
531
+ * Additional signers for the wallet.
532
+ */
533
+ additional_signers?: Array<WalletBatchItemInput.AdditionalSigner>;
534
+
535
+ /**
536
+ * The owner of the resource. If you provide this, do not specify an owner_id as it
537
+ * will be generated automatically. When updating a wallet, you can set the owner
538
+ * to null to remove the owner.
539
+ */
540
+ owner?: WalletBatchItemInput.PublicKeyOwner | WalletBatchItemInput.UserOwner | null;
541
+
542
+ /**
543
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
544
+ * not specify an owner.
545
+ */
546
+ owner_id?: string;
547
+
548
+ /**
549
+ * List of policy IDs for policies that should be enforced on the wallet.
550
+ * Currently, only one policy is supported per wallet.
551
+ */
552
+ policy_ids?: Array<string>;
553
+ }
554
+
555
+ export namespace WalletBatchItemInput {
556
+ export interface AdditionalSigner {
557
+ signer_id: string;
558
+
559
+ /**
560
+ * The array of policy IDs that will be applied to wallet requests. If specified,
561
+ * this will override the base policy IDs set on the wallet.
562
+ */
563
+ override_policy_ids?: Array<string>;
564
+ }
565
+
566
+ /**
567
+ * The P-256 public key of the owner of the resource, in base64-encoded DER format.
568
+ * If you provide this, do not specify an owner_id as it will be generated
569
+ * automatically.
570
+ */
571
+ export interface PublicKeyOwner {
572
+ public_key: string;
573
+ }
574
+
575
+ /**
576
+ * The user ID of the owner of the resource. The user must already exist, and this
577
+ * value must start with "did:privy:". If you provide this, do not specify an
578
+ * owner_id as it will be generated automatically.
579
+ */
580
+ export interface UserOwner {
581
+ user_id: string;
582
+ }
583
+ }
584
+
585
+ /**
586
+ * Request body for batch wallet creation.
587
+ */
588
+ export interface WalletBatchCreateInput {
589
+ /**
590
+ * Array of wallet creation requests. Minimum 1, maximum 100.
591
+ */
592
+ wallets: Array<WalletBatchItemInput>;
593
+ }
594
+
595
+ /**
596
+ * A single result from a batch wallet creation operation.
597
+ */
598
+ export type WalletBatchCreateResult =
599
+ | WalletBatchCreateResult.WalletBatchCreateSuccess
600
+ | WalletBatchCreateResult.WalletBatchCreateFailure;
601
+
602
+ export namespace WalletBatchCreateResult {
603
+ /**
604
+ * A successful wallet creation result within a batch operation.
605
+ */
606
+ export interface WalletBatchCreateSuccess {
607
+ /**
608
+ * The index of the wallet in the original request array.
609
+ */
610
+ index: number;
611
+
612
+ success: true;
613
+
614
+ /**
615
+ * A wallet managed by Privy's wallet infrastructure.
616
+ */
617
+ wallet: WalletsAPI.Wallet;
618
+ }
619
+
620
+ /**
621
+ * A failed wallet creation result within a batch operation.
622
+ */
623
+ export interface WalletBatchCreateFailure {
624
+ /**
625
+ * A PrivyErrorCode string identifying the error type (e.g., "invalid_data",
626
+ * "resource_conflict").
627
+ */
628
+ code: string;
629
+
630
+ /**
631
+ * A human-readable error message with details about what went wrong.
632
+ */
633
+ error: string;
634
+
635
+ /**
636
+ * The index of the wallet in the original request array.
637
+ */
638
+ index: number;
639
+
640
+ success: false;
641
+ }
642
+ }
643
+
644
+ /**
645
+ * Response for a batch wallet creation request.
646
+ */
647
+ export interface WalletBatchCreateResponse {
648
+ /**
649
+ * Array of results for each wallet creation request, in the same order as input.
650
+ */
651
+ results: Array<WalletBatchCreateResult>;
652
+ }
653
+
521
654
  /**
522
655
  * Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
523
656
  */
@@ -1303,11 +1436,21 @@ export namespace WalletCreateParams {
1303
1436
  }
1304
1437
 
1305
1438
  export interface WalletListParams extends CursorParams {
1439
+ /**
1440
+ * Filter wallets by authorization public key. Returns wallets owned by key quorums
1441
+ * that include the specified P-256 public key (base64-encoded DER format). Cannot
1442
+ * be used together with user_id.
1443
+ */
1444
+ authorization_key?: string;
1445
+
1306
1446
  /**
1307
1447
  * The wallet chain types.
1308
1448
  */
1309
1449
  chain_type?: WalletChainType;
1310
1450
 
1451
+ /**
1452
+ * Filter wallets by user ID. Cannot be used together with authorization_key.
1453
+ */
1311
1454
  user_id?: string;
1312
1455
  }
1313
1456
 
@@ -2148,8 +2291,7 @@ export interface WalletUpdateParams {
2148
2291
  owner?: WalletUpdateParams.PublicKeyOwner | WalletUpdateParams.UserOwner | null;
2149
2292
 
2150
2293
  /**
2151
- * Body param: The key quorum ID to set as the owner of the resource. If you
2152
- * provide this, do not specify an owner.
2294
+ * Body param
2153
2295
  */
2154
2296
  owner_id?: string | null;
2155
2297
 
@@ -2274,11 +2416,11 @@ Wallets.Balance = Balance;
2274
2416
 
2275
2417
  export declare namespace Wallets {
2276
2418
  export {
2419
+ type Wallet as Wallet,
2277
2420
  type CurveSigningChainType as CurveSigningChainType,
2421
+ type ExtendedChainType as ExtendedChainType,
2278
2422
  type FirstClassChainType as FirstClassChainType,
2279
- type Wallet as Wallet,
2280
2423
  type WalletChainType as WalletChainType,
2281
- type ExtendedChainType as ExtendedChainType,
2282
2424
  type WalletCustodian as WalletCustodian,
2283
2425
  type CustodialWalletProvider as CustodialWalletProvider,
2284
2426
  type CustodialWalletChainType as CustodialWalletChainType,
@@ -2286,6 +2428,10 @@ export declare namespace Wallets {
2286
2428
  type CustodialWallet as CustodialWallet,
2287
2429
  type HpkeImportConfig as HpkeImportConfig,
2288
2430
  type SuiCommandName as SuiCommandName,
2431
+ type WalletBatchItemInput as WalletBatchItemInput,
2432
+ type WalletBatchCreateInput as WalletBatchCreateInput,
2433
+ type WalletBatchCreateResult as WalletBatchCreateResult,
2434
+ type WalletBatchCreateResponse as WalletBatchCreateResponse,
2289
2435
  type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput,
2290
2436
  type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput,
2291
2437
  type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput,