@privy-io/api-types 0.10.0 → 0.11.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 (103) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +18 -24
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +18 -24
  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 +6 -12
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/client-auth.d.mts +496 -514
  12. package/resources/client-auth.d.mts.map +1 -1
  13. package/resources/client-auth.d.ts +496 -514
  14. package/resources/client-auth.d.ts.map +1 -1
  15. package/resources/client-auth.js.map +1 -1
  16. package/resources/client-auth.mjs.map +1 -1
  17. package/resources/embedded-wallets.d.mts +9 -9
  18. package/resources/embedded-wallets.d.mts.map +1 -1
  19. package/resources/embedded-wallets.d.ts +9 -9
  20. package/resources/embedded-wallets.d.ts.map +1 -1
  21. package/resources/fiat.d.mts +110 -0
  22. package/resources/fiat.d.mts.map +1 -0
  23. package/resources/fiat.d.ts +110 -0
  24. package/resources/fiat.d.ts.map +1 -0
  25. package/resources/fiat.js +9 -0
  26. package/resources/fiat.js.map +1 -0
  27. package/resources/fiat.mjs +5 -0
  28. package/resources/fiat.mjs.map +1 -0
  29. package/resources/funding.d.mts +46 -46
  30. package/resources/funding.d.mts.map +1 -1
  31. package/resources/funding.d.ts +46 -46
  32. package/resources/funding.d.ts.map +1 -1
  33. package/resources/index.d.mts +9 -8
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +9 -8
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js +3 -1
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs +1 -0
  40. package/resources/index.mjs.map +1 -1
  41. package/resources/key-quorums.d.mts +1 -132
  42. package/resources/key-quorums.d.mts.map +1 -1
  43. package/resources/key-quorums.d.ts +1 -132
  44. package/resources/key-quorums.d.ts.map +1 -1
  45. package/resources/key-quorums.js +0 -92
  46. package/resources/key-quorums.js.map +1 -1
  47. package/resources/key-quorums.mjs +0 -92
  48. package/resources/key-quorums.mjs.map +1 -1
  49. package/resources/policies.d.mts +1 -311
  50. package/resources/policies.d.mts.map +1 -1
  51. package/resources/policies.d.ts +1 -311
  52. package/resources/policies.d.ts.map +1 -1
  53. package/resources/policies.js +0 -229
  54. package/resources/policies.js.map +1 -1
  55. package/resources/policies.mjs +0 -229
  56. package/resources/policies.mjs.map +1 -1
  57. package/resources/transactions.d.mts +28 -44
  58. package/resources/transactions.d.mts.map +1 -1
  59. package/resources/transactions.d.ts +28 -44
  60. package/resources/transactions.d.ts.map +1 -1
  61. package/resources/transactions.js +0 -17
  62. package/resources/transactions.js.map +1 -1
  63. package/resources/transactions.mjs +0 -17
  64. package/resources/transactions.mjs.map +1 -1
  65. package/resources/users.d.mts +1 -345
  66. package/resources/users.d.mts.map +1 -1
  67. package/resources/users.d.ts +1 -345
  68. package/resources/users.d.ts.map +1 -1
  69. package/resources/users.js +0 -272
  70. package/resources/users.js.map +1 -1
  71. package/resources/users.mjs +0 -272
  72. package/resources/users.mjs.map +1 -1
  73. package/resources/wallets/index.d.mts +1 -1
  74. package/resources/wallets/index.d.mts.map +1 -1
  75. package/resources/wallets/index.d.ts +1 -1
  76. package/resources/wallets/index.d.ts.map +1 -1
  77. package/resources/wallets/index.js.map +1 -1
  78. package/resources/wallets/index.mjs.map +1 -1
  79. package/resources/wallets/wallets.d.mts +130 -315
  80. package/resources/wallets/wallets.d.mts.map +1 -1
  81. package/resources/wallets/wallets.d.ts +130 -315
  82. package/resources/wallets/wallets.d.ts.map +1 -1
  83. package/resources/wallets/wallets.js +41 -102
  84. package/resources/wallets/wallets.js.map +1 -1
  85. package/resources/wallets/wallets.mjs +41 -102
  86. package/resources/wallets/wallets.mjs.map +1 -1
  87. package/src/client.ts +106 -152
  88. package/src/resources/client-auth.ts +743 -787
  89. package/src/resources/embedded-wallets.ts +14 -14
  90. package/src/resources/fiat.ts +177 -0
  91. package/src/resources/funding.ts +65 -65
  92. package/src/resources/index.ts +86 -106
  93. package/src/resources/key-quorums.ts +1 -203
  94. package/src/resources/policies.ts +1 -493
  95. package/src/resources/transactions.ts +35 -55
  96. package/src/resources/users.ts +1 -479
  97. package/src/resources/wallets/index.ts +4 -9
  98. package/src/resources/wallets/wallets.ts +182 -423
  99. package/src/version.ts +1 -1
  100. package/version.d.mts +1 -1
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/version.mjs +1 -1
@@ -67,65 +67,6 @@ export {
67
67
  } from './apps';
68
68
  export {
69
69
  ClientAuth,
70
- type CustomJwtAuthenticateRequestBody,
71
- type CustomJwtLinkRequestBody,
72
- type FarcasterAuthenticateRequestBody,
73
- type FarcasterConnectInitResponseBody,
74
- type FarcasterConnectStatusCompletedResponseBody,
75
- type FarcasterConnectStatusPendingResponseBody,
76
- type FarcasterInitRequestBody,
77
- type FarcasterLinkRequestBody,
78
- type FarcasterSignerInitRequestBody,
79
- type FarcasterSignerInitResponseBody,
80
- type FarcasterSignerStatusResponseBody,
81
- type FarcasterUnlinkRequestBody,
82
- type FarcasterV2AuthenticateRequestBody,
83
- type FarcasterV2InitResponseBody,
84
- type GuestAuthenticateRequestBody,
85
- type MfaPasskeyEnrollmentRequestBody,
86
- type MfaPasskeyInitRequestBody,
87
- type MfaPasskeyInitResponseBody,
88
- type MfaPasskeyVerifyRequestBody,
89
- type MfaSMSEnrollRequestBody,
90
- type MfaSMSInitRequestBody,
91
- type MfaSMSVerifyRequestBody,
92
- type MfaTotpInitResponseBody,
93
- type MfaTotpInput,
94
- type MfaVerifyResponseBody,
95
- type OAuthAuthenticateRequestBody,
96
- type OAuthAuthorizationCodeRequestBody,
97
- type OAuthInitRequestBody,
98
- type OAuthInitResponseBody,
99
- type OAuthLinkRequestBody,
100
- type OAuthLinkResponseBody,
101
- type OAuthUnlinkRequestBody,
102
- type OAuthVerifyRequestBody,
103
- type OAuthVerifyResponseBody,
104
- type OptionalRefreshTokenInput,
105
- type PasswordlessAuthenticateRequestBody,
106
- type PasswordlessInitRequestBody,
107
- type PasswordlessLinkRequestBody,
108
- type PasswordlessSMSAuthenticateRequestBody,
109
- type PasswordlessSMSInitRequestBody,
110
- type PasswordlessSMSLinkRequestBody,
111
- type PasswordlessSMSUnlinkRequestBody,
112
- type PasswordlessSMSUpdateRequestBody,
113
- type PasswordlessUnlinkRequestBody,
114
- type PasswordlessUpdateRequestBody,
115
- type SiweAuthenticateRequestBody,
116
- type SiweInitRequestBody,
117
- type SiweInitResponseBody,
118
- type SiweLinkRequestBody,
119
- type SiweLinkSmartWalletRequestBody,
120
- type SiweUnlinkRequestBody,
121
- type SiwsAuthenticateRequestBody,
122
- type SiwsInitRequestBody,
123
- type SiwsInitResponseBody,
124
- type SiwsLinkRequestBody,
125
- type SiwsUnlinkRequestBody,
126
- type TelegramAuthenticateRequestBody,
127
- type TelegramLinkRequestBody,
128
- type TelegramUnlinkRequestBody,
129
70
  type AuthenticateJwtInput,
130
71
  type AuthenticateMode,
131
72
  type AuthenticateModeOption,
@@ -152,23 +93,37 @@ export {
152
93
  type Caip2ChainID,
153
94
  type CreateOrUpdateFiatCustomerRequestInput,
154
95
  type CryptoCurrencyCode,
96
+ type CustomJwtAuthenticateRequestBody,
97
+ type CustomJwtLinkRequestBody,
155
98
  type CustomOAuthProviderID,
156
99
  type ExternalOAuthProviderID,
157
100
  type FarcasterAuthenticateInput,
101
+ type FarcasterAuthenticateRequestBody,
158
102
  type FarcasterConnectInitResponse,
103
+ type FarcasterConnectInitResponseBody,
159
104
  type FarcasterConnectStatusCompletedResponse,
105
+ type FarcasterConnectStatusCompletedResponseBody,
160
106
  type FarcasterConnectStatusPendingResponse,
107
+ type FarcasterConnectStatusPendingResponseBody,
161
108
  type FarcasterInitInput,
109
+ type FarcasterInitRequestBody,
162
110
  type FarcasterLinkInput,
111
+ type FarcasterLinkRequestBody,
163
112
  type FarcasterSignerApproved,
164
113
  type FarcasterSignerInitPendingApproval,
114
+ type FarcasterSignerInitRequestBody,
115
+ type FarcasterSignerInitResponseBody,
165
116
  type FarcasterSignerRevoked,
166
117
  type FarcasterSignerStatusPendingApproval,
118
+ type FarcasterSignerStatusResponseBody,
167
119
  type FarcasterUnlinkInput,
120
+ type FarcasterUnlinkRequestBody,
168
121
  type FarcasterV2AuthenticateInput,
122
+ type FarcasterV2AuthenticateRequestBody,
169
123
  type FarcasterV2InitInput,
170
124
  type FarcasterV2InitRequestBody,
171
125
  type FarcasterV2InitResponse,
126
+ type FarcasterV2InitResponseBody,
172
127
  type FiatAmount,
173
128
  type FiatCurrencyCode,
174
129
  type FiatCustomerResponse,
@@ -188,15 +143,36 @@ export {
188
143
  type GetFiatOnrampTransactionStatusResponse,
189
144
  type GetFiatOnrampURLInput,
190
145
  type GetFiatOnrampURLResponse,
146
+ type GuestAuthenticateRequestBody,
191
147
  type LinkJwtInput,
148
+ type MfaPasskeyEnrollmentRequestBody,
149
+ type MfaPasskeyInitRequestBody,
150
+ type MfaPasskeyInitResponseBody,
151
+ type MfaPasskeyVerifyRequestBody,
152
+ type MfaSMSEnrollRequestBody,
192
153
  type MfaSMSInitEnrollInput,
154
+ type MfaSMSInitRequestBody,
193
155
  type MfaSMSInitVerifyInput,
156
+ type MfaSMSVerifyRequestBody,
157
+ type MfaTotpInitResponseBody,
158
+ type MfaTotpInput,
159
+ type MfaVerifyResponseBody,
160
+ type OAuthAuthenticateRequestBody,
161
+ type OAuthAuthorizationCodeRequestBody,
194
162
  type OAuthCodeType,
163
+ type OAuthInitRequestBody,
164
+ type OAuthInitResponseBody,
165
+ type OAuthLinkRequestBody,
166
+ type OAuthLinkResponseBody,
195
167
  type OAuthProviderID,
196
168
  type OAuthTransferRequestBody,
197
169
  type OAuthTransferUserInfo,
198
170
  type OAuthTransferUserInfoMeta,
171
+ type OAuthUnlinkRequestBody,
172
+ type OAuthVerifyRequestBody,
173
+ type OAuthVerifyResponseBody,
199
174
  type OnrampProvider,
175
+ type OptionalRefreshTokenInput,
200
176
  type PasskeyAssertionResponse,
201
177
  type PasskeyAttestationResponse,
202
178
  type PasskeyAuthenticateInput,
@@ -216,24 +192,48 @@ export {
216
192
  type PasskeyRelyingParty,
217
193
  type PasskeyUser,
218
194
  type PasskeyVerifyExtensions,
195
+ type PasswordlessAuthenticateRequestBody,
196
+ type PasswordlessInitRequestBody,
197
+ type PasswordlessLinkRequestBody,
198
+ type PasswordlessSMSAuthenticateRequestBody,
199
+ type PasswordlessSMSInitRequestBody,
200
+ type PasswordlessSMSLinkRequestBody,
219
201
  type PasswordlessSMSTransferRequestBody,
202
+ type PasswordlessSMSUnlinkRequestBody,
203
+ type PasswordlessSMSUpdateRequestBody,
220
204
  type PasswordlessTransferRequestBody,
205
+ type PasswordlessUnlinkRequestBody,
206
+ type PasswordlessUpdateRequestBody,
221
207
  type PrivyOAuthProviderID,
222
208
  type ResponsePasskeyInitAuthenticate,
223
209
  type ResponsePasskeyInitLink,
224
210
  type ResponsePasskeyInitRegister,
225
211
  type SiweAddressInput,
212
+ type SiweAuthenticateRequestBody,
226
213
  type SiweInitInput,
214
+ type SiweInitRequestBody,
215
+ type SiweInitResponseBody,
227
216
  type SiweInput,
217
+ type SiweLinkRequestBody,
218
+ type SiweLinkSmartWalletRequestBody,
228
219
  type SiweNonce,
220
+ type SiweUnlinkRequestBody,
229
221
  type SiwsAddressInput,
222
+ type SiwsAuthenticateRequestBody,
230
223
  type SiwsInitInput,
224
+ type SiwsInitRequestBody,
225
+ type SiwsInitResponseBody,
231
226
  type SiwsInput,
227
+ type SiwsLinkRequestBody,
232
228
  type SiwsNonce,
229
+ type SiwsUnlinkRequestBody,
233
230
  type SmartWalletSiweInput,
234
231
  type TelegramAuthResult,
235
232
  type TelegramAuthenticateInput,
233
+ type TelegramAuthenticateRequestBody,
234
+ type TelegramLinkRequestBody,
236
235
  type TelegramUnlinkInput,
236
+ type TelegramUnlinkRequestBody,
237
237
  type TelegramWebAppData,
238
238
  type TransferFarcasterInput,
239
239
  type TransferSiweInput,
@@ -244,8 +244,6 @@ export {
244
244
  export { CrossApp, type CrossAppConnection, type CrossAppConnectionsResponse } from './cross-app';
245
245
  export {
246
246
  EmbeddedWallets,
247
- type SmartWalletConfiguration,
248
- type SmartWalletConfigurationInput,
249
247
  type AlchemyPaymasterContext,
250
248
  type EmbeddedWalletCreationInput,
251
249
  type ICloudClientType,
@@ -258,8 +256,10 @@ export {
258
256
  type RecoveryKeyMaterialInput,
259
257
  type RecoveryKeyMaterialResponse,
260
258
  type RecoveryType,
259
+ type SmartWalletConfiguration,
261
260
  type SmartWalletConfigurationDisabled,
262
261
  type SmartWalletConfigurationEnabled,
262
+ type SmartWalletConfigurationInput,
263
263
  type SmartWalletConfigurationInputEnabled,
264
264
  type SmartWalletNetworkConfiguration,
265
265
  type SmartWalletNetworkConfigurationInput,
@@ -267,20 +267,32 @@ export {
267
267
  type WalletCreationAdditionalSignerItem,
268
268
  type WalletCreationInput,
269
269
  } from './embedded-wallets';
270
+ export {
271
+ Fiat,
272
+ type FiatCurrency,
273
+ type FiatPaymentRail,
274
+ type OfframpDepositInstructions,
275
+ type OfframpResponse,
276
+ type OnrampAsset,
277
+ type OnrampChain,
278
+ type OnrampDepositInstructions,
279
+ type OnrampKYCResponse,
280
+ type OnrampKYCStatus,
281
+ type OnrampResponse,
282
+ type OnrampTransferStatus,
283
+ } from './fiat';
270
284
  export {
271
285
  Funding,
272
- type CoinbaseOnRampInitInput,
273
- type CoinbaseOnRampInitResponse,
274
- type CoinbaseOnRampStatusResponse,
275
- type MoonpayOnRampSignInput,
276
- type MoonpayOnRampSignResponse,
277
286
  type CoinbaseBlockchain,
278
287
  type CoinbaseEthereumAsset,
279
288
  type CoinbaseOnRampEthereumAddress,
280
289
  type CoinbaseOnRampInitEthereumInput,
290
+ type CoinbaseOnRampInitInput,
291
+ type CoinbaseOnRampInitResponse,
281
292
  type CoinbaseOnRampInitSolanaInput,
282
293
  type CoinbaseOnRampSolanaAddress,
283
294
  type CoinbaseOnRampStatus,
295
+ type CoinbaseOnRampStatusResponse,
284
296
  type CoinbaseSolanaAsset,
285
297
  type MoonpayCurrencyCode,
286
298
  type MoonpayFiatOnRampEthereumConfig,
@@ -288,6 +300,8 @@ export {
288
300
  type MoonpayFiatOnRampSolanaConfig,
289
301
  type MoonpayFiatOnRampSolanaInput,
290
302
  type MoonpayOnRampSandboxConfig,
303
+ type MoonpayOnRampSignInput,
304
+ type MoonpayOnRampSignResponse,
291
305
  type MoonpayPaymentMethod,
292
306
  type MoonpaySolanaCurrencyCode,
293
307
  type MoonpayUiConfig,
@@ -324,9 +338,6 @@ export {
324
338
  type KeyQuorumAuthorizationHeaders,
325
339
  type KeyQuorumCreateRequestBody,
326
340
  type KeyQuorumUpdateRequestBody,
327
- type KeyQuorumCreateParams,
328
- type KeyQuorumDeleteParams,
329
- type KeyQuorumUpdateParams,
330
341
  } from './key-quorums';
331
342
  export {
332
343
  KrakenEmbed,
@@ -389,13 +400,6 @@ export {
389
400
  type TronCalldataCondition,
390
401
  type TronTransactionCondition,
391
402
  type UpdateConditionSetRequestBody,
392
- type PolicyCreateParams,
393
- type PolicyCreateRuleParams,
394
- type PolicyDeleteParams,
395
- type PolicyDeleteRuleParams,
396
- type PolicyUpdateParams,
397
- type PolicyUpdateRuleParams,
398
- type PolicyGetRuleParams,
399
403
  } from './policies';
400
404
  export {
401
405
  Shared,
@@ -411,8 +415,6 @@ export {
411
415
  export { Swaps, type SwapQuoteRequestBody, type SwapQuoteResponse, type SwapRequestBody } from './swaps';
412
416
  export {
413
417
  Transactions,
414
- type TransactionScanningRequestBody,
415
- type TransactionScanningResponseBody,
416
418
  type Transaction,
417
419
  type TransactionList,
418
420
  type TransactionScanningAssetDiff,
@@ -422,6 +424,8 @@ export {
422
424
  type TransactionScanningExposure,
423
425
  type TransactionScanningMetadata,
424
426
  type TransactionScanningParams,
427
+ type TransactionScanningRequestBody,
428
+ type TransactionScanningResponseBody,
425
429
  type TransactionScanningRpcRequest,
426
430
  type TransactionScanningSimulationErrorResult,
427
431
  type TransactionScanningSimulationResult,
@@ -498,25 +502,6 @@ export {
498
502
  type User,
499
503
  type UserBatchCreateInput,
500
504
  type UserWithIdentityToken,
501
- type UserCreateParams,
502
- type UserListParams,
503
- type UserGetByCustomAuthIDParams,
504
- type UserGetByDiscordUsernameParams,
505
- type UserGetByEmailAddressParams,
506
- type UserGetByFarcasterIDParams,
507
- type UserGetByGitHubUsernameParams,
508
- type UserGetByPhoneNumberParams,
509
- type UserGetBySmartWalletAddressParams,
510
- type UserGetByTelegramUserIDParams,
511
- type UserGetByTelegramUsernameParams,
512
- type UserGetByTwitterSubjectParams,
513
- type UserGetByTwitterUsernameParams,
514
- type UserGetByWalletAddressParams,
515
- type UserPregenerateWalletsParams,
516
- type UserSearchParams,
517
- type UserSetCustomMetadataParams,
518
- type UserUnlinkLinkedAccountParams,
519
- type UsersCursor,
520
505
  } from './users';
521
506
  export {
522
507
  WalletActions,
@@ -548,7 +533,6 @@ export {
548
533
  } from './wallet-actions';
549
534
  export {
550
535
  Wallets,
551
- type WalletRevokeResponse,
552
536
  type AdditionalSignerInput,
553
537
  type AdditionalSignerItemInput,
554
538
  type Address,
@@ -720,12 +704,14 @@ export {
720
704
  type WalletAPIRevokeAuthorizationKeyInput,
721
705
  type WalletAsset,
722
706
  type WalletAuthenticateRequestBody,
707
+ type WalletAuthenticateWithJwtResponse,
723
708
  type WalletAuthorizationHeaders,
724
709
  type WalletBatchCreateInput,
725
710
  type WalletBatchCreateResponse,
726
711
  type WalletBatchCreateResult,
727
712
  type WalletBatchItemInput,
728
713
  type WalletChainType,
714
+ type WalletCreateWalletsWithRecoveryResponse,
729
715
  type WalletCustodian,
730
716
  type WalletEntropyType,
731
717
  type WalletEthereumAsset,
@@ -734,23 +720,17 @@ export {
734
720
  type WalletImportInitResponse,
735
721
  type WalletImportSupportedChains,
736
722
  type WalletImportSupportedEntropyTypes,
723
+ type WalletRevokeResponse,
737
724
  type WalletRpcRequestBody,
738
725
  type WalletRpcResponse,
739
726
  type WalletSolanaAsset,
740
727
  type WalletUpdateRequestBody,
741
- type WalletInitImportResponse,
742
- type WalletAuthenticateWithJwtResponse,
743
- type WalletCreateWalletsWithRecoveryResponse,
744
728
  type WalletCreateParams,
729
+ type WalletUpdateParams,
745
730
  type WalletListParams,
746
731
  type WalletExportParams,
747
- type WalletInitImportParams,
748
732
  type WalletRawSignParams,
749
733
  type WalletRpcParams,
750
- type WalletSubmitImportParams,
751
- type WalletUpdateParams,
752
- type WalletAuthenticateWithJwtParams,
753
- type WalletCreateWalletsWithRecoveryParams,
754
734
  type WalletsCursor,
755
735
  } from './wallets/wallets';
756
736
  export {
@@ -1,122 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as SharedAPI from './shared';
5
- import { APIPromise } from '../core/api-promise';
6
- import { buildHeaders } from '../internal/headers';
7
- import { RequestOptions } from '../internal/request-options';
8
- import { path } from '../internal/utils/path';
9
4
 
10
- /**
11
- * Operations related to key quorums
12
- */
13
- export class KeyQuorums extends APIResource {
14
- /**
15
- * Create a new key quorum.
16
- *
17
- * @example
18
- * ```ts
19
- * const keyQuorum = await client.keyQuorums.create({
20
- * authorization_threshold: 1,
21
- * display_name: 'Prod key quorum',
22
- * public_keys: [
23
- * 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
24
- * 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
25
- * ],
26
- * });
27
- * ```
28
- */
29
- create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum> {
30
- return this._client.post('/v1/key_quorums', { body, ...options });
31
- }
32
-
33
- /**
34
- * Delete a key quorum by key quorum ID.
35
- *
36
- * @example
37
- * ```ts
38
- * const successResponse = await client.keyQuorums._delete(
39
- * 'string',
40
- * );
41
- * ```
42
- */
43
- _delete(
44
- keyQuorumID: SharedAPI.KeyQuorumID,
45
- params: KeyQuorumDeleteParams | null | undefined = {},
46
- options?: RequestOptions,
47
- ): APIPromise<SharedAPI.SuccessResponse> {
48
- const {
49
- 'privy-authorization-signature': privyAuthorizationSignature,
50
- 'privy-request-expiry': privyRequestExpiry,
51
- } = params ?? {};
52
- return this._client.delete(path`/v1/key_quorums/${keyQuorumID}`, {
53
- ...options,
54
- headers: buildHeaders([
55
- {
56
- ...(privyAuthorizationSignature != null ?
57
- { 'privy-authorization-signature': privyAuthorizationSignature }
58
- : undefined),
59
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
60
- },
61
- options?.headers,
62
- ]),
63
- });
64
- }
65
-
66
- /**
67
- * Update a key quorum by key quorum ID.
68
- *
69
- * @example
70
- * ```ts
71
- * const keyQuorum = await client.keyQuorums._update(
72
- * 'string',
73
- * {
74
- * authorization_threshold: 1,
75
- * display_name: 'Prod key quorum',
76
- * public_keys: [
77
- * 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
78
- * ],
79
- * },
80
- * );
81
- * ```
82
- */
83
- _update(
84
- keyQuorumID: SharedAPI.KeyQuorumID,
85
- params: KeyQuorumUpdateParams,
86
- options?: RequestOptions,
87
- ): APIPromise<KeyQuorum> {
88
- const {
89
- 'privy-authorization-signature': privyAuthorizationSignature,
90
- 'privy-request-expiry': privyRequestExpiry,
91
- ...body
92
- } = params;
93
- return this._client.patch(path`/v1/key_quorums/${keyQuorumID}`, {
94
- body,
95
- ...options,
96
- headers: buildHeaders([
97
- {
98
- ...(privyAuthorizationSignature != null ?
99
- { 'privy-authorization-signature': privyAuthorizationSignature }
100
- : undefined),
101
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
102
- },
103
- options?.headers,
104
- ]),
105
- });
106
- }
107
-
108
- /**
109
- * Get a key quorum by ID.
110
- *
111
- * @example
112
- * ```ts
113
- * const keyQuorum = await client.keyQuorums.get('string');
114
- * ```
115
- */
116
- get(keyQuorumID: SharedAPI.KeyQuorumID, options?: RequestOptions): APIPromise<KeyQuorum> {
117
- return this._client.get(path`/v1/key_quorums/${keyQuorumID}`, options);
118
- }
119
- }
5
+ export class KeyQuorums extends APIResource {}
120
6
 
121
7
  /**
122
8
  * A key quorum for authorizing wallet operations.
@@ -230,99 +116,11 @@ export interface KeyQuorumUpdateRequestBody {
230
116
  user_ids?: Array<string>;
231
117
  }
232
118
 
233
- export interface KeyQuorumCreateParams {
234
- /**
235
- * The number of keys that must sign for an action to be valid. Must be less than
236
- * or equal to total number of key quorum members.
237
- */
238
- authorization_threshold?: number;
239
-
240
- display_name?: string;
241
-
242
- /**
243
- * List of key quorum IDs that should be members of this key quorum. Key quorums
244
- * can only be nested 1 level deep.
245
- */
246
- key_quorum_ids?: Array<string>;
247
-
248
- /**
249
- * List of P-256 public keys of the keys that should be authorized to sign on the
250
- * key quorum, in base64-encoded DER format.
251
- */
252
- public_keys?: Array<string>;
253
-
254
- /**
255
- * List of user IDs of the users that should be authorized to sign on the key
256
- * quorum.
257
- */
258
- user_ids?: Array<string>;
259
- }
260
-
261
- export interface KeyQuorumDeleteParams {
262
- /**
263
- * Request authorization signature. If multiple signatures are required, they
264
- * should be comma separated.
265
- */
266
- 'privy-authorization-signature'?: string;
267
-
268
- /**
269
- * Request expiry. Value is a Unix timestamp in milliseconds representing the
270
- * deadline by which the request must be processed.
271
- */
272
- 'privy-request-expiry'?: string;
273
- }
274
-
275
- export interface KeyQuorumUpdateParams {
276
- /**
277
- * Body param: The number of keys that must sign for an action to be valid. Must be
278
- * less than or equal to total number of key quorum members.
279
- */
280
- authorization_threshold?: number;
281
-
282
- /**
283
- * Body param
284
- */
285
- display_name?: string;
286
-
287
- /**
288
- * Body param: List of key quorum IDs that should be members of this key quorum.
289
- * Key quorums can only be nested 1 level deep.
290
- */
291
- key_quorum_ids?: Array<string>;
292
-
293
- /**
294
- * Body param: List of P-256 public keys of the keys that should be authorized to
295
- * sign on the key quorum, in base64-encoded DER format.
296
- */
297
- public_keys?: Array<string>;
298
-
299
- /**
300
- * Body param: List of user IDs of the users that should be authorized to sign on
301
- * the key quorum.
302
- */
303
- user_ids?: Array<string>;
304
-
305
- /**
306
- * Header param: Request authorization signature. If multiple signatures are
307
- * required, they should be comma separated.
308
- */
309
- 'privy-authorization-signature'?: string;
310
-
311
- /**
312
- * Header param: Request expiry. Value is a Unix timestamp in milliseconds
313
- * representing the deadline by which the request must be processed.
314
- */
315
- 'privy-request-expiry'?: string;
316
- }
317
-
318
119
  export declare namespace KeyQuorums {
319
120
  export {
320
121
  type KeyQuorum as KeyQuorum,
321
122
  type KeyQuorumAuthorizationHeaders as KeyQuorumAuthorizationHeaders,
322
123
  type KeyQuorumCreateRequestBody as KeyQuorumCreateRequestBody,
323
124
  type KeyQuorumUpdateRequestBody as KeyQuorumUpdateRequestBody,
324
- type KeyQuorumCreateParams as KeyQuorumCreateParams,
325
- type KeyQuorumDeleteParams as KeyQuorumDeleteParams,
326
- type KeyQuorumUpdateParams as KeyQuorumUpdateParams,
327
125
  };
328
126
  }