@privy-io/api-types 0.4.0 → 0.5.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.
- package/CHANGELOG.md +37 -0
- package/client.d.mts +18 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -11
- package/client.d.ts.map +1 -1
- package/client.js +17 -3
- package/client.js.map +1 -1
- package/client.mjs +17 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/aggregations.d.mts +213 -2
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +213 -2
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/client-auth.d.mts +167 -1
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +167 -1
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/funding.d.mts +4 -4
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +4 -4
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +7 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -5
- 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 +58 -60
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +58 -60
- package/resources/policies.d.ts.map +1 -1
- package/resources/users.d.mts +72 -62
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +72 -62
- package/resources/users.d.ts.map +1 -1
- package/resources/wallets/balance.d.mts +10 -5
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +10 -5
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +1 -2
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +1 -2
- package/resources/wallets/balance.mjs.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/wallets.d.mts +192 -72
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +192 -72
- 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/resources/webhooks.d.mts +940 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +940 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +9 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +5 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources/yield.d.mts +264 -0
- package/resources/yield.d.mts.map +1 -0
- package/resources/yield.d.ts +264 -0
- package/resources/yield.d.ts.map +1 -0
- package/resources/yield.js +9 -0
- package/resources/yield.js.map +1 -0
- package/resources/yield.mjs +5 -0
- package/resources/yield.mjs.map +1 -0
- package/src/client.ts +184 -14
- package/src/internal/parse.ts +6 -0
- package/src/resources/aggregations.ts +361 -5
- package/src/resources/client-auth.ts +287 -0
- package/src/resources/funding.ts +4 -1
- package/src/resources/index.ts +84 -8
- package/src/resources/policies.ts +78 -80
- package/src/resources/users.ts +128 -111
- package/src/resources/wallets/balance.ts +15 -5
- package/src/resources/wallets/index.ts +7 -3
- package/src/resources/wallets/transactions.ts +2 -2
- package/src/resources/wallets/wallets.ts +237 -91
- package/src/resources/webhooks.ts +1287 -0
- package/src/resources/yield.ts +330 -0
- 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
package/src/resources/index.ts
CHANGED
|
@@ -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';
|
|
@@ -84,6 +85,28 @@ export {
|
|
|
84
85
|
type PrivyOAuthProviderID,
|
|
85
86
|
type CustomOAuthProviderID,
|
|
86
87
|
type OAuthProviderID,
|
|
88
|
+
type OnrampProvider,
|
|
89
|
+
type GetFiatCustomerRequestInput,
|
|
90
|
+
type CreateOrUpdateFiatCustomerRequestInput,
|
|
91
|
+
type BridgeFiatCustomerResponse,
|
|
92
|
+
type BridgeSandboxFiatCustomerResponse,
|
|
93
|
+
type FiatCustomerResponse,
|
|
94
|
+
type BridgeDestinationAsset,
|
|
95
|
+
type BridgeSourceAsset,
|
|
96
|
+
type BridgeFiatVirtualAccountSource,
|
|
97
|
+
type BridgeFiatVirtualAccountDestination,
|
|
98
|
+
type BridgeFiatVirtualAccountRequest,
|
|
99
|
+
type BridgeSandboxFiatVirtualAccountRequest,
|
|
100
|
+
type FiatVirtualAccountRequest,
|
|
101
|
+
type BridgeUsdFiatVirtualAccountDepositInstructions,
|
|
102
|
+
type BridgeEurFiatVirtualAccountDepositInstructions,
|
|
103
|
+
type BridgeMxnFiatVirtualAccountDepositInstructions,
|
|
104
|
+
type BridgeBrlFiatVirtualAccountDepositInstructions,
|
|
105
|
+
type BridgeGbpFiatVirtualAccountDepositInstructions,
|
|
106
|
+
type BridgeFiatVirtualAccountDepositInstructions,
|
|
107
|
+
type BridgeFiatVirtualAccountResponse,
|
|
108
|
+
type BridgeSandboxFiatVirtualAccountResponse,
|
|
109
|
+
type FiatVirtualAccountResponse,
|
|
87
110
|
} from './client-auth';
|
|
88
111
|
export { CrossApp, type CrossAppConnectionsResponse } from './cross-app';
|
|
89
112
|
export {
|
|
@@ -117,12 +140,12 @@ export {
|
|
|
117
140
|
} from './key-quorums';
|
|
118
141
|
export {
|
|
119
142
|
Policies,
|
|
120
|
-
type Policy,
|
|
121
143
|
type SuiTransactionCommandOperator,
|
|
122
144
|
type SuiTransferObjectsCommandField,
|
|
123
145
|
type TronTransactionCondition,
|
|
124
146
|
type SuiTransactionCommandCondition,
|
|
125
147
|
type SuiTransferObjectsCommandCondition,
|
|
148
|
+
type Policy,
|
|
126
149
|
type PolicyCreateRuleResponse,
|
|
127
150
|
type PolicyDeleteResponse,
|
|
128
151
|
type PolicyDeleteRuleResponse,
|
|
@@ -144,10 +167,6 @@ export {
|
|
|
144
167
|
} from './transactions';
|
|
145
168
|
export {
|
|
146
169
|
Users,
|
|
147
|
-
type AuthenticatedUser,
|
|
148
|
-
type LinkedAccount,
|
|
149
|
-
type User,
|
|
150
|
-
type UserWithIdentityToken,
|
|
151
170
|
type LinkedAccountEmail,
|
|
152
171
|
type LinkedAccountPhone,
|
|
153
172
|
type LinkedAccountBaseWallet,
|
|
@@ -183,6 +202,7 @@ export {
|
|
|
183
202
|
type CrossAppSmartWallet,
|
|
184
203
|
type LinkedAccountCrossApp,
|
|
185
204
|
type LinkedAccountAuthorizationKey,
|
|
205
|
+
type LinkedAccount,
|
|
186
206
|
type LinkedAccountType,
|
|
187
207
|
type CustomMetadata,
|
|
188
208
|
type LinkedAccountWalletInput,
|
|
@@ -202,13 +222,17 @@ export {
|
|
|
202
222
|
type LinkedAccountFarcasterInput,
|
|
203
223
|
type LinkedAccountTelegramInput,
|
|
204
224
|
type LinkedAccountCustomJwtInput,
|
|
225
|
+
type LinkedAccountPasskeyInput,
|
|
205
226
|
type LinkedAccountInput,
|
|
206
227
|
type UserBatchCreateInput,
|
|
207
228
|
type SMSMfaMethod,
|
|
208
229
|
type TotpMfaMethod,
|
|
209
230
|
type PasskeyMfaMethod,
|
|
210
231
|
type LinkedMfaMethod,
|
|
232
|
+
type User,
|
|
211
233
|
type OAuthTokens,
|
|
234
|
+
type UserWithIdentityToken,
|
|
235
|
+
type AuthenticatedUser,
|
|
212
236
|
type UserCreateParams,
|
|
213
237
|
type UserListParams,
|
|
214
238
|
type UserGetByCustomAuthIDParams,
|
|
@@ -231,12 +255,11 @@ export {
|
|
|
231
255
|
} from './users';
|
|
232
256
|
export {
|
|
233
257
|
Wallets,
|
|
258
|
+
type WalletRevokeResponse,
|
|
234
259
|
type CurveSigningChainType,
|
|
260
|
+
type ExtendedChainType,
|
|
235
261
|
type FirstClassChainType,
|
|
236
|
-
type Wallet,
|
|
237
262
|
type WalletChainType,
|
|
238
|
-
type WalletRevokeResponse,
|
|
239
|
-
type ExtendedChainType,
|
|
240
263
|
type WalletCustodian,
|
|
241
264
|
type CustodialWalletProvider,
|
|
242
265
|
type CustodialWalletChainType,
|
|
@@ -244,6 +267,11 @@ export {
|
|
|
244
267
|
type CustodialWallet,
|
|
245
268
|
type HpkeImportConfig,
|
|
246
269
|
type SuiCommandName,
|
|
270
|
+
type Wallet,
|
|
271
|
+
type WalletBatchItemInput,
|
|
272
|
+
type WalletBatchCreateInput,
|
|
273
|
+
type WalletBatchCreateResult,
|
|
274
|
+
type WalletBatchCreateResponse,
|
|
247
275
|
type EthereumPersonalSignRpcInput,
|
|
248
276
|
type EthereumSignTransactionRpcInput,
|
|
249
277
|
type EthereumSendTransactionRpcInput,
|
|
@@ -282,3 +310,51 @@ export {
|
|
|
282
310
|
type WalletCreateWalletsWithRecoveryParams,
|
|
283
311
|
type WalletsCursor,
|
|
284
312
|
} from './wallets/wallets';
|
|
313
|
+
export {
|
|
314
|
+
Webhooks,
|
|
315
|
+
type UserCreatedWebhookPayload,
|
|
316
|
+
type UserAuthenticatedWebhookPayload,
|
|
317
|
+
type UserLinkedAccountWebhookPayload,
|
|
318
|
+
type UserUnlinkedAccountWebhookPayload,
|
|
319
|
+
type UserUpdatedAccountWebhookPayload,
|
|
320
|
+
type UserTransferredAccountWebhookPayload,
|
|
321
|
+
type UserWalletCreatedWebhookPayload,
|
|
322
|
+
type TransactionBroadcastedWebhookPayload,
|
|
323
|
+
type TransactionConfirmedWebhookPayload,
|
|
324
|
+
type TransactionExecutionRevertedWebhookPayload,
|
|
325
|
+
type TransactionStillPendingWebhookPayload,
|
|
326
|
+
type TransactionFailedWebhookPayload,
|
|
327
|
+
type TransactionReplacedWebhookPayload,
|
|
328
|
+
type TransactionProviderErrorWebhookPayload,
|
|
329
|
+
type FundsDepositedWebhookPayload,
|
|
330
|
+
type FundsWithdrawnWebhookPayload,
|
|
331
|
+
type PrivateKeyExportWebhookPayload,
|
|
332
|
+
type WalletRecoverySetupWebhookPayload,
|
|
333
|
+
type WalletRecoveredWebhookPayload,
|
|
334
|
+
type MfaEnabledWebhookPayload,
|
|
335
|
+
type MfaDisabledWebhookPayload,
|
|
336
|
+
type KrakenEmbedVerificationCompletedWebhookPayload,
|
|
337
|
+
type KrakenEmbedVerificationFailedWebhookPayload,
|
|
338
|
+
type KrakenEmbedQuoteExecutedWebhookPayload,
|
|
339
|
+
type KrakenEmbedQuoteExecutionFailedWebhookPayload,
|
|
340
|
+
type KrakenEmbedQuoteCancelledWebhookPayload,
|
|
341
|
+
type KrakenEmbedUserVerifiedWebhookPayload,
|
|
342
|
+
type KrakenEmbedUserDisabledWebhookPayload,
|
|
343
|
+
type KrakenEmbedUserClosedWebhookPayload,
|
|
344
|
+
} from './webhooks';
|
|
345
|
+
export {
|
|
346
|
+
Yield,
|
|
347
|
+
type EthereumYieldProvider,
|
|
348
|
+
type EthereumYieldSweepType,
|
|
349
|
+
type EthereumYieldSweepStatus,
|
|
350
|
+
type EthereumYieldDepositInput,
|
|
351
|
+
type EthereumYieldWithdrawInput,
|
|
352
|
+
type EthereumYieldSweepResponse,
|
|
353
|
+
type EthereumVaultDetailsInput,
|
|
354
|
+
type EthereumYieldSweepIDInput,
|
|
355
|
+
type EthereumVaultResponse,
|
|
356
|
+
type EthereumVaultDetailsResponse,
|
|
357
|
+
type EthereumYieldPositionsInput,
|
|
358
|
+
type EthereumVaultPosition,
|
|
359
|
+
type EthereumYieldPositionResponse,
|
|
360
|
+
} from './yield';
|
|
@@ -255,6 +255,81 @@ export class Policies extends APIResource {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
/**
|
|
259
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
260
|
+
* supported for command names.
|
|
261
|
+
*/
|
|
262
|
+
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
266
|
+
* and 'amount' are supported.
|
|
267
|
+
*/
|
|
268
|
+
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
272
|
+
* transaction types.
|
|
273
|
+
*/
|
|
274
|
+
export interface TronTransactionCondition {
|
|
275
|
+
/**
|
|
276
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
277
|
+
*/
|
|
278
|
+
field:
|
|
279
|
+
| 'TransferContract.to_address'
|
|
280
|
+
| 'TransferContract.amount'
|
|
281
|
+
| 'TriggerSmartContract.contract_address'
|
|
282
|
+
| 'TriggerSmartContract.call_value'
|
|
283
|
+
| 'TriggerSmartContract.token_id'
|
|
284
|
+
| 'TriggerSmartContract.call_token_value';
|
|
285
|
+
|
|
286
|
+
field_source: 'tron_transaction';
|
|
287
|
+
|
|
288
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
289
|
+
|
|
290
|
+
value: string | Array<string>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
295
|
+
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
296
|
+
* 'in' operators are supported.
|
|
297
|
+
*/
|
|
298
|
+
export interface SuiTransactionCommandCondition {
|
|
299
|
+
field: 'commandName';
|
|
300
|
+
|
|
301
|
+
field_source: 'sui_transaction_command';
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
305
|
+
* supported for command names.
|
|
306
|
+
*/
|
|
307
|
+
operator: SuiTransactionCommandOperator;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
311
|
+
* 'MergeCoins'
|
|
312
|
+
*/
|
|
313
|
+
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
318
|
+
*/
|
|
319
|
+
export interface SuiTransferObjectsCommandCondition {
|
|
320
|
+
/**
|
|
321
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
322
|
+
* and 'amount' are supported.
|
|
323
|
+
*/
|
|
324
|
+
field: SuiTransferObjectsCommandField;
|
|
325
|
+
|
|
326
|
+
field_source: 'sui_transfer_objects_command';
|
|
327
|
+
|
|
328
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
329
|
+
|
|
330
|
+
value: string | Array<string>;
|
|
331
|
+
}
|
|
332
|
+
|
|
258
333
|
/**
|
|
259
334
|
* A policy for controlling wallet operations.
|
|
260
335
|
*/
|
|
@@ -491,81 +566,6 @@ export namespace Policy {
|
|
|
491
566
|
}
|
|
492
567
|
}
|
|
493
568
|
|
|
494
|
-
/**
|
|
495
|
-
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
496
|
-
* supported for command names.
|
|
497
|
-
*/
|
|
498
|
-
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
502
|
-
* and 'amount' are supported.
|
|
503
|
-
*/
|
|
504
|
-
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
508
|
-
* transaction types.
|
|
509
|
-
*/
|
|
510
|
-
export interface TronTransactionCondition {
|
|
511
|
-
/**
|
|
512
|
-
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
513
|
-
*/
|
|
514
|
-
field:
|
|
515
|
-
| 'TransferContract.to_address'
|
|
516
|
-
| 'TransferContract.amount'
|
|
517
|
-
| 'TriggerSmartContract.contract_address'
|
|
518
|
-
| 'TriggerSmartContract.call_value'
|
|
519
|
-
| 'TriggerSmartContract.token_id'
|
|
520
|
-
| 'TriggerSmartContract.call_token_value';
|
|
521
|
-
|
|
522
|
-
field_source: 'tron_transaction';
|
|
523
|
-
|
|
524
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
525
|
-
|
|
526
|
-
value: string | Array<string>;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
531
|
-
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
532
|
-
* 'in' operators are supported.
|
|
533
|
-
*/
|
|
534
|
-
export interface SuiTransactionCommandCondition {
|
|
535
|
-
field: 'commandName';
|
|
536
|
-
|
|
537
|
-
field_source: 'sui_transaction_command';
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
541
|
-
* supported for command names.
|
|
542
|
-
*/
|
|
543
|
-
operator: SuiTransactionCommandOperator;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
547
|
-
* 'MergeCoins'
|
|
548
|
-
*/
|
|
549
|
-
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
554
|
-
*/
|
|
555
|
-
export interface SuiTransferObjectsCommandCondition {
|
|
556
|
-
/**
|
|
557
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
558
|
-
* and 'amount' are supported.
|
|
559
|
-
*/
|
|
560
|
-
field: SuiTransferObjectsCommandField;
|
|
561
|
-
|
|
562
|
-
field_source: 'sui_transfer_objects_command';
|
|
563
|
-
|
|
564
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
565
|
-
|
|
566
|
-
value: string | Array<string>;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
569
|
/**
|
|
570
570
|
* A rule that defines the conditions and action to take if the conditions are
|
|
571
571
|
* true.
|
|
@@ -1193,8 +1193,7 @@ export interface PolicyCreateParams {
|
|
|
1193
1193
|
owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
|
|
1194
1194
|
|
|
1195
1195
|
/**
|
|
1196
|
-
* Body param
|
|
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
|
|
1659
|
-
* provide this, do not specify an owner.
|
|
1657
|
+
* Body param
|
|
1660
1658
|
*/
|
|
1661
1659
|
owner_id?: string | null;
|
|
1662
1660
|
|
|
@@ -2098,12 +2096,12 @@ export interface PolicyGetRuleParams {
|
|
|
2098
2096
|
|
|
2099
2097
|
export declare namespace Policies {
|
|
2100
2098
|
export {
|
|
2101
|
-
type Policy as Policy,
|
|
2102
2099
|
type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
|
|
2103
2100
|
type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
|
|
2104
2101
|
type TronTransactionCondition as TronTransactionCondition,
|
|
2105
2102
|
type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
|
|
2106
2103
|
type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
|
|
2104
|
+
type Policy as Policy,
|
|
2107
2105
|
type PolicyCreateRuleResponse as PolicyCreateRuleResponse,
|
|
2108
2106
|
type PolicyDeleteResponse as PolicyDeleteResponse,
|
|
2109
2107
|
type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse,
|
package/src/resources/users.ts
CHANGED
|
@@ -318,112 +318,6 @@ export class Users extends APIResource {
|
|
|
318
318
|
|
|
319
319
|
export type UsersCursor = Cursor<User>;
|
|
320
320
|
|
|
321
|
-
/**
|
|
322
|
-
* The authenticated user.
|
|
323
|
-
*/
|
|
324
|
-
export interface AuthenticatedUser {
|
|
325
|
-
token: string | null;
|
|
326
|
-
|
|
327
|
-
privy_access_token: string | null;
|
|
328
|
-
|
|
329
|
-
refresh_token: string | null;
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Instructs the client on how to handle tokens received
|
|
333
|
-
*/
|
|
334
|
-
session_update_action: 'set' | 'ignore' | 'clear';
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* A Privy user object.
|
|
338
|
-
*/
|
|
339
|
-
user: User;
|
|
340
|
-
|
|
341
|
-
identity_token?: string;
|
|
342
|
-
|
|
343
|
-
is_new_user?: boolean;
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* OAuth tokens associated with the user.
|
|
347
|
-
*/
|
|
348
|
-
oauth_tokens?: OAuthTokens;
|
|
349
|
-
}
|
|
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
|
-
/**
|
|
385
|
-
* A Privy user object.
|
|
386
|
-
*/
|
|
387
|
-
export interface User {
|
|
388
|
-
id: string;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Unix timestamp of when the user was created in milliseconds.
|
|
392
|
-
*/
|
|
393
|
-
created_at: number;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Indicates if the user has accepted the terms of service.
|
|
397
|
-
*/
|
|
398
|
-
has_accepted_terms: boolean;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Indicates if the user is a guest account user.
|
|
402
|
-
*/
|
|
403
|
-
is_guest: boolean;
|
|
404
|
-
|
|
405
|
-
linked_accounts: Array<LinkedAccount>;
|
|
406
|
-
|
|
407
|
-
mfa_methods: Array<LinkedMfaMethod>;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Custom metadata associated with the user.
|
|
411
|
-
*/
|
|
412
|
-
custom_metadata?: CustomMetadata;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* The user object along their identity token.
|
|
417
|
-
*/
|
|
418
|
-
export interface UserWithIdentityToken {
|
|
419
|
-
identity_token: string | null;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* A Privy user object.
|
|
423
|
-
*/
|
|
424
|
-
user: User;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
321
|
/**
|
|
428
322
|
* An email account linked to the user.
|
|
429
323
|
*/
|
|
@@ -1213,6 +1107,39 @@ export interface LinkedAccountAuthorizationKey {
|
|
|
1213
1107
|
verified_at: number;
|
|
1214
1108
|
}
|
|
1215
1109
|
|
|
1110
|
+
/**
|
|
1111
|
+
* A linked account for the user.
|
|
1112
|
+
*/
|
|
1113
|
+
export type LinkedAccount =
|
|
1114
|
+
| LinkedAccountEmail
|
|
1115
|
+
| LinkedAccountPhone
|
|
1116
|
+
| LinkedAccountEthereum
|
|
1117
|
+
| LinkedAccountSolana
|
|
1118
|
+
| LinkedAccountSmartWallet
|
|
1119
|
+
| LinkedAccountEthereumEmbeddedWallet
|
|
1120
|
+
| LinkedAccountSolanaEmbeddedWallet
|
|
1121
|
+
| LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
1122
|
+
| LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
1123
|
+
| LinkedAccountCurveSigningEmbeddedWallet
|
|
1124
|
+
| LinkedAccountGoogleOAuth
|
|
1125
|
+
| LinkedAccountTwitterOAuth
|
|
1126
|
+
| LinkedAccountDiscordOAuth
|
|
1127
|
+
| LinkedAccountGitHubOAuth
|
|
1128
|
+
| LinkedAccountSpotifyOAuth
|
|
1129
|
+
| LinkedAccountInstagramOAuth
|
|
1130
|
+
| LinkedAccountTiktokOAuth
|
|
1131
|
+
| LinkedAccountLineOAuth
|
|
1132
|
+
| LinkedAccountTwitchOAuth
|
|
1133
|
+
| LinkedAccountLinkedInOAuth
|
|
1134
|
+
| LinkedAccountAppleOAuth
|
|
1135
|
+
| LinkedAccountCustomOAuth
|
|
1136
|
+
| LinkedAccountCustomJwt
|
|
1137
|
+
| LinkedAccountFarcaster
|
|
1138
|
+
| LinkedAccountPasskey
|
|
1139
|
+
| LinkedAccountTelegram
|
|
1140
|
+
| LinkedAccountCrossApp
|
|
1141
|
+
| LinkedAccountAuthorizationKey;
|
|
1142
|
+
|
|
1216
1143
|
/**
|
|
1217
1144
|
* The possible types of linked accounts.
|
|
1218
1145
|
*/
|
|
@@ -1466,6 +1393,21 @@ export interface LinkedAccountCustomJwtInput {
|
|
|
1466
1393
|
type: 'custom_auth';
|
|
1467
1394
|
}
|
|
1468
1395
|
|
|
1396
|
+
/**
|
|
1397
|
+
* The payload for importing a passkey account.
|
|
1398
|
+
*/
|
|
1399
|
+
export interface LinkedAccountPasskeyInput {
|
|
1400
|
+
credential_device_type: 'singleDevice' | 'multiDevice';
|
|
1401
|
+
|
|
1402
|
+
credential_id: string;
|
|
1403
|
+
|
|
1404
|
+
credential_public_key: string;
|
|
1405
|
+
|
|
1406
|
+
credential_username: string;
|
|
1407
|
+
|
|
1408
|
+
type: 'passkey';
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1469
1411
|
/**
|
|
1470
1412
|
* The input for adding a linked account to a user.
|
|
1471
1413
|
*/
|
|
@@ -1486,7 +1428,8 @@ export type LinkedAccountInput =
|
|
|
1486
1428
|
| LinkedAccountLinkedInInput
|
|
1487
1429
|
| LinkedAccountFarcasterInput
|
|
1488
1430
|
| LinkedAccountTelegramInput
|
|
1489
|
-
| LinkedAccountCustomJwtInput
|
|
1431
|
+
| LinkedAccountCustomJwtInput
|
|
1432
|
+
| LinkedAccountPasskeyInput;
|
|
1490
1433
|
|
|
1491
1434
|
/**
|
|
1492
1435
|
* The payload for batch creating users.
|
|
@@ -1575,6 +1518,37 @@ export interface PasskeyMfaMethod {
|
|
|
1575
1518
|
*/
|
|
1576
1519
|
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
1577
1520
|
|
|
1521
|
+
/**
|
|
1522
|
+
* A Privy user object.
|
|
1523
|
+
*/
|
|
1524
|
+
export interface User {
|
|
1525
|
+
id: string;
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* Unix timestamp of when the user was created in milliseconds.
|
|
1529
|
+
*/
|
|
1530
|
+
created_at: number;
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* Indicates if the user has accepted the terms of service.
|
|
1534
|
+
*/
|
|
1535
|
+
has_accepted_terms: boolean;
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Indicates if the user is a guest account user.
|
|
1539
|
+
*/
|
|
1540
|
+
is_guest: boolean;
|
|
1541
|
+
|
|
1542
|
+
linked_accounts: Array<LinkedAccount>;
|
|
1543
|
+
|
|
1544
|
+
mfa_methods: Array<LinkedMfaMethod>;
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* Custom metadata associated with the user.
|
|
1548
|
+
*/
|
|
1549
|
+
custom_metadata?: CustomMetadata;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1578
1552
|
/**
|
|
1579
1553
|
* OAuth tokens associated with the user.
|
|
1580
1554
|
*/
|
|
@@ -1592,6 +1566,48 @@ export interface OAuthTokens {
|
|
|
1592
1566
|
scopes?: Array<string>;
|
|
1593
1567
|
}
|
|
1594
1568
|
|
|
1569
|
+
/**
|
|
1570
|
+
* The user object along their identity token.
|
|
1571
|
+
*/
|
|
1572
|
+
export interface UserWithIdentityToken {
|
|
1573
|
+
identity_token: string | null;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* A Privy user object.
|
|
1577
|
+
*/
|
|
1578
|
+
user: User;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* The authenticated user.
|
|
1583
|
+
*/
|
|
1584
|
+
export interface AuthenticatedUser {
|
|
1585
|
+
token: string | null;
|
|
1586
|
+
|
|
1587
|
+
privy_access_token: string | null;
|
|
1588
|
+
|
|
1589
|
+
refresh_token: string | null;
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* Instructs the client on how to handle tokens received
|
|
1593
|
+
*/
|
|
1594
|
+
session_update_action: 'set' | 'ignore' | 'clear';
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* A Privy user object.
|
|
1598
|
+
*/
|
|
1599
|
+
user: User;
|
|
1600
|
+
|
|
1601
|
+
identity_token?: string;
|
|
1602
|
+
|
|
1603
|
+
is_new_user?: boolean;
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* OAuth tokens associated with the user.
|
|
1607
|
+
*/
|
|
1608
|
+
oauth_tokens?: OAuthTokens;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1595
1611
|
export interface UserCreateParams {
|
|
1596
1612
|
linked_accounts: Array<LinkedAccountInput>;
|
|
1597
1613
|
|
|
@@ -1761,10 +1777,6 @@ export interface UserUnlinkLinkedAccountParams {
|
|
|
1761
1777
|
|
|
1762
1778
|
export declare namespace Users {
|
|
1763
1779
|
export {
|
|
1764
|
-
type AuthenticatedUser as AuthenticatedUser,
|
|
1765
|
-
type LinkedAccount as LinkedAccount,
|
|
1766
|
-
type User as User,
|
|
1767
|
-
type UserWithIdentityToken as UserWithIdentityToken,
|
|
1768
1780
|
type LinkedAccountEmail as LinkedAccountEmail,
|
|
1769
1781
|
type LinkedAccountPhone as LinkedAccountPhone,
|
|
1770
1782
|
type LinkedAccountBaseWallet as LinkedAccountBaseWallet,
|
|
@@ -1800,6 +1812,7 @@ export declare namespace Users {
|
|
|
1800
1812
|
type CrossAppSmartWallet as CrossAppSmartWallet,
|
|
1801
1813
|
type LinkedAccountCrossApp as LinkedAccountCrossApp,
|
|
1802
1814
|
type LinkedAccountAuthorizationKey as LinkedAccountAuthorizationKey,
|
|
1815
|
+
type LinkedAccount as LinkedAccount,
|
|
1803
1816
|
type LinkedAccountType as LinkedAccountType,
|
|
1804
1817
|
type CustomMetadata as CustomMetadata,
|
|
1805
1818
|
type LinkedAccountWalletInput as LinkedAccountWalletInput,
|
|
@@ -1819,13 +1832,17 @@ export declare namespace Users {
|
|
|
1819
1832
|
type LinkedAccountFarcasterInput as LinkedAccountFarcasterInput,
|
|
1820
1833
|
type LinkedAccountTelegramInput as LinkedAccountTelegramInput,
|
|
1821
1834
|
type LinkedAccountCustomJwtInput as LinkedAccountCustomJwtInput,
|
|
1835
|
+
type LinkedAccountPasskeyInput as LinkedAccountPasskeyInput,
|
|
1822
1836
|
type LinkedAccountInput as LinkedAccountInput,
|
|
1823
1837
|
type UserBatchCreateInput as UserBatchCreateInput,
|
|
1824
1838
|
type SMSMfaMethod as SMSMfaMethod,
|
|
1825
1839
|
type TotpMfaMethod as TotpMfaMethod,
|
|
1826
1840
|
type PasskeyMfaMethod as PasskeyMfaMethod,
|
|
1827
1841
|
type LinkedMfaMethod as LinkedMfaMethod,
|
|
1842
|
+
type User as User,
|
|
1828
1843
|
type OAuthTokens as OAuthTokens,
|
|
1844
|
+
type UserWithIdentityToken as UserWithIdentityToken,
|
|
1845
|
+
type AuthenticatedUser as AuthenticatedUser,
|
|
1829
1846
|
type UsersCursor as UsersCursor,
|
|
1830
1847
|
type UserCreateParams as UserCreateParams,
|
|
1831
1848
|
type UserListParams as UserListParams,
|
|
@@ -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(
|
|
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
|
-
|
|
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'
|