@privy-io/api-types 0.10.0 → 0.12.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 (135) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/client.d.mts +22 -28
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +22 -28
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -12
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -13
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/log.d.mts.map +1 -1
  11. package/internal/utils/log.d.ts.map +1 -1
  12. package/internal/utils/log.js +2 -0
  13. package/internal/utils/log.js.map +1 -1
  14. package/internal/utils/log.mjs +2 -0
  15. package/internal/utils/log.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/apps.d.mts +5 -0
  18. package/resources/apps.d.mts.map +1 -1
  19. package/resources/apps.d.ts +5 -0
  20. package/resources/apps.d.ts.map +1 -1
  21. package/resources/client-auth.d.mts +496 -514
  22. package/resources/client-auth.d.mts.map +1 -1
  23. package/resources/client-auth.d.ts +496 -514
  24. package/resources/client-auth.d.ts.map +1 -1
  25. package/resources/client-auth.js.map +1 -1
  26. package/resources/client-auth.mjs.map +1 -1
  27. package/resources/cross-app.d.mts +5 -0
  28. package/resources/cross-app.d.mts.map +1 -1
  29. package/resources/cross-app.d.ts +5 -0
  30. package/resources/cross-app.d.ts.map +1 -1
  31. package/resources/embedded-wallets.d.mts +10 -10
  32. package/resources/embedded-wallets.d.mts.map +1 -1
  33. package/resources/embedded-wallets.d.ts +10 -10
  34. package/resources/embedded-wallets.d.ts.map +1 -1
  35. package/resources/fiat.d.mts +110 -0
  36. package/resources/fiat.d.mts.map +1 -0
  37. package/resources/fiat.d.ts +110 -0
  38. package/resources/fiat.d.ts.map +1 -0
  39. package/resources/fiat.js +9 -0
  40. package/resources/fiat.js.map +1 -0
  41. package/resources/fiat.mjs +5 -0
  42. package/resources/fiat.mjs.map +1 -0
  43. package/resources/funding.d.mts +46 -46
  44. package/resources/funding.d.mts.map +1 -1
  45. package/resources/funding.d.ts +46 -46
  46. package/resources/funding.d.ts.map +1 -1
  47. package/resources/index.d.mts +11 -10
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +11 -10
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +3 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +2 -1
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/key-quorums.d.mts +1 -132
  56. package/resources/key-quorums.d.mts.map +1 -1
  57. package/resources/key-quorums.d.ts +1 -132
  58. package/resources/key-quorums.d.ts.map +1 -1
  59. package/resources/key-quorums.js +0 -92
  60. package/resources/key-quorums.js.map +1 -1
  61. package/resources/key-quorums.mjs +0 -92
  62. package/resources/key-quorums.mjs.map +1 -1
  63. package/resources/policies.d.mts +2 -312
  64. package/resources/policies.d.mts.map +1 -1
  65. package/resources/policies.d.ts +2 -312
  66. package/resources/policies.d.ts.map +1 -1
  67. package/resources/policies.js +0 -229
  68. package/resources/policies.js.map +1 -1
  69. package/resources/policies.mjs +0 -229
  70. package/resources/policies.mjs.map +1 -1
  71. package/resources/swaps.d.mts +54 -26
  72. package/resources/swaps.d.mts.map +1 -1
  73. package/resources/swaps.d.ts +54 -26
  74. package/resources/swaps.d.ts.map +1 -1
  75. package/resources/transactions.d.mts +28 -44
  76. package/resources/transactions.d.mts.map +1 -1
  77. package/resources/transactions.d.ts +28 -44
  78. package/resources/transactions.d.ts.map +1 -1
  79. package/resources/transactions.js +0 -17
  80. package/resources/transactions.js.map +1 -1
  81. package/resources/transactions.mjs +0 -17
  82. package/resources/transactions.mjs.map +1 -1
  83. package/resources/users.d.mts +1 -345
  84. package/resources/users.d.mts.map +1 -1
  85. package/resources/users.d.ts +1 -345
  86. package/resources/users.d.ts.map +1 -1
  87. package/resources/users.js +0 -272
  88. package/resources/users.js.map +1 -1
  89. package/resources/users.mjs +0 -272
  90. package/resources/users.mjs.map +1 -1
  91. package/resources/wallet-actions.d.mts +22 -3
  92. package/resources/wallet-actions.d.mts.map +1 -1
  93. package/resources/wallet-actions.d.ts +22 -3
  94. package/resources/wallet-actions.d.ts.map +1 -1
  95. package/resources/wallets/index.d.mts +1 -1
  96. package/resources/wallets/index.d.mts.map +1 -1
  97. package/resources/wallets/index.d.ts +1 -1
  98. package/resources/wallets/index.d.ts.map +1 -1
  99. package/resources/wallets/index.js.map +1 -1
  100. package/resources/wallets/index.mjs.map +1 -1
  101. package/resources/wallets/transactions.d.mts +6 -2
  102. package/resources/wallets/transactions.d.mts.map +1 -1
  103. package/resources/wallets/transactions.d.ts +6 -2
  104. package/resources/wallets/transactions.d.ts.map +1 -1
  105. package/resources/wallets/wallets.d.mts +184 -342
  106. package/resources/wallets/wallets.d.mts.map +1 -1
  107. package/resources/wallets/wallets.d.ts +184 -342
  108. package/resources/wallets/wallets.d.ts.map +1 -1
  109. package/resources/wallets/wallets.js +41 -102
  110. package/resources/wallets/wallets.js.map +1 -1
  111. package/resources/wallets/wallets.mjs +41 -102
  112. package/resources/wallets/wallets.mjs.map +1 -1
  113. package/src/client.ts +122 -153
  114. package/src/internal/utils/log.ts +2 -0
  115. package/src/resources/apps.ts +6 -0
  116. package/src/resources/client-auth.ts +743 -787
  117. package/src/resources/cross-app.ts +6 -0
  118. package/src/resources/embedded-wallets.ts +16 -15
  119. package/src/resources/fiat.ts +177 -0
  120. package/src/resources/funding.ts +65 -65
  121. package/src/resources/index.ts +97 -107
  122. package/src/resources/key-quorums.ts +1 -203
  123. package/src/resources/policies.ts +1 -495
  124. package/src/resources/swaps.ts +59 -25
  125. package/src/resources/transactions.ts +35 -55
  126. package/src/resources/users.ts +1 -479
  127. package/src/resources/wallet-actions.ts +38 -2
  128. package/src/resources/wallets/index.ts +4 -9
  129. package/src/resources/wallets/transactions.ts +6 -2
  130. package/src/resources/wallets/wallets.ts +236 -450
  131. package/src/version.ts +1 -1
  132. package/version.d.mts +1 -1
  133. package/version.d.ts +1 -1
  134. package/version.js +1 -1
  135. package/version.mjs +1 -1
@@ -28,6 +28,12 @@ export interface CrossAppConnection {
28
28
  */
29
29
  export interface CrossAppConnectionsResponse {
30
30
  connections: Array<CrossAppConnection>;
31
+
32
+ /**
33
+ * Indicates that this response contains only publicly accessible data, not a
34
+ * privileged resource
35
+ */
36
+ data_classification: 'public';
31
37
  }
32
38
 
33
39
  export declare namespace CrossApp {
@@ -6,18 +6,6 @@ import * as WalletsAPI from './wallets/wallets';
6
6
 
7
7
  export class EmbeddedWallets extends APIResource {}
8
8
 
9
- /**
10
- * The configuration object for smart wallets.
11
- */
12
- export type SmartWalletConfiguration = SmartWalletConfigurationDisabled | SmartWalletConfigurationEnabled;
13
-
14
- /**
15
- * The input configuration object for smart wallets.
16
- */
17
- export type SmartWalletConfigurationInput =
18
- | SmartWalletConfigurationDisabled
19
- | SmartWalletConfigurationInputEnabled;
20
-
21
9
  /**
22
10
  * The Alchemy paymaster context for a smart wallet network configuration.
23
11
  */
@@ -136,6 +124,11 @@ export type RecoveryType =
136
124
  | 'google_drive_recovery_secret'
137
125
  | 'icloud_recovery_secret';
138
126
 
127
+ /**
128
+ * The configuration object for smart wallets.
129
+ */
130
+ export type SmartWalletConfiguration = SmartWalletConfigurationDisabled | SmartWalletConfigurationEnabled;
131
+
139
132
  /**
140
133
  * A disabled smart wallet configuration.
141
134
  */
@@ -159,6 +152,13 @@ export interface SmartWalletConfigurationEnabled {
159
152
  smart_wallet_version?: string;
160
153
  }
161
154
 
155
+ /**
156
+ * The input configuration object for smart wallets.
157
+ */
158
+ export type SmartWalletConfigurationInput =
159
+ | SmartWalletConfigurationDisabled
160
+ | SmartWalletConfigurationInputEnabled;
161
+
162
162
  /**
163
163
  * An enabled smart wallet configuration input.
164
164
  */
@@ -224,7 +224,8 @@ export type SmartWalletType =
224
224
  | 'light_account'
225
225
  | 'biconomy'
226
226
  | 'coinbase_smart_wallet'
227
- | 'thirdweb';
227
+ | 'thirdweb'
228
+ | 'nexus';
228
229
 
229
230
  /**
230
231
  * An additional signer configuration for a wallet.
@@ -273,8 +274,6 @@ export interface WalletCreationInput {
273
274
 
274
275
  export declare namespace EmbeddedWallets {
275
276
  export {
276
- type SmartWalletConfiguration as SmartWalletConfiguration,
277
- type SmartWalletConfigurationInput as SmartWalletConfigurationInput,
278
277
  type AlchemyPaymasterContext as AlchemyPaymasterContext,
279
278
  type EmbeddedWalletCreationInput as EmbeddedWalletCreationInput,
280
279
  type ICloudClientType as ICloudClientType,
@@ -287,8 +286,10 @@ export declare namespace EmbeddedWallets {
287
286
  type RecoveryKeyMaterialInput as RecoveryKeyMaterialInput,
288
287
  type RecoveryKeyMaterialResponse as RecoveryKeyMaterialResponse,
289
288
  type RecoveryType as RecoveryType,
289
+ type SmartWalletConfiguration as SmartWalletConfiguration,
290
290
  type SmartWalletConfigurationDisabled as SmartWalletConfigurationDisabled,
291
291
  type SmartWalletConfigurationEnabled as SmartWalletConfigurationEnabled,
292
+ type SmartWalletConfigurationInput as SmartWalletConfigurationInput,
292
293
  type SmartWalletConfigurationInputEnabled as SmartWalletConfigurationInputEnabled,
293
294
  type SmartWalletNetworkConfiguration as SmartWalletNetworkConfiguration,
294
295
  type SmartWalletNetworkConfigurationInput as SmartWalletNetworkConfigurationInput,
@@ -0,0 +1,177 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+
5
+ export class Fiat extends APIResource {}
6
+
7
+ /**
8
+ * Supported fiat currencies.
9
+ */
10
+ export type FiatCurrency = 'usd' | 'eur';
11
+
12
+ /**
13
+ * Supported fiat payment rails.
14
+ */
15
+ export type FiatPaymentRail = 'sepa' | 'ach_push' | 'wire';
16
+
17
+ /**
18
+ * Deposit instructions for an offramp transfer.
19
+ */
20
+ export interface OfframpDepositInstructions {
21
+ amount: string;
22
+
23
+ /**
24
+ * Supported blockchain chains for onramp and offramp.
25
+ */
26
+ chain: OnrampChain;
27
+
28
+ /**
29
+ * Supported crypto assets for onramp and offramp.
30
+ */
31
+ currency: OnrampAsset;
32
+
33
+ from_address: string;
34
+
35
+ to_address: string;
36
+ }
37
+
38
+ /**
39
+ * Response for an offramp transfer initiation.
40
+ */
41
+ export interface OfframpResponse {
42
+ id: string;
43
+
44
+ /**
45
+ * Deposit instructions for an offramp transfer.
46
+ */
47
+ deposit_instructions: OfframpDepositInstructions;
48
+
49
+ /**
50
+ * Status of an onramp or offramp transfer.
51
+ */
52
+ status: OnrampTransferStatus;
53
+ }
54
+
55
+ /**
56
+ * Supported crypto assets for onramp and offramp.
57
+ */
58
+ export type OnrampAsset = 'usdc';
59
+
60
+ /**
61
+ * Supported blockchain chains for onramp and offramp.
62
+ */
63
+ export type OnrampChain = 'ethereum' | 'base' | 'arbitrum' | 'polygon' | 'optimism';
64
+
65
+ /**
66
+ * Bank deposit instructions for an onramp transfer.
67
+ */
68
+ export interface OnrampDepositInstructions {
69
+ amount: string;
70
+
71
+ /**
72
+ * Supported fiat currencies.
73
+ */
74
+ currency: FiatCurrency;
75
+
76
+ /**
77
+ * Supported fiat payment rails.
78
+ */
79
+ payment_rail: FiatPaymentRail;
80
+
81
+ account_holder_name?: string;
82
+
83
+ bank_account_number?: string;
84
+
85
+ bank_address?: string;
86
+
87
+ bank_beneficiary_address?: string;
88
+
89
+ bank_beneficiary_name?: string;
90
+
91
+ bank_name?: string;
92
+
93
+ bank_routing_number?: string;
94
+
95
+ bic?: string;
96
+
97
+ deposit_message?: string;
98
+
99
+ iban?: string;
100
+ }
101
+
102
+ /**
103
+ * Response for an onramp KYC verification.
104
+ */
105
+ export interface OnrampKYCResponse {
106
+ /**
107
+ * Status of the KYC verification process.
108
+ */
109
+ status: OnrampKYCStatus;
110
+
111
+ user_id: string;
112
+
113
+ provider_user_id?: string;
114
+ }
115
+
116
+ /**
117
+ * Status of the KYC verification process.
118
+ */
119
+ export type OnrampKYCStatus =
120
+ | 'not_found'
121
+ | 'active'
122
+ | 'awaiting_questionnaire'
123
+ | 'awaiting_ubo'
124
+ | 'incomplete'
125
+ | 'not_started'
126
+ | 'offboarded'
127
+ | 'paused'
128
+ | 'rejected'
129
+ | 'under_review';
130
+
131
+ /**
132
+ * Response for an onramp transfer initiation.
133
+ */
134
+ export interface OnrampResponse {
135
+ id: string;
136
+
137
+ /**
138
+ * Bank deposit instructions for an onramp transfer.
139
+ */
140
+ deposit_instructions: OnrampDepositInstructions;
141
+
142
+ /**
143
+ * Status of an onramp or offramp transfer.
144
+ */
145
+ status: OnrampTransferStatus;
146
+ }
147
+
148
+ /**
149
+ * Status of an onramp or offramp transfer.
150
+ */
151
+ export type OnrampTransferStatus =
152
+ | 'awaiting_funds'
153
+ | 'in_review'
154
+ | 'funds_received'
155
+ | 'payment_submitted'
156
+ | 'payment_processed'
157
+ | 'canceled'
158
+ | 'error'
159
+ | 'undeliverable'
160
+ | 'returned'
161
+ | 'refunded';
162
+
163
+ export declare namespace Fiat {
164
+ export {
165
+ type FiatCurrency as FiatCurrency,
166
+ type FiatPaymentRail as FiatPaymentRail,
167
+ type OfframpDepositInstructions as OfframpDepositInstructions,
168
+ type OfframpResponse as OfframpResponse,
169
+ type OnrampAsset as OnrampAsset,
170
+ type OnrampChain as OnrampChain,
171
+ type OnrampDepositInstructions as OnrampDepositInstructions,
172
+ type OnrampKYCResponse as OnrampKYCResponse,
173
+ type OnrampKYCStatus as OnrampKYCStatus,
174
+ type OnrampResponse as OnrampResponse,
175
+ type OnrampTransferStatus as OnrampTransferStatus,
176
+ };
177
+ }
@@ -5,66 +5,6 @@ import * as FundingAPI from './funding';
5
5
 
6
6
  export class Funding extends APIResource {}
7
7
 
8
- /**
9
- * The input for initializing a Coinbase on-ramp session.
10
- */
11
- export type CoinbaseOnRampInitInput = CoinbaseOnRampInitEthereumInput | CoinbaseOnRampInitSolanaInput;
12
-
13
- /**
14
- * The response from initializing a Coinbase on-ramp session.
15
- */
16
- export interface CoinbaseOnRampInitResponse {
17
- app_id: string;
18
-
19
- channel_id: string;
20
-
21
- partner_user_id: string;
22
-
23
- session_token: string;
24
- }
25
-
26
- /**
27
- * The response for getting the status of a Coinbase on-ramp session.
28
- */
29
- export interface CoinbaseOnRampStatusResponse {
30
- /**
31
- * Status of a Coinbase on-ramp session.
32
- */
33
- status: CoinbaseOnRampStatus;
34
- }
35
-
36
- /**
37
- * The input for signing a Moonpay on-ramp.
38
- */
39
- export type MoonpayOnRampSignInput =
40
- | MoonpayOnRampSignInput.MoonpayFiatOnRampEthereumInput
41
- | MoonpayOnRampSignInput.MoonpayFiatOnRampSolanaInput;
42
-
43
- export namespace MoonpayOnRampSignInput {
44
- /**
45
- * Sandbox configuration for a Moonpay on-ramp.
46
- */
47
- export interface MoonpayFiatOnRampEthereumInput
48
- extends FundingAPI.MoonpayOnRampSandboxConfig,
49
- FundingAPI.MoonpayFiatOnRampEthereumInput {}
50
-
51
- /**
52
- * Sandbox configuration for a Moonpay on-ramp.
53
- */
54
- export interface MoonpayFiatOnRampSolanaInput
55
- extends FundingAPI.MoonpayOnRampSandboxConfig,
56
- FundingAPI.MoonpayFiatOnRampSolanaInput {}
57
- }
58
-
59
- /**
60
- * The response from signing a Moonpay on-ramp.
61
- */
62
- export interface MoonpayOnRampSignResponse {
63
- externalTransactionId: string;
64
-
65
- signedUrl: string;
66
- }
67
-
68
8
  /**
69
9
  * A blockchain supported by Coinbase on-ramp.
70
10
  */
@@ -103,6 +43,24 @@ export interface CoinbaseOnRampInitEthereumInput {
103
43
  assets?: Array<CoinbaseEthereumAsset>;
104
44
  }
105
45
 
46
+ /**
47
+ * The input for initializing a Coinbase on-ramp session.
48
+ */
49
+ export type CoinbaseOnRampInitInput = CoinbaseOnRampInitEthereumInput | CoinbaseOnRampInitSolanaInput;
50
+
51
+ /**
52
+ * The response from initializing a Coinbase on-ramp session.
53
+ */
54
+ export interface CoinbaseOnRampInitResponse {
55
+ app_id: string;
56
+
57
+ channel_id: string;
58
+
59
+ partner_user_id: string;
60
+
61
+ session_token: string;
62
+ }
63
+
106
64
  /**
107
65
  * Input for initializing a Coinbase on-ramp session for Solana.
108
66
  */
@@ -126,6 +84,16 @@ export interface CoinbaseOnRampSolanaAddress {
126
84
  */
127
85
  export type CoinbaseOnRampStatus = 'pending' | 'success' | 'failure';
128
86
 
87
+ /**
88
+ * The response for getting the status of a Coinbase on-ramp session.
89
+ */
90
+ export interface CoinbaseOnRampStatusResponse {
91
+ /**
92
+ * Status of a Coinbase on-ramp session.
93
+ */
94
+ status: CoinbaseOnRampStatus;
95
+ }
96
+
129
97
  /**
130
98
  * A Solana asset supported by Coinbase on-ramp.
131
99
  */
@@ -253,6 +221,38 @@ export interface MoonpayOnRampSandboxConfig {
253
221
  useSandbox?: boolean;
254
222
  }
255
223
 
224
+ /**
225
+ * The input for signing a Moonpay on-ramp.
226
+ */
227
+ export type MoonpayOnRampSignInput =
228
+ | MoonpayOnRampSignInput.MoonpayFiatOnRampEthereumInput
229
+ | MoonpayOnRampSignInput.MoonpayFiatOnRampSolanaInput;
230
+
231
+ export namespace MoonpayOnRampSignInput {
232
+ /**
233
+ * Sandbox configuration for a Moonpay on-ramp.
234
+ */
235
+ export interface MoonpayFiatOnRampEthereumInput
236
+ extends FundingAPI.MoonpayOnRampSandboxConfig,
237
+ FundingAPI.MoonpayFiatOnRampEthereumInput {}
238
+
239
+ /**
240
+ * Sandbox configuration for a Moonpay on-ramp.
241
+ */
242
+ export interface MoonpayFiatOnRampSolanaInput
243
+ extends FundingAPI.MoonpayOnRampSandboxConfig,
244
+ FundingAPI.MoonpayFiatOnRampSolanaInput {}
245
+ }
246
+
247
+ /**
248
+ * The response from signing a Moonpay on-ramp.
249
+ */
250
+ export interface MoonpayOnRampSignResponse {
251
+ externalTransactionId: string;
252
+
253
+ signedUrl: string;
254
+ }
255
+
256
256
  /**
257
257
  * A payment method supported by Moonpay on-ramp.
258
258
  */
@@ -291,18 +291,16 @@ export type MoonpayUiTheme = 'light' | 'dark';
291
291
 
292
292
  export declare namespace Funding {
293
293
  export {
294
- type CoinbaseOnRampInitInput as CoinbaseOnRampInitInput,
295
- type CoinbaseOnRampInitResponse as CoinbaseOnRampInitResponse,
296
- type CoinbaseOnRampStatusResponse as CoinbaseOnRampStatusResponse,
297
- type MoonpayOnRampSignInput as MoonpayOnRampSignInput,
298
- type MoonpayOnRampSignResponse as MoonpayOnRampSignResponse,
299
294
  type CoinbaseBlockchain as CoinbaseBlockchain,
300
295
  type CoinbaseEthereumAsset as CoinbaseEthereumAsset,
301
296
  type CoinbaseOnRampEthereumAddress as CoinbaseOnRampEthereumAddress,
302
297
  type CoinbaseOnRampInitEthereumInput as CoinbaseOnRampInitEthereumInput,
298
+ type CoinbaseOnRampInitInput as CoinbaseOnRampInitInput,
299
+ type CoinbaseOnRampInitResponse as CoinbaseOnRampInitResponse,
303
300
  type CoinbaseOnRampInitSolanaInput as CoinbaseOnRampInitSolanaInput,
304
301
  type CoinbaseOnRampSolanaAddress as CoinbaseOnRampSolanaAddress,
305
302
  type CoinbaseOnRampStatus as CoinbaseOnRampStatus,
303
+ type CoinbaseOnRampStatusResponse as CoinbaseOnRampStatusResponse,
306
304
  type CoinbaseSolanaAsset as CoinbaseSolanaAsset,
307
305
  type MoonpayCurrencyCode as MoonpayCurrencyCode,
308
306
  type MoonpayFiatOnRampEthereumConfig as MoonpayFiatOnRampEthereumConfig,
@@ -310,6 +308,8 @@ export declare namespace Funding {
310
308
  type MoonpayFiatOnRampSolanaConfig as MoonpayFiatOnRampSolanaConfig,
311
309
  type MoonpayFiatOnRampSolanaInput as MoonpayFiatOnRampSolanaInput,
312
310
  type MoonpayOnRampSandboxConfig as MoonpayOnRampSandboxConfig,
311
+ type MoonpayOnRampSignInput as MoonpayOnRampSignInput,
312
+ type MoonpayOnRampSignResponse as MoonpayOnRampSignResponse,
313
313
  type MoonpayPaymentMethod as MoonpayPaymentMethod,
314
314
  type MoonpaySolanaCurrencyCode as MoonpaySolanaCurrencyCode,
315
315
  type MoonpayUiConfig as MoonpayUiConfig,