@privy-io/api-types 0.15.0 → 0.17.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 +141 -0
- package/client.d.mts +30 -33
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -33
- package/client.d.ts.map +1 -1
- package/client.js +9 -4
- package/client.js.map +1 -1
- package/client.mjs +9 -4
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +6 -2
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +6 -2
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +14 -4
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +14 -4
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +44 -23
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +44 -23
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +32 -8
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +32 -8
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +6 -0
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +6 -0
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/index.d.mts +15 -16
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +15 -16
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +65 -79
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +65 -79
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +9 -8
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +9 -8
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/kraken-embed.d.mts +208 -218
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +208 -218
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/kraken-embed.js.map +1 -1
- package/resources/kraken-embed.mjs.map +1 -1
- package/resources/onramps.d.mts +50 -48
- package/resources/onramps.d.mts.map +1 -1
- package/resources/onramps.d.ts +50 -48
- package/resources/onramps.d.ts.map +1 -1
- package/resources/policies.d.mts +93 -24
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +93 -24
- package/resources/policies.d.ts.map +1 -1
- package/resources/shared.d.mts +15 -3
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +15 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +3 -2
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +3 -2
- package/resources/swaps.d.ts.map +1 -1
- package/resources/transactions.d.mts +9 -2
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +9 -2
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +33 -7
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +33 -7
- package/resources/users.d.ts.map +1 -1
- package/resources/{wallet-actions.d.ts → wallets/actions.d.mts} +383 -68
- package/resources/wallets/actions.d.mts.map +1 -0
- package/resources/{wallet-actions.d.mts → wallets/actions.d.ts} +383 -68
- package/resources/wallets/actions.d.ts.map +1 -0
- package/resources/wallets/actions.js +9 -0
- package/resources/wallets/actions.js.map +1 -0
- package/resources/wallets/actions.mjs +5 -0
- package/resources/wallets/actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +11 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +11 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/index.d.mts +2 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +2 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js +3 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs +1 -0
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +14 -3
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +14 -3
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +846 -97
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +846 -97
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +19 -2
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +19 -2
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +596 -108
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +596 -108
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/yield.d.mts +30 -30
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +30 -30
- package/resources/yield.d.ts.map +1 -1
- package/resources/yield.js.map +1 -1
- package/resources/yield.mjs.map +1 -1
- package/src/client.ts +223 -76
- package/src/resources/accounts.ts +7 -1
- package/src/resources/aggregations.ts +16 -3
- package/src/resources/apps.ts +60 -30
- package/src/resources/client-auth.ts +41 -7
- package/src/resources/embedded-wallets.ts +7 -0
- package/src/resources/index.ts +107 -36
- package/src/resources/intents.ts +73 -91
- package/src/resources/key-quorums.ts +11 -9
- package/src/resources/kraken-embed.ts +560 -1065
- package/src/resources/onramps.ts +69 -54
- package/src/resources/policies.ts +162 -52
- package/src/resources/shared.ts +18 -2
- package/src/resources/swaps.ts +3 -2
- package/src/resources/transactions.ts +18 -9
- package/src/resources/users.ts +38 -6
- package/src/resources/{wallet-actions.ts → wallets/actions.ts} +496 -78
- package/src/resources/wallets/balance.ts +26 -56
- package/src/resources/wallets/index.ts +93 -0
- package/src/resources/wallets/transactions.ts +17 -10
- package/src/resources/wallets/wallets.ts +1312 -177
- package/src/resources/webhooks.ts +729 -118
- package/src/resources/yield.ts +33 -41
- 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/resources/wallet-actions.d.mts.map +0 -1
- package/resources/wallet-actions.d.ts.map +0 -1
- package/resources/wallet-actions.js +0 -9
- package/resources/wallet-actions.js.map +0 -1
- package/resources/wallet-actions.mjs +0 -5
- package/resources/wallet-actions.mjs.map +0 -1
|
@@ -4,6 +4,19 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
|
|
5
5
|
export class Transactions extends APIResource {}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Status of a blockchain transaction submitted by Privy.
|
|
9
|
+
*/
|
|
10
|
+
export type BlockchainTransactionStatus =
|
|
11
|
+
| 'broadcasted'
|
|
12
|
+
| 'confirmed'
|
|
13
|
+
| 'execution_reverted'
|
|
14
|
+
| 'failed'
|
|
15
|
+
| 'replaced'
|
|
16
|
+
| 'finalized'
|
|
17
|
+
| 'provider_error'
|
|
18
|
+
| 'pending';
|
|
19
|
+
|
|
7
20
|
/**
|
|
8
21
|
* A transaction from a Privy wallet.
|
|
9
22
|
*/
|
|
@@ -14,15 +27,10 @@ export interface Transaction {
|
|
|
14
27
|
|
|
15
28
|
created_at: number;
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| 'failed'
|
|
22
|
-
| 'replaced'
|
|
23
|
-
| 'finalized'
|
|
24
|
-
| 'provider_error'
|
|
25
|
-
| 'pending';
|
|
30
|
+
/**
|
|
31
|
+
* Status of a blockchain transaction submitted by Privy.
|
|
32
|
+
*/
|
|
33
|
+
status: BlockchainTransactionStatus;
|
|
26
34
|
|
|
27
35
|
transaction_hash: string | null;
|
|
28
36
|
|
|
@@ -236,6 +244,7 @@ export interface TransactionScanningValidationSuccessResult {
|
|
|
236
244
|
|
|
237
245
|
export declare namespace Transactions {
|
|
238
246
|
export {
|
|
247
|
+
type BlockchainTransactionStatus as BlockchainTransactionStatus,
|
|
239
248
|
type Transaction as Transaction,
|
|
240
249
|
type TransactionList as TransactionList,
|
|
241
250
|
type TransactionScanningAssetDiff as TransactionScanningAssetDiff,
|
package/src/resources/users.ts
CHANGED
|
@@ -19,9 +19,9 @@ export interface AuthenticatedUser {
|
|
|
19
19
|
refresh_token: string | null;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Instructs the client on how to handle tokens received
|
|
22
|
+
* Instructs the client on how to handle tokens received from a session response.
|
|
23
23
|
*/
|
|
24
|
-
session_update_action:
|
|
24
|
+
session_update_action: ClientSessionUpdateAction;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* A Privy user object.
|
|
@@ -38,6 +38,11 @@ export interface AuthenticatedUser {
|
|
|
38
38
|
oauth_tokens?: OAuthTokens;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Instructs the client on how to handle tokens received from a session response.
|
|
43
|
+
*/
|
|
44
|
+
export type ClientSessionUpdateAction = 'set' | 'ignore' | 'clear';
|
|
45
|
+
|
|
41
46
|
/**
|
|
42
47
|
* An embedded wallet associated with a cross-app account.
|
|
43
48
|
*/
|
|
@@ -150,11 +155,22 @@ export interface LinkedAccountAuthorizationKey {
|
|
|
150
155
|
export interface LinkedAccountBaseWallet {
|
|
151
156
|
address: string;
|
|
152
157
|
|
|
153
|
-
|
|
158
|
+
/**
|
|
159
|
+
* The wallet chain types that offer first class support.
|
|
160
|
+
*/
|
|
161
|
+
chain_type: WalletsAPI.FirstClassChainType;
|
|
154
162
|
|
|
155
|
-
|
|
163
|
+
/**
|
|
164
|
+
* The type of wallet linked account (external wallet or smart wallet).
|
|
165
|
+
*/
|
|
166
|
+
type: LinkedAccountBaseWalletType;
|
|
156
167
|
}
|
|
157
168
|
|
|
169
|
+
/**
|
|
170
|
+
* The type of wallet linked account (external wallet or smart wallet).
|
|
171
|
+
*/
|
|
172
|
+
export type LinkedAccountBaseWalletType = 'wallet' | 'smart_wallet';
|
|
173
|
+
|
|
158
174
|
/**
|
|
159
175
|
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
160
176
|
*/
|
|
@@ -811,11 +827,21 @@ export interface LinkedAccountPasskey {
|
|
|
811
827
|
public_key?: string;
|
|
812
828
|
}
|
|
813
829
|
|
|
830
|
+
/**
|
|
831
|
+
* WebAuthn credential device type indicating platform or cross-platform
|
|
832
|
+
* authenticator residency.
|
|
833
|
+
*/
|
|
834
|
+
export type LinkedAccountPasskeyCredentialDeviceType = 'singleDevice' | 'multiDevice';
|
|
835
|
+
|
|
814
836
|
/**
|
|
815
837
|
* The payload for importing a passkey account.
|
|
816
838
|
*/
|
|
817
839
|
export interface LinkedAccountPasskeyInput {
|
|
818
|
-
|
|
840
|
+
/**
|
|
841
|
+
* WebAuthn credential device type indicating platform or cross-platform
|
|
842
|
+
* authenticator residency.
|
|
843
|
+
*/
|
|
844
|
+
credential_device_type: LinkedAccountPasskeyCredentialDeviceType;
|
|
819
845
|
|
|
820
846
|
credential_id: string;
|
|
821
847
|
|
|
@@ -1138,7 +1164,10 @@ export type LinkedAccountType =
|
|
|
1138
1164
|
export interface LinkedAccountWalletInput {
|
|
1139
1165
|
address: string;
|
|
1140
1166
|
|
|
1141
|
-
|
|
1167
|
+
/**
|
|
1168
|
+
* The wallet chain types that offer first class support.
|
|
1169
|
+
*/
|
|
1170
|
+
chain_type: WalletsAPI.FirstClassChainType;
|
|
1142
1171
|
|
|
1143
1172
|
type: 'wallet';
|
|
1144
1173
|
}
|
|
@@ -1283,6 +1312,7 @@ export interface UserWithIdentityToken {
|
|
|
1283
1312
|
export declare namespace Users {
|
|
1284
1313
|
export {
|
|
1285
1314
|
type AuthenticatedUser as AuthenticatedUser,
|
|
1315
|
+
type ClientSessionUpdateAction as ClientSessionUpdateAction,
|
|
1286
1316
|
type CrossAppEmbeddedWallet as CrossAppEmbeddedWallet,
|
|
1287
1317
|
type CrossAppSmartWallet as CrossAppSmartWallet,
|
|
1288
1318
|
type CustomMetadata as CustomMetadata,
|
|
@@ -1292,6 +1322,7 @@ export declare namespace Users {
|
|
|
1292
1322
|
type LinkedAccountAppleOAuth as LinkedAccountAppleOAuth,
|
|
1293
1323
|
type LinkedAccountAuthorizationKey as LinkedAccountAuthorizationKey,
|
|
1294
1324
|
type LinkedAccountBaseWallet as LinkedAccountBaseWallet,
|
|
1325
|
+
type LinkedAccountBaseWalletType as LinkedAccountBaseWalletType,
|
|
1295
1326
|
type LinkedAccountBitcoinSegwitEmbeddedWallet as LinkedAccountBitcoinSegwitEmbeddedWallet,
|
|
1296
1327
|
type LinkedAccountBitcoinTaprootEmbeddedWallet as LinkedAccountBitcoinTaprootEmbeddedWallet,
|
|
1297
1328
|
type LinkedAccountCrossApp as LinkedAccountCrossApp,
|
|
@@ -1321,6 +1352,7 @@ export declare namespace Users {
|
|
|
1321
1352
|
type LinkedAccountLinkedInInput as LinkedAccountLinkedInInput,
|
|
1322
1353
|
type LinkedAccountLinkedInOAuth as LinkedAccountLinkedInOAuth,
|
|
1323
1354
|
type LinkedAccountPasskey as LinkedAccountPasskey,
|
|
1355
|
+
type LinkedAccountPasskeyCredentialDeviceType as LinkedAccountPasskeyCredentialDeviceType,
|
|
1324
1356
|
type LinkedAccountPasskeyInput as LinkedAccountPasskeyInput,
|
|
1325
1357
|
type LinkedAccountPhone as LinkedAccountPhone,
|
|
1326
1358
|
type LinkedAccountPhoneInput as LinkedAccountPhoneInput,
|