@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.
Files changed (158) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/client.d.mts +30 -33
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +30 -33
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -4
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -4
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/accounts.d.mts +6 -2
  12. package/resources/accounts.d.mts.map +1 -1
  13. package/resources/accounts.d.ts +6 -2
  14. package/resources/accounts.d.ts.map +1 -1
  15. package/resources/aggregations.d.mts +14 -4
  16. package/resources/aggregations.d.mts.map +1 -1
  17. package/resources/aggregations.d.ts +14 -4
  18. package/resources/aggregations.d.ts.map +1 -1
  19. package/resources/apps.d.mts +44 -23
  20. package/resources/apps.d.mts.map +1 -1
  21. package/resources/apps.d.ts +44 -23
  22. package/resources/apps.d.ts.map +1 -1
  23. package/resources/client-auth.d.mts +32 -8
  24. package/resources/client-auth.d.mts.map +1 -1
  25. package/resources/client-auth.d.ts +32 -8
  26. package/resources/client-auth.d.ts.map +1 -1
  27. package/resources/embedded-wallets.d.mts +6 -0
  28. package/resources/embedded-wallets.d.mts.map +1 -1
  29. package/resources/embedded-wallets.d.ts +6 -0
  30. package/resources/embedded-wallets.d.ts.map +1 -1
  31. package/resources/index.d.mts +15 -16
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +15 -16
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +1 -3
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +0 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/intents.d.mts +65 -79
  40. package/resources/intents.d.mts.map +1 -1
  41. package/resources/intents.d.ts +65 -79
  42. package/resources/intents.d.ts.map +1 -1
  43. package/resources/intents.js.map +1 -1
  44. package/resources/intents.mjs.map +1 -1
  45. package/resources/key-quorums.d.mts +9 -8
  46. package/resources/key-quorums.d.mts.map +1 -1
  47. package/resources/key-quorums.d.ts +9 -8
  48. package/resources/key-quorums.d.ts.map +1 -1
  49. package/resources/kraken-embed.d.mts +208 -218
  50. package/resources/kraken-embed.d.mts.map +1 -1
  51. package/resources/kraken-embed.d.ts +208 -218
  52. package/resources/kraken-embed.d.ts.map +1 -1
  53. package/resources/kraken-embed.js.map +1 -1
  54. package/resources/kraken-embed.mjs.map +1 -1
  55. package/resources/onramps.d.mts +50 -48
  56. package/resources/onramps.d.mts.map +1 -1
  57. package/resources/onramps.d.ts +50 -48
  58. package/resources/onramps.d.ts.map +1 -1
  59. package/resources/policies.d.mts +93 -24
  60. package/resources/policies.d.mts.map +1 -1
  61. package/resources/policies.d.ts +93 -24
  62. package/resources/policies.d.ts.map +1 -1
  63. package/resources/shared.d.mts +15 -3
  64. package/resources/shared.d.mts.map +1 -1
  65. package/resources/shared.d.ts +15 -3
  66. package/resources/shared.d.ts.map +1 -1
  67. package/resources/swaps.d.mts +3 -2
  68. package/resources/swaps.d.mts.map +1 -1
  69. package/resources/swaps.d.ts +3 -2
  70. package/resources/swaps.d.ts.map +1 -1
  71. package/resources/transactions.d.mts +9 -2
  72. package/resources/transactions.d.mts.map +1 -1
  73. package/resources/transactions.d.ts +9 -2
  74. package/resources/transactions.d.ts.map +1 -1
  75. package/resources/users.d.mts +33 -7
  76. package/resources/users.d.mts.map +1 -1
  77. package/resources/users.d.ts +33 -7
  78. package/resources/users.d.ts.map +1 -1
  79. package/resources/{wallet-actions.d.ts → wallets/actions.d.mts} +383 -68
  80. package/resources/wallets/actions.d.mts.map +1 -0
  81. package/resources/{wallet-actions.d.mts → wallets/actions.d.ts} +383 -68
  82. package/resources/wallets/actions.d.ts.map +1 -0
  83. package/resources/wallets/actions.js +9 -0
  84. package/resources/wallets/actions.js.map +1 -0
  85. package/resources/wallets/actions.mjs +5 -0
  86. package/resources/wallets/actions.mjs.map +1 -0
  87. package/resources/wallets/balance.d.mts +11 -4
  88. package/resources/wallets/balance.d.mts.map +1 -1
  89. package/resources/wallets/balance.d.ts +11 -4
  90. package/resources/wallets/balance.d.ts.map +1 -1
  91. package/resources/wallets/index.d.mts +2 -1
  92. package/resources/wallets/index.d.mts.map +1 -1
  93. package/resources/wallets/index.d.ts +2 -1
  94. package/resources/wallets/index.d.ts.map +1 -1
  95. package/resources/wallets/index.js +3 -1
  96. package/resources/wallets/index.js.map +1 -1
  97. package/resources/wallets/index.mjs +1 -0
  98. package/resources/wallets/index.mjs.map +1 -1
  99. package/resources/wallets/transactions.d.mts +14 -3
  100. package/resources/wallets/transactions.d.mts.map +1 -1
  101. package/resources/wallets/transactions.d.ts +14 -3
  102. package/resources/wallets/transactions.d.ts.map +1 -1
  103. package/resources/wallets/transactions.js.map +1 -1
  104. package/resources/wallets/transactions.mjs.map +1 -1
  105. package/resources/wallets/wallets.d.mts +846 -97
  106. package/resources/wallets/wallets.d.mts.map +1 -1
  107. package/resources/wallets/wallets.d.ts +846 -97
  108. package/resources/wallets/wallets.d.ts.map +1 -1
  109. package/resources/wallets/wallets.js +19 -2
  110. package/resources/wallets/wallets.js.map +1 -1
  111. package/resources/wallets/wallets.mjs +19 -2
  112. package/resources/wallets/wallets.mjs.map +1 -1
  113. package/resources/webhooks.d.mts +596 -108
  114. package/resources/webhooks.d.mts.map +1 -1
  115. package/resources/webhooks.d.ts +596 -108
  116. package/resources/webhooks.d.ts.map +1 -1
  117. package/resources/webhooks.js.map +1 -1
  118. package/resources/webhooks.mjs.map +1 -1
  119. package/resources/yield.d.mts +30 -30
  120. package/resources/yield.d.mts.map +1 -1
  121. package/resources/yield.d.ts +30 -30
  122. package/resources/yield.d.ts.map +1 -1
  123. package/resources/yield.js.map +1 -1
  124. package/resources/yield.mjs.map +1 -1
  125. package/src/client.ts +223 -76
  126. package/src/resources/accounts.ts +7 -1
  127. package/src/resources/aggregations.ts +16 -3
  128. package/src/resources/apps.ts +60 -30
  129. package/src/resources/client-auth.ts +41 -7
  130. package/src/resources/embedded-wallets.ts +7 -0
  131. package/src/resources/index.ts +107 -36
  132. package/src/resources/intents.ts +73 -91
  133. package/src/resources/key-quorums.ts +11 -9
  134. package/src/resources/kraken-embed.ts +560 -1065
  135. package/src/resources/onramps.ts +69 -54
  136. package/src/resources/policies.ts +162 -52
  137. package/src/resources/shared.ts +18 -2
  138. package/src/resources/swaps.ts +3 -2
  139. package/src/resources/transactions.ts +18 -9
  140. package/src/resources/users.ts +38 -6
  141. package/src/resources/{wallet-actions.ts → wallets/actions.ts} +496 -78
  142. package/src/resources/wallets/balance.ts +26 -56
  143. package/src/resources/wallets/index.ts +93 -0
  144. package/src/resources/wallets/transactions.ts +17 -10
  145. package/src/resources/wallets/wallets.ts +1312 -177
  146. package/src/resources/webhooks.ts +729 -118
  147. package/src/resources/yield.ts +33 -41
  148. package/src/version.ts +1 -1
  149. package/version.d.mts +1 -1
  150. package/version.d.ts +1 -1
  151. package/version.js +1 -1
  152. package/version.mjs +1 -1
  153. package/resources/wallet-actions.d.mts.map +0 -1
  154. package/resources/wallet-actions.d.ts.map +0 -1
  155. package/resources/wallet-actions.js +0 -9
  156. package/resources/wallet-actions.js.map +0 -1
  157. package/resources/wallet-actions.mjs +0 -5
  158. 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
- status:
18
- | 'broadcasted'
19
- | 'confirmed'
20
- | 'execution_reverted'
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,
@@ -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: 'set' | 'ignore' | 'clear';
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
- chain_type: 'solana' | 'ethereum';
158
+ /**
159
+ * The wallet chain types that offer first class support.
160
+ */
161
+ chain_type: WalletsAPI.FirstClassChainType;
154
162
 
155
- type: 'wallet' | 'smart_wallet';
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
- credential_device_type: 'singleDevice' | 'multiDevice';
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
- chain_type: 'ethereum' | 'solana';
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,