@dynamic-labs/sdk-api 0.0.507 → 0.0.509

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.0.507",
3
+ "version": "0.0.509",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -29,6 +29,7 @@ require('../models/EmbeddedWalletChainEnum.cjs');
29
29
  require('../models/EmbeddedWalletProviderEnum.cjs');
30
30
  var CreateEmbeddedWalletsRequest = require('../models/CreateEmbeddedWalletsRequest.cjs');
31
31
  require('../models/UserIdentifierTypeEnum.cjs');
32
+ var CreateWalletAccountRequest = require('../models/CreateWalletAccountRequest.cjs');
32
33
  var Currency = require('../models/Currency.cjs');
33
34
  require('../models/CurrencyType.cjs');
34
35
  require('../models/CustomHostnameStatusEnum.cjs');
@@ -107,6 +108,7 @@ require('../models/SubscriptionFreeScopeEnum.cjs');
107
108
  var SupportedOnrampsResponse = require('../models/SupportedOnrampsResponse.cjs');
108
109
  var TelegramPostRequest = require('../models/TelegramPostRequest.cjs');
109
110
  var TokenBalance = require('../models/TokenBalance.cjs');
111
+ var TurnkeyCreateWalletAccountsRequestBody = require('../models/TurnkeyCreateWalletAccountsRequestBody.cjs');
110
112
  var UpdateRecoveryEmailRequest = require('../models/UpdateRecoveryEmailRequest.cjs');
111
113
  var UpdateSelfResponse = require('../models/UpdateSelfResponse.cjs');
112
114
  var UpdateUserPasskeyRequest = require('../models/UpdateUserPasskeyRequest.cjs');
@@ -624,6 +626,48 @@ class SDKApi extends runtime.BaseAPI {
624
626
  yield this.createVisitRaw(requestParameters, initOverrides);
625
627
  });
626
628
  }
629
+ /**
630
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
631
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
632
+ */
633
+ createWalletAccountRaw(requestParameters, initOverrides) {
634
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
635
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
636
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createWalletAccount.');
637
+ }
638
+ if (requestParameters.createWalletAccountRequest === null || requestParameters.createWalletAccountRequest === undefined) {
639
+ throw new runtime.RequiredError('createWalletAccountRequest', 'Required parameter requestParameters.createWalletAccountRequest was null or undefined when calling createWalletAccount.');
640
+ }
641
+ const queryParameters = {};
642
+ const headerParameters = {};
643
+ headerParameters['Content-Type'] = 'application/json';
644
+ if (this.configuration && this.configuration.accessToken) {
645
+ const token = this.configuration.accessToken;
646
+ const tokenString = yield token("bearerAuth", []);
647
+ if (tokenString) {
648
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
649
+ }
650
+ }
651
+ const response = yield this.request({
652
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
653
+ method: 'POST',
654
+ headers: headerParameters,
655
+ query: queryParameters,
656
+ body: CreateWalletAccountRequest.CreateWalletAccountRequestToJSON(requestParameters.createWalletAccountRequest),
657
+ }, initOverrides);
658
+ return new runtime.JSONApiResponse(response, (jsonValue) => VerifyResponse.VerifyResponseFromJSON(jsonValue));
659
+ });
660
+ }
661
+ /**
662
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
663
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
664
+ */
665
+ createWalletAccount(requestParameters, initOverrides) {
666
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
667
+ const response = yield this.createWalletAccountRaw(requestParameters, initOverrides);
668
+ return yield response.value();
669
+ });
670
+ }
627
671
  /**
628
672
  * Delete a device (if not default device)
629
673
  */
@@ -1263,6 +1307,49 @@ class SDKApi extends runtime.BaseAPI {
1263
1307
  return yield response.value();
1264
1308
  });
1265
1309
  }
1310
+ /**
1311
+ * Generates the turnkey request body for a user\'s create wallet account request
1312
+ * Generates the turnkey request body for a user\'s create wallet account request
1313
+ */
1314
+ getCreateWalletAccountRequestRaw(requestParameters, initOverrides) {
1315
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1316
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1317
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCreateWalletAccountRequest.');
1318
+ }
1319
+ if (requestParameters.chain === null || requestParameters.chain === undefined) {
1320
+ throw new runtime.RequiredError('chain', 'Required parameter requestParameters.chain was null or undefined when calling getCreateWalletAccountRequest.');
1321
+ }
1322
+ const queryParameters = {};
1323
+ if (requestParameters.chain !== undefined) {
1324
+ queryParameters['chain'] = requestParameters.chain;
1325
+ }
1326
+ const headerParameters = {};
1327
+ if (this.configuration && this.configuration.accessToken) {
1328
+ const token = this.configuration.accessToken;
1329
+ const tokenString = yield token("bearerAuth", []);
1330
+ if (tokenString) {
1331
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1332
+ }
1333
+ }
1334
+ const response = yield this.request({
1335
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts/createRequest`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1336
+ method: 'GET',
1337
+ headers: headerParameters,
1338
+ query: queryParameters,
1339
+ }, initOverrides);
1340
+ return new runtime.JSONApiResponse(response, (jsonValue) => TurnkeyCreateWalletAccountsRequestBody.TurnkeyCreateWalletAccountsRequestBodyFromJSON(jsonValue));
1341
+ });
1342
+ }
1343
+ /**
1344
+ * Generates the turnkey request body for a user\'s create wallet account request
1345
+ * Generates the turnkey request body for a user\'s create wallet account request
1346
+ */
1347
+ getCreateWalletAccountRequest(requestParameters, initOverrides) {
1348
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1349
+ const response = yield this.getCreateWalletAccountRequestRaw(requestParameters, initOverrides);
1350
+ return yield response.value();
1351
+ });
1352
+ }
1266
1353
  /**
1267
1354
  * Return the email provider to be used for signing in with a given email. If an external provider such as magicLink is disabled, this endpoint would return emailOnly. If an external provider such as magicLink is enabled, it will return emailOnly when the email already exists in Dynamic and it is associated with a wallet, otherwise it will return magicLink.
1268
1355
  * Get signin email provider
@@ -4586,6 +4673,60 @@ class SDKApi extends runtime.BaseAPI {
4586
4673
  yield this.verifyUnlinkOptionsRaw(requestParameters, initOverrides);
4587
4674
  });
4588
4675
  }
4676
+ /**
4677
+ * Options call for this endpoint
4678
+ */
4679
+ walletAccountOptionsRaw(requestParameters, initOverrides) {
4680
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
4681
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4682
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling walletAccountOptions.');
4683
+ }
4684
+ const queryParameters = {};
4685
+ const headerParameters = {};
4686
+ const response = yield this.request({
4687
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
4688
+ method: 'OPTIONS',
4689
+ headers: headerParameters,
4690
+ query: queryParameters,
4691
+ }, initOverrides);
4692
+ return new runtime.VoidApiResponse(response);
4693
+ });
4694
+ }
4695
+ /**
4696
+ * Options call for this endpoint
4697
+ */
4698
+ walletAccountOptions(requestParameters, initOverrides) {
4699
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
4700
+ yield this.walletAccountOptionsRaw(requestParameters, initOverrides);
4701
+ });
4702
+ }
4703
+ /**
4704
+ * Options call for this endpoint
4705
+ */
4706
+ walletAccountRequestOptionsRaw(requestParameters, initOverrides) {
4707
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
4708
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4709
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling walletAccountRequestOptions.');
4710
+ }
4711
+ const queryParameters = {};
4712
+ const headerParameters = {};
4713
+ const response = yield this.request({
4714
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts/createRequest`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
4715
+ method: 'OPTIONS',
4716
+ headers: headerParameters,
4717
+ query: queryParameters,
4718
+ }, initOverrides);
4719
+ return new runtime.VoidApiResponse(response);
4720
+ });
4721
+ }
4722
+ /**
4723
+ * Options call for this endpoint
4724
+ */
4725
+ walletAccountRequestOptions(requestParameters, initOverrides) {
4726
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
4727
+ yield this.walletAccountRequestOptionsRaw(requestParameters, initOverrides);
4728
+ });
4729
+ }
4589
4730
  }
4590
4731
  /**
4591
4732
  * @export
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, Currency, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, ExternalAuthSigninRequest, FarcasterSignInRequest, GetUserPasskeysResponse, HealthcheckResponse, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RegisterSessionKeyRequest, SdkSettingsRequest, SdkUser, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SupportedOnrampsResponse, TelegramPostRequest, TokenBalance, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UserFields, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
13
+ import { CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, CreateWalletAccountRequest, Currency, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletChainEnum, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, ExternalAuthSigninRequest, FarcasterSignInRequest, GetUserPasskeysResponse, HealthcheckResponse, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RegisterSessionKeyRequest, SdkSettingsRequest, SdkUser, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SupportedOnrampsResponse, TelegramPostRequest, TokenBalance, TurnkeyCreateWalletAccountsRequestBody, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UserFields, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
14
14
  export interface AuthMfaRecoveryRequest {
15
15
  environmentId: string;
16
16
  mFAAuthRecoveryDevicePostRequest: MFAAuthRecoveryDevicePostRequest;
@@ -64,6 +64,10 @@ export interface CreateVisitRequest {
64
64
  environmentId: string;
65
65
  connectRequest: ConnectRequest;
66
66
  }
67
+ export interface CreateWalletAccountOperationRequest {
68
+ environmentId: string;
69
+ createWalletAccountRequest: CreateWalletAccountRequest;
70
+ }
67
71
  export interface DeleteMfaDeviceRequest {
68
72
  environmentId: string;
69
73
  mfaDeviceId: string;
@@ -139,6 +143,10 @@ export interface GetAuthTokenOptsRequest {
139
143
  export interface GetAuthenticatedUserRequest {
140
144
  environmentId: string;
141
145
  }
146
+ export interface GetCreateWalletAccountRequestRequest {
147
+ environmentId: string;
148
+ chain: EmbeddedWalletChainEnum;
149
+ }
142
150
  export interface GetEmailProviderRequest {
143
151
  environmentId: string;
144
152
  email: string;
@@ -512,6 +520,12 @@ export interface VerifyUnlinkOperationRequest {
512
520
  export interface VerifyUnlinkOptionsRequest {
513
521
  environmentId: string;
514
522
  }
523
+ export interface WalletAccountOptionsRequest {
524
+ environmentId: string;
525
+ }
526
+ export interface WalletAccountRequestOptionsRequest {
527
+ environmentId: string;
528
+ }
515
529
  /**
516
530
  *
517
531
  */
@@ -642,6 +656,16 @@ export declare class SDKApi extends runtime.BaseAPI {
642
656
  * Create a visit
643
657
  */
644
658
  createVisit(requestParameters: CreateVisitRequest, initOverrides?: RequestInit): Promise<void>;
659
+ /**
660
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
661
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
662
+ */
663
+ createWalletAccountRaw(requestParameters: CreateWalletAccountOperationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<VerifyResponse>>;
664
+ /**
665
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
666
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
667
+ */
668
+ createWalletAccount(requestParameters: CreateWalletAccountOperationRequest, initOverrides?: RequestInit): Promise<VerifyResponse>;
645
669
  /**
646
670
  * Delete a device (if not default device)
647
671
  */
@@ -798,6 +822,16 @@ export declare class SDKApi extends runtime.BaseAPI {
798
822
  * Fetch user profile for the current authenticated user
799
823
  */
800
824
  getAuthenticatedUser(requestParameters: GetAuthenticatedUserRequest, initOverrides?: RequestInit): Promise<SdkUser>;
825
+ /**
826
+ * Generates the turnkey request body for a user\'s create wallet account request
827
+ * Generates the turnkey request body for a user\'s create wallet account request
828
+ */
829
+ getCreateWalletAccountRequestRaw(requestParameters: GetCreateWalletAccountRequestRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<TurnkeyCreateWalletAccountsRequestBody>>;
830
+ /**
831
+ * Generates the turnkey request body for a user\'s create wallet account request
832
+ * Generates the turnkey request body for a user\'s create wallet account request
833
+ */
834
+ getCreateWalletAccountRequest(requestParameters: GetCreateWalletAccountRequestRequest, initOverrides?: RequestInit): Promise<TurnkeyCreateWalletAccountsRequestBody>;
801
835
  /**
802
836
  * Return the email provider to be used for signing in with a given email. If an external provider such as magicLink is disabled, this endpoint would return emailOnly. If an external provider such as magicLink is enabled, it will return emailOnly when the email already exists in Dynamic and it is associated with a wallet, otherwise it will return magicLink.
803
837
  * Get signin email provider
@@ -1654,6 +1688,22 @@ export declare class SDKApi extends runtime.BaseAPI {
1654
1688
  * Options call for this endpoint
1655
1689
  */
1656
1690
  verifyUnlinkOptions(requestParameters: VerifyUnlinkOptionsRequest, initOverrides?: RequestInit): Promise<void>;
1691
+ /**
1692
+ * Options call for this endpoint
1693
+ */
1694
+ walletAccountOptionsRaw(requestParameters: WalletAccountOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
1695
+ /**
1696
+ * Options call for this endpoint
1697
+ */
1698
+ walletAccountOptions(requestParameters: WalletAccountOptionsRequest, initOverrides?: RequestInit): Promise<void>;
1699
+ /**
1700
+ * Options call for this endpoint
1701
+ */
1702
+ walletAccountRequestOptionsRaw(requestParameters: WalletAccountRequestOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
1703
+ /**
1704
+ * Options call for this endpoint
1705
+ */
1706
+ walletAccountRequestOptions(requestParameters: WalletAccountRequestOptionsRequest, initOverrides?: RequestInit): Promise<void>;
1657
1707
  }
1658
1708
  /**
1659
1709
  * @export
@@ -25,6 +25,7 @@ import '../models/EmbeddedWalletChainEnum.js';
25
25
  import '../models/EmbeddedWalletProviderEnum.js';
26
26
  import { CreateEmbeddedWalletsRequestToJSON } from '../models/CreateEmbeddedWalletsRequest.js';
27
27
  import '../models/UserIdentifierTypeEnum.js';
28
+ import { CreateWalletAccountRequestToJSON } from '../models/CreateWalletAccountRequest.js';
28
29
  import { CurrencyFromJSON } from '../models/Currency.js';
29
30
  import '../models/CurrencyType.js';
30
31
  import '../models/CustomHostnameStatusEnum.js';
@@ -103,6 +104,7 @@ import '../models/SubscriptionFreeScopeEnum.js';
103
104
  import { SupportedOnrampsResponseFromJSON } from '../models/SupportedOnrampsResponse.js';
104
105
  import { TelegramPostRequestToJSON } from '../models/TelegramPostRequest.js';
105
106
  import { TokenBalanceFromJSON } from '../models/TokenBalance.js';
107
+ import { TurnkeyCreateWalletAccountsRequestBodyFromJSON } from '../models/TurnkeyCreateWalletAccountsRequestBody.js';
106
108
  import { UpdateRecoveryEmailRequestToJSON } from '../models/UpdateRecoveryEmailRequest.js';
107
109
  import { UpdateSelfResponseFromJSON } from '../models/UpdateSelfResponse.js';
108
110
  import { UpdateUserPasskeyRequestToJSON } from '../models/UpdateUserPasskeyRequest.js';
@@ -620,6 +622,48 @@ class SDKApi extends BaseAPI {
620
622
  yield this.createVisitRaw(requestParameters, initOverrides);
621
623
  });
622
624
  }
625
+ /**
626
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
627
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
628
+ */
629
+ createWalletAccountRaw(requestParameters, initOverrides) {
630
+ return __awaiter(this, void 0, void 0, function* () {
631
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
632
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createWalletAccount.');
633
+ }
634
+ if (requestParameters.createWalletAccountRequest === null || requestParameters.createWalletAccountRequest === undefined) {
635
+ throw new RequiredError('createWalletAccountRequest', 'Required parameter requestParameters.createWalletAccountRequest was null or undefined when calling createWalletAccount.');
636
+ }
637
+ const queryParameters = {};
638
+ const headerParameters = {};
639
+ headerParameters['Content-Type'] = 'application/json';
640
+ if (this.configuration && this.configuration.accessToken) {
641
+ const token = this.configuration.accessToken;
642
+ const tokenString = yield token("bearerAuth", []);
643
+ if (tokenString) {
644
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
645
+ }
646
+ }
647
+ const response = yield this.request({
648
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
649
+ method: 'POST',
650
+ headers: headerParameters,
651
+ query: queryParameters,
652
+ body: CreateWalletAccountRequestToJSON(requestParameters.createWalletAccountRequest),
653
+ }, initOverrides);
654
+ return new JSONApiResponse(response, (jsonValue) => VerifyResponseFromJSON(jsonValue));
655
+ });
656
+ }
657
+ /**
658
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
659
+ * Add a wallet account to a user\'s existing Turnkey HD wallet
660
+ */
661
+ createWalletAccount(requestParameters, initOverrides) {
662
+ return __awaiter(this, void 0, void 0, function* () {
663
+ const response = yield this.createWalletAccountRaw(requestParameters, initOverrides);
664
+ return yield response.value();
665
+ });
666
+ }
623
667
  /**
624
668
  * Delete a device (if not default device)
625
669
  */
@@ -1259,6 +1303,49 @@ class SDKApi extends BaseAPI {
1259
1303
  return yield response.value();
1260
1304
  });
1261
1305
  }
1306
+ /**
1307
+ * Generates the turnkey request body for a user\'s create wallet account request
1308
+ * Generates the turnkey request body for a user\'s create wallet account request
1309
+ */
1310
+ getCreateWalletAccountRequestRaw(requestParameters, initOverrides) {
1311
+ return __awaiter(this, void 0, void 0, function* () {
1312
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1313
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCreateWalletAccountRequest.');
1314
+ }
1315
+ if (requestParameters.chain === null || requestParameters.chain === undefined) {
1316
+ throw new RequiredError('chain', 'Required parameter requestParameters.chain was null or undefined when calling getCreateWalletAccountRequest.');
1317
+ }
1318
+ const queryParameters = {};
1319
+ if (requestParameters.chain !== undefined) {
1320
+ queryParameters['chain'] = requestParameters.chain;
1321
+ }
1322
+ const headerParameters = {};
1323
+ if (this.configuration && this.configuration.accessToken) {
1324
+ const token = this.configuration.accessToken;
1325
+ const tokenString = yield token("bearerAuth", []);
1326
+ if (tokenString) {
1327
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1328
+ }
1329
+ }
1330
+ const response = yield this.request({
1331
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts/createRequest`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1332
+ method: 'GET',
1333
+ headers: headerParameters,
1334
+ query: queryParameters,
1335
+ }, initOverrides);
1336
+ return new JSONApiResponse(response, (jsonValue) => TurnkeyCreateWalletAccountsRequestBodyFromJSON(jsonValue));
1337
+ });
1338
+ }
1339
+ /**
1340
+ * Generates the turnkey request body for a user\'s create wallet account request
1341
+ * Generates the turnkey request body for a user\'s create wallet account request
1342
+ */
1343
+ getCreateWalletAccountRequest(requestParameters, initOverrides) {
1344
+ return __awaiter(this, void 0, void 0, function* () {
1345
+ const response = yield this.getCreateWalletAccountRequestRaw(requestParameters, initOverrides);
1346
+ return yield response.value();
1347
+ });
1348
+ }
1262
1349
  /**
1263
1350
  * Return the email provider to be used for signing in with a given email. If an external provider such as magicLink is disabled, this endpoint would return emailOnly. If an external provider such as magicLink is enabled, it will return emailOnly when the email already exists in Dynamic and it is associated with a wallet, otherwise it will return magicLink.
1264
1351
  * Get signin email provider
@@ -4582,6 +4669,60 @@ class SDKApi extends BaseAPI {
4582
4669
  yield this.verifyUnlinkOptionsRaw(requestParameters, initOverrides);
4583
4670
  });
4584
4671
  }
4672
+ /**
4673
+ * Options call for this endpoint
4674
+ */
4675
+ walletAccountOptionsRaw(requestParameters, initOverrides) {
4676
+ return __awaiter(this, void 0, void 0, function* () {
4677
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4678
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling walletAccountOptions.');
4679
+ }
4680
+ const queryParameters = {};
4681
+ const headerParameters = {};
4682
+ const response = yield this.request({
4683
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
4684
+ method: 'OPTIONS',
4685
+ headers: headerParameters,
4686
+ query: queryParameters,
4687
+ }, initOverrides);
4688
+ return new VoidApiResponse(response);
4689
+ });
4690
+ }
4691
+ /**
4692
+ * Options call for this endpoint
4693
+ */
4694
+ walletAccountOptions(requestParameters, initOverrides) {
4695
+ return __awaiter(this, void 0, void 0, function* () {
4696
+ yield this.walletAccountOptionsRaw(requestParameters, initOverrides);
4697
+ });
4698
+ }
4699
+ /**
4700
+ * Options call for this endpoint
4701
+ */
4702
+ walletAccountRequestOptionsRaw(requestParameters, initOverrides) {
4703
+ return __awaiter(this, void 0, void 0, function* () {
4704
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4705
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling walletAccountRequestOptions.');
4706
+ }
4707
+ const queryParameters = {};
4708
+ const headerParameters = {};
4709
+ const response = yield this.request({
4710
+ path: `/sdk/{environmentId}/users/embeddedWallets/walletAccounts/createRequest`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
4711
+ method: 'OPTIONS',
4712
+ headers: headerParameters,
4713
+ query: queryParameters,
4714
+ }, initOverrides);
4715
+ return new VoidApiResponse(response);
4716
+ });
4717
+ }
4718
+ /**
4719
+ * Options call for this endpoint
4720
+ */
4721
+ walletAccountRequestOptions(requestParameters, initOverrides) {
4722
+ return __awaiter(this, void 0, void 0, function* () {
4723
+ yield this.walletAccountRequestOptionsRaw(requestParameters, initOverrides);
4724
+ });
4725
+ }
4585
4726
  }
4586
4727
  /**
4587
4728
  * @export
package/src/index.cjs CHANGED
@@ -72,6 +72,7 @@ var CreateTurnkeyEmbeddedWalletSpecificOpts = require('./models/CreateTurnkeyEmb
72
72
  var CreateUserEmbeddedWalletsFromFarcasterRequest = require('./models/CreateUserEmbeddedWalletsFromFarcasterRequest.cjs');
73
73
  var CreateUserEmbeddedWalletsRequest = require('./models/CreateUserEmbeddedWalletsRequest.cjs');
74
74
  var CreateUserOauthRequest = require('./models/CreateUserOauthRequest.cjs');
75
+ var CreateWalletAccountRequest = require('./models/CreateWalletAccountRequest.cjs');
75
76
  var CreateWalletRequest = require('./models/CreateWalletRequest.cjs');
76
77
  var Currency = require('./models/Currency.cjs');
77
78
  var CurrencyType = require('./models/CurrencyType.cjs');
@@ -301,8 +302,11 @@ var TokenWithRaw = require('./models/TokenWithRaw.cjs');
301
302
  var TokenWithRawProjectEnvironment = require('./models/TokenWithRawProjectEnvironment.cjs');
302
303
  var TokensResponse = require('./models/TokensResponse.cjs');
303
304
  var TooManyRequests = require('./models/TooManyRequests.cjs');
305
+ var TurnkeyCreateWalletAccountsRequestBody = require('./models/TurnkeyCreateWalletAccountsRequestBody.cjs');
306
+ var TurnkeyCreateWalletAccountsRequestBodyParameters = require('./models/TurnkeyCreateWalletAccountsRequestBodyParameters.cjs');
304
307
  var TurnkeySignedRequest = require('./models/TurnkeySignedRequest.cjs');
305
308
  var TurnkeyStamp = require('./models/TurnkeyStamp.cjs');
309
+ var TurnkeyWalletAccount = require('./models/TurnkeyWalletAccount.cjs');
306
310
  var TurnkeyWalletProperties = require('./models/TurnkeyWalletProperties.cjs');
307
311
  var Unauthorized = require('./models/Unauthorized.cjs');
308
312
  var UnprocessableEntity = require('./models/UnprocessableEntity.cjs');
@@ -551,6 +555,9 @@ exports.CreateUserEmbeddedWalletsRequestToJSON = CreateUserEmbeddedWalletsReques
551
555
  exports.CreateUserOauthRequestFromJSON = CreateUserOauthRequest.CreateUserOauthRequestFromJSON;
552
556
  exports.CreateUserOauthRequestFromJSONTyped = CreateUserOauthRequest.CreateUserOauthRequestFromJSONTyped;
553
557
  exports.CreateUserOauthRequestToJSON = CreateUserOauthRequest.CreateUserOauthRequestToJSON;
558
+ exports.CreateWalletAccountRequestFromJSON = CreateWalletAccountRequest.CreateWalletAccountRequestFromJSON;
559
+ exports.CreateWalletAccountRequestFromJSONTyped = CreateWalletAccountRequest.CreateWalletAccountRequestFromJSONTyped;
560
+ exports.CreateWalletAccountRequestToJSON = CreateWalletAccountRequest.CreateWalletAccountRequestToJSON;
554
561
  exports.CreateWalletRequestFromJSON = CreateWalletRequest.CreateWalletRequestFromJSON;
555
562
  exports.CreateWalletRequestFromJSONTyped = CreateWalletRequest.CreateWalletRequestFromJSONTyped;
556
563
  exports.CreateWalletRequestToJSON = CreateWalletRequest.CreateWalletRequestToJSON;
@@ -1394,12 +1401,21 @@ exports.TokensResponseToJSON = TokensResponse.TokensResponseToJSON;
1394
1401
  exports.TooManyRequestsFromJSON = TooManyRequests.TooManyRequestsFromJSON;
1395
1402
  exports.TooManyRequestsFromJSONTyped = TooManyRequests.TooManyRequestsFromJSONTyped;
1396
1403
  exports.TooManyRequestsToJSON = TooManyRequests.TooManyRequestsToJSON;
1404
+ exports.TurnkeyCreateWalletAccountsRequestBodyFromJSON = TurnkeyCreateWalletAccountsRequestBody.TurnkeyCreateWalletAccountsRequestBodyFromJSON;
1405
+ exports.TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped = TurnkeyCreateWalletAccountsRequestBody.TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped;
1406
+ exports.TurnkeyCreateWalletAccountsRequestBodyToJSON = TurnkeyCreateWalletAccountsRequestBody.TurnkeyCreateWalletAccountsRequestBodyToJSON;
1407
+ exports.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON = TurnkeyCreateWalletAccountsRequestBodyParameters.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON;
1408
+ exports.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped = TurnkeyCreateWalletAccountsRequestBodyParameters.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped;
1409
+ exports.TurnkeyCreateWalletAccountsRequestBodyParametersToJSON = TurnkeyCreateWalletAccountsRequestBodyParameters.TurnkeyCreateWalletAccountsRequestBodyParametersToJSON;
1397
1410
  exports.TurnkeySignedRequestFromJSON = TurnkeySignedRequest.TurnkeySignedRequestFromJSON;
1398
1411
  exports.TurnkeySignedRequestFromJSONTyped = TurnkeySignedRequest.TurnkeySignedRequestFromJSONTyped;
1399
1412
  exports.TurnkeySignedRequestToJSON = TurnkeySignedRequest.TurnkeySignedRequestToJSON;
1400
1413
  exports.TurnkeyStampFromJSON = TurnkeyStamp.TurnkeyStampFromJSON;
1401
1414
  exports.TurnkeyStampFromJSONTyped = TurnkeyStamp.TurnkeyStampFromJSONTyped;
1402
1415
  exports.TurnkeyStampToJSON = TurnkeyStamp.TurnkeyStampToJSON;
1416
+ exports.TurnkeyWalletAccountFromJSON = TurnkeyWalletAccount.TurnkeyWalletAccountFromJSON;
1417
+ exports.TurnkeyWalletAccountFromJSONTyped = TurnkeyWalletAccount.TurnkeyWalletAccountFromJSONTyped;
1418
+ exports.TurnkeyWalletAccountToJSON = TurnkeyWalletAccount.TurnkeyWalletAccountToJSON;
1403
1419
  exports.TurnkeyWalletPropertiesFromJSON = TurnkeyWalletProperties.TurnkeyWalletPropertiesFromJSON;
1404
1420
  exports.TurnkeyWalletPropertiesFromJSONTyped = TurnkeyWalletProperties.TurnkeyWalletPropertiesFromJSONTyped;
1405
1421
  exports.TurnkeyWalletPropertiesToJSON = TurnkeyWalletProperties.TurnkeyWalletPropertiesToJSON;
package/src/index.js CHANGED
@@ -68,6 +68,7 @@ export { CreateTurnkeyEmbeddedWalletSpecificOptsFromJSON, CreateTurnkeyEmbeddedW
68
68
  export { CreateUserEmbeddedWalletsFromFarcasterRequestFromJSON, CreateUserEmbeddedWalletsFromFarcasterRequestFromJSONTyped, CreateUserEmbeddedWalletsFromFarcasterRequestToJSON } from './models/CreateUserEmbeddedWalletsFromFarcasterRequest.js';
69
69
  export { CreateUserEmbeddedWalletsRequestFromJSON, CreateUserEmbeddedWalletsRequestFromJSONTyped, CreateUserEmbeddedWalletsRequestToJSON } from './models/CreateUserEmbeddedWalletsRequest.js';
70
70
  export { CreateUserOauthRequestFromJSON, CreateUserOauthRequestFromJSONTyped, CreateUserOauthRequestToJSON } from './models/CreateUserOauthRequest.js';
71
+ export { CreateWalletAccountRequestFromJSON, CreateWalletAccountRequestFromJSONTyped, CreateWalletAccountRequestToJSON } from './models/CreateWalletAccountRequest.js';
71
72
  export { CreateWalletRequestFromJSON, CreateWalletRequestFromJSONTyped, CreateWalletRequestToJSON } from './models/CreateWalletRequest.js';
72
73
  export { CurrencyFromJSON, CurrencyFromJSONTyped, CurrencyToJSON } from './models/Currency.js';
73
74
  export { CurrencyType, CurrencyTypeFromJSON, CurrencyTypeFromJSONTyped, CurrencyTypeToJSON } from './models/CurrencyType.js';
@@ -297,8 +298,11 @@ export { TokenWithRawFromJSON, TokenWithRawFromJSONTyped, TokenWithRawToJSON } f
297
298
  export { TokenWithRawProjectEnvironmentFromJSON, TokenWithRawProjectEnvironmentFromJSONTyped, TokenWithRawProjectEnvironmentToJSON } from './models/TokenWithRawProjectEnvironment.js';
298
299
  export { TokensResponseFromJSON, TokensResponseFromJSONTyped, TokensResponseToJSON } from './models/TokensResponse.js';
299
300
  export { TooManyRequestsFromJSON, TooManyRequestsFromJSONTyped, TooManyRequestsToJSON } from './models/TooManyRequests.js';
301
+ export { TurnkeyCreateWalletAccountsRequestBodyFromJSON, TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped, TurnkeyCreateWalletAccountsRequestBodyToJSON } from './models/TurnkeyCreateWalletAccountsRequestBody.js';
302
+ export { TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON, TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped, TurnkeyCreateWalletAccountsRequestBodyParametersToJSON } from './models/TurnkeyCreateWalletAccountsRequestBodyParameters.js';
300
303
  export { TurnkeySignedRequestFromJSON, TurnkeySignedRequestFromJSONTyped, TurnkeySignedRequestToJSON } from './models/TurnkeySignedRequest.js';
301
304
  export { TurnkeyStampFromJSON, TurnkeyStampFromJSONTyped, TurnkeyStampToJSON } from './models/TurnkeyStamp.js';
305
+ export { TurnkeyWalletAccountFromJSON, TurnkeyWalletAccountFromJSONTyped, TurnkeyWalletAccountToJSON } from './models/TurnkeyWalletAccount.js';
302
306
  export { TurnkeyWalletPropertiesFromJSON, TurnkeyWalletPropertiesFromJSONTyped, TurnkeyWalletPropertiesToJSON } from './models/TurnkeyWalletProperties.js';
303
307
  export { UnauthorizedFromJSON, UnauthorizedFromJSONTyped, UnauthorizedToJSON } from './models/Unauthorized.js';
304
308
  export { UnprocessableEntityFromJSON, UnprocessableEntityFromJSONTyped, UnprocessableEntityToJSON } from './models/UnprocessableEntity.js';
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var TurnkeySignedRequest = require('./TurnkeySignedRequest.cjs');
6
+
7
+ /* tslint:disable */
8
+ function CreateWalletAccountRequestFromJSON(json) {
9
+ return CreateWalletAccountRequestFromJSONTyped(json);
10
+ }
11
+ function CreateWalletAccountRequestFromJSONTyped(json, ignoreDiscriminator) {
12
+ if ((json === undefined) || (json === null)) {
13
+ return json;
14
+ }
15
+ return {
16
+ 'turnkeySignedRequest': TurnkeySignedRequest.TurnkeySignedRequestFromJSON(json['turnkeySignedRequest']),
17
+ };
18
+ }
19
+ function CreateWalletAccountRequestToJSON(value) {
20
+ if (value === undefined) {
21
+ return undefined;
22
+ }
23
+ if (value === null) {
24
+ return null;
25
+ }
26
+ return {
27
+ 'turnkeySignedRequest': TurnkeySignedRequest.TurnkeySignedRequestToJSON(value.turnkeySignedRequest),
28
+ };
29
+ }
30
+
31
+ exports.CreateWalletAccountRequestFromJSON = CreateWalletAccountRequestFromJSON;
32
+ exports.CreateWalletAccountRequestFromJSONTyped = CreateWalletAccountRequestFromJSONTyped;
33
+ exports.CreateWalletAccountRequestToJSON = CreateWalletAccountRequestToJSON;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { TurnkeySignedRequest } from './TurnkeySignedRequest';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateWalletAccountRequest
17
+ */
18
+ export interface CreateWalletAccountRequest {
19
+ /**
20
+ *
21
+ * @type {TurnkeySignedRequest}
22
+ * @memberof CreateWalletAccountRequest
23
+ */
24
+ turnkeySignedRequest: TurnkeySignedRequest;
25
+ }
26
+ export declare function CreateWalletAccountRequestFromJSON(json: any): CreateWalletAccountRequest;
27
+ export declare function CreateWalletAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWalletAccountRequest;
28
+ export declare function CreateWalletAccountRequestToJSON(value?: CreateWalletAccountRequest | null): any;
@@ -0,0 +1,27 @@
1
+ import { TurnkeySignedRequestFromJSON, TurnkeySignedRequestToJSON } from './TurnkeySignedRequest.js';
2
+
3
+ /* tslint:disable */
4
+ function CreateWalletAccountRequestFromJSON(json) {
5
+ return CreateWalletAccountRequestFromJSONTyped(json);
6
+ }
7
+ function CreateWalletAccountRequestFromJSONTyped(json, ignoreDiscriminator) {
8
+ if ((json === undefined) || (json === null)) {
9
+ return json;
10
+ }
11
+ return {
12
+ 'turnkeySignedRequest': TurnkeySignedRequestFromJSON(json['turnkeySignedRequest']),
13
+ };
14
+ }
15
+ function CreateWalletAccountRequestToJSON(value) {
16
+ if (value === undefined) {
17
+ return undefined;
18
+ }
19
+ if (value === null) {
20
+ return null;
21
+ }
22
+ return {
23
+ 'turnkeySignedRequest': TurnkeySignedRequestToJSON(value.turnkeySignedRequest),
24
+ };
25
+ }
26
+
27
+ export { CreateWalletAccountRequestFromJSON, CreateWalletAccountRequestFromJSONTyped, CreateWalletAccountRequestToJSON };
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var TurnkeyCreateWalletAccountsRequestBodyParameters = require('./TurnkeyCreateWalletAccountsRequestBodyParameters.cjs');
6
+
7
+ /* tslint:disable */
8
+ function TurnkeyCreateWalletAccountsRequestBodyFromJSON(json) {
9
+ return TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped(json);
10
+ }
11
+ function TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
12
+ if ((json === undefined) || (json === null)) {
13
+ return json;
14
+ }
15
+ return {
16
+ 'organizationId': json['organizationId'],
17
+ 'parameters': TurnkeyCreateWalletAccountsRequestBodyParameters.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON(json['parameters']),
18
+ 'timestampMs': json['timestampMs'],
19
+ 'type': json['type'],
20
+ };
21
+ }
22
+ function TurnkeyCreateWalletAccountsRequestBodyToJSON(value) {
23
+ if (value === undefined) {
24
+ return undefined;
25
+ }
26
+ if (value === null) {
27
+ return null;
28
+ }
29
+ return {
30
+ 'organizationId': value.organizationId,
31
+ 'parameters': TurnkeyCreateWalletAccountsRequestBodyParameters.TurnkeyCreateWalletAccountsRequestBodyParametersToJSON(value.parameters),
32
+ 'timestampMs': value.timestampMs,
33
+ 'type': value.type,
34
+ };
35
+ }
36
+
37
+ exports.TurnkeyCreateWalletAccountsRequestBodyFromJSON = TurnkeyCreateWalletAccountsRequestBodyFromJSON;
38
+ exports.TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped = TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped;
39
+ exports.TurnkeyCreateWalletAccountsRequestBodyToJSON = TurnkeyCreateWalletAccountsRequestBodyToJSON;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { TurnkeyCreateWalletAccountsRequestBodyParameters } from './TurnkeyCreateWalletAccountsRequestBodyParameters';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TurnkeyCreateWalletAccountsRequestBody
17
+ */
18
+ export interface TurnkeyCreateWalletAccountsRequestBody {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof TurnkeyCreateWalletAccountsRequestBody
23
+ */
24
+ organizationId: string;
25
+ /**
26
+ *
27
+ * @type {TurnkeyCreateWalletAccountsRequestBodyParameters}
28
+ * @memberof TurnkeyCreateWalletAccountsRequestBody
29
+ */
30
+ parameters: TurnkeyCreateWalletAccountsRequestBodyParameters;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof TurnkeyCreateWalletAccountsRequestBody
35
+ */
36
+ timestampMs: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof TurnkeyCreateWalletAccountsRequestBody
41
+ */
42
+ type: string;
43
+ }
44
+ export declare function TurnkeyCreateWalletAccountsRequestBodyFromJSON(json: any): TurnkeyCreateWalletAccountsRequestBody;
45
+ export declare function TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): TurnkeyCreateWalletAccountsRequestBody;
46
+ export declare function TurnkeyCreateWalletAccountsRequestBodyToJSON(value?: TurnkeyCreateWalletAccountsRequestBody | null): any;
@@ -0,0 +1,33 @@
1
+ import { TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON, TurnkeyCreateWalletAccountsRequestBodyParametersToJSON } from './TurnkeyCreateWalletAccountsRequestBodyParameters.js';
2
+
3
+ /* tslint:disable */
4
+ function TurnkeyCreateWalletAccountsRequestBodyFromJSON(json) {
5
+ return TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped(json);
6
+ }
7
+ function TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
8
+ if ((json === undefined) || (json === null)) {
9
+ return json;
10
+ }
11
+ return {
12
+ 'organizationId': json['organizationId'],
13
+ 'parameters': TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON(json['parameters']),
14
+ 'timestampMs': json['timestampMs'],
15
+ 'type': json['type'],
16
+ };
17
+ }
18
+ function TurnkeyCreateWalletAccountsRequestBodyToJSON(value) {
19
+ if (value === undefined) {
20
+ return undefined;
21
+ }
22
+ if (value === null) {
23
+ return null;
24
+ }
25
+ return {
26
+ 'organizationId': value.organizationId,
27
+ 'parameters': TurnkeyCreateWalletAccountsRequestBodyParametersToJSON(value.parameters),
28
+ 'timestampMs': value.timestampMs,
29
+ 'type': value.type,
30
+ };
31
+ }
32
+
33
+ export { TurnkeyCreateWalletAccountsRequestBodyFromJSON, TurnkeyCreateWalletAccountsRequestBodyFromJSONTyped, TurnkeyCreateWalletAccountsRequestBodyToJSON };
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var TurnkeyWalletAccount = require('./TurnkeyWalletAccount.cjs');
6
+
7
+ /* tslint:disable */
8
+ function TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON(json) {
9
+ return TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped(json);
10
+ }
11
+ function TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped(json, ignoreDiscriminator) {
12
+ if ((json === undefined) || (json === null)) {
13
+ return json;
14
+ }
15
+ return {
16
+ 'walletId': json['walletId'],
17
+ 'accounts': (json['accounts'].map(TurnkeyWalletAccount.TurnkeyWalletAccountFromJSON)),
18
+ };
19
+ }
20
+ function TurnkeyCreateWalletAccountsRequestBodyParametersToJSON(value) {
21
+ if (value === undefined) {
22
+ return undefined;
23
+ }
24
+ if (value === null) {
25
+ return null;
26
+ }
27
+ return {
28
+ 'walletId': value.walletId,
29
+ 'accounts': (value.accounts.map(TurnkeyWalletAccount.TurnkeyWalletAccountToJSON)),
30
+ };
31
+ }
32
+
33
+ exports.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON = TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON;
34
+ exports.TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped = TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped;
35
+ exports.TurnkeyCreateWalletAccountsRequestBodyParametersToJSON = TurnkeyCreateWalletAccountsRequestBodyParametersToJSON;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { TurnkeyWalletAccount } from './TurnkeyWalletAccount';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TurnkeyCreateWalletAccountsRequestBodyParameters
17
+ */
18
+ export interface TurnkeyCreateWalletAccountsRequestBodyParameters {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof TurnkeyCreateWalletAccountsRequestBodyParameters
23
+ */
24
+ walletId: string;
25
+ /**
26
+ *
27
+ * @type {Array<TurnkeyWalletAccount>}
28
+ * @memberof TurnkeyCreateWalletAccountsRequestBodyParameters
29
+ */
30
+ accounts: Array<TurnkeyWalletAccount>;
31
+ }
32
+ export declare function TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON(json: any): TurnkeyCreateWalletAccountsRequestBodyParameters;
33
+ export declare function TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): TurnkeyCreateWalletAccountsRequestBodyParameters;
34
+ export declare function TurnkeyCreateWalletAccountsRequestBodyParametersToJSON(value?: TurnkeyCreateWalletAccountsRequestBodyParameters | null): any;
@@ -0,0 +1,29 @@
1
+ import { TurnkeyWalletAccountFromJSON, TurnkeyWalletAccountToJSON } from './TurnkeyWalletAccount.js';
2
+
3
+ /* tslint:disable */
4
+ function TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON(json) {
5
+ return TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped(json);
6
+ }
7
+ function TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped(json, ignoreDiscriminator) {
8
+ if ((json === undefined) || (json === null)) {
9
+ return json;
10
+ }
11
+ return {
12
+ 'walletId': json['walletId'],
13
+ 'accounts': (json['accounts'].map(TurnkeyWalletAccountFromJSON)),
14
+ };
15
+ }
16
+ function TurnkeyCreateWalletAccountsRequestBodyParametersToJSON(value) {
17
+ if (value === undefined) {
18
+ return undefined;
19
+ }
20
+ if (value === null) {
21
+ return null;
22
+ }
23
+ return {
24
+ 'walletId': value.walletId,
25
+ 'accounts': (value.accounts.map(TurnkeyWalletAccountToJSON)),
26
+ };
27
+ }
28
+
29
+ export { TurnkeyCreateWalletAccountsRequestBodyParametersFromJSON, TurnkeyCreateWalletAccountsRequestBodyParametersFromJSONTyped, TurnkeyCreateWalletAccountsRequestBodyParametersToJSON };
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ /**
8
+ * Dashboard API
9
+ * Dashboard API documentation
10
+ *
11
+ * The version of the OpenAPI document: 1.0.0
12
+ *
13
+ *
14
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
15
+ * https://openapi-generator.tech
16
+ * Do not edit the class manually.
17
+ */
18
+ function TurnkeyWalletAccountFromJSON(json) {
19
+ return TurnkeyWalletAccountFromJSONTyped(json);
20
+ }
21
+ function TurnkeyWalletAccountFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'curve': json['curve'],
27
+ 'pathFormat': json['pathFormat'],
28
+ 'path': json['path'],
29
+ 'addressFormat': json['addressFormat'],
30
+ };
31
+ }
32
+ function TurnkeyWalletAccountToJSON(value) {
33
+ if (value === undefined) {
34
+ return undefined;
35
+ }
36
+ if (value === null) {
37
+ return null;
38
+ }
39
+ return {
40
+ 'curve': value.curve,
41
+ 'pathFormat': value.pathFormat,
42
+ 'path': value.path,
43
+ 'addressFormat': value.addressFormat,
44
+ };
45
+ }
46
+
47
+ exports.TurnkeyWalletAccountFromJSON = TurnkeyWalletAccountFromJSON;
48
+ exports.TurnkeyWalletAccountFromJSONTyped = TurnkeyWalletAccountFromJSONTyped;
49
+ exports.TurnkeyWalletAccountToJSON = TurnkeyWalletAccountToJSON;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface TurnkeyWalletAccount
16
+ */
17
+ export interface TurnkeyWalletAccount {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof TurnkeyWalletAccount
22
+ */
23
+ curve: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof TurnkeyWalletAccount
28
+ */
29
+ pathFormat: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof TurnkeyWalletAccount
34
+ */
35
+ path: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof TurnkeyWalletAccount
40
+ */
41
+ addressFormat: string;
42
+ }
43
+ export declare function TurnkeyWalletAccountFromJSON(json: any): TurnkeyWalletAccount;
44
+ export declare function TurnkeyWalletAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): TurnkeyWalletAccount;
45
+ export declare function TurnkeyWalletAccountToJSON(value?: TurnkeyWalletAccount | null): any;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Dashboard API
5
+ * Dashboard API documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ function TurnkeyWalletAccountFromJSON(json) {
15
+ return TurnkeyWalletAccountFromJSONTyped(json);
16
+ }
17
+ function TurnkeyWalletAccountFromJSONTyped(json, ignoreDiscriminator) {
18
+ if ((json === undefined) || (json === null)) {
19
+ return json;
20
+ }
21
+ return {
22
+ 'curve': json['curve'],
23
+ 'pathFormat': json['pathFormat'],
24
+ 'path': json['path'],
25
+ 'addressFormat': json['addressFormat'],
26
+ };
27
+ }
28
+ function TurnkeyWalletAccountToJSON(value) {
29
+ if (value === undefined) {
30
+ return undefined;
31
+ }
32
+ if (value === null) {
33
+ return null;
34
+ }
35
+ return {
36
+ 'curve': value.curve,
37
+ 'pathFormat': value.pathFormat,
38
+ 'path': value.path,
39
+ 'addressFormat': value.addressFormat,
40
+ };
41
+ }
42
+
43
+ export { TurnkeyWalletAccountFromJSON, TurnkeyWalletAccountFromJSONTyped, TurnkeyWalletAccountToJSON };
@@ -109,6 +109,8 @@ exports.UnprocessableEntityErrorCode = void 0;
109
109
  UnprocessableEntityErrorCode["InvalidChainAddressMatch"] = "invalid_chain_address_match";
110
110
  UnprocessableEntityErrorCode["InvalidUpdate"] = "invalid_update";
111
111
  UnprocessableEntityErrorCode["CannotDeleteLastProject"] = "cannot_delete_last_project";
112
+ UnprocessableEntityErrorCode["NoHdWalletFound"] = "no_hd_wallet_found";
113
+ UnprocessableEntityErrorCode["WalletAccountExistsForChain"] = "wallet_account_exists_for_chain";
112
114
  })(exports.UnprocessableEntityErrorCode || (exports.UnprocessableEntityErrorCode = {}));
113
115
  function UnprocessableEntityErrorCodeFromJSON(json) {
114
116
  return UnprocessableEntityErrorCodeFromJSONTyped(json);
@@ -101,7 +101,9 @@ export declare enum UnprocessableEntityErrorCode {
101
101
  InvalidExternalAuth = "invalid_external_auth",
102
102
  InvalidChainAddressMatch = "invalid_chain_address_match",
103
103
  InvalidUpdate = "invalid_update",
104
- CannotDeleteLastProject = "cannot_delete_last_project"
104
+ CannotDeleteLastProject = "cannot_delete_last_project",
105
+ NoHdWalletFound = "no_hd_wallet_found",
106
+ WalletAccountExistsForChain = "wallet_account_exists_for_chain"
105
107
  }
106
108
  export declare function UnprocessableEntityErrorCodeFromJSON(json: any): UnprocessableEntityErrorCode;
107
109
  export declare function UnprocessableEntityErrorCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnprocessableEntityErrorCode;
@@ -105,6 +105,8 @@ var UnprocessableEntityErrorCode;
105
105
  UnprocessableEntityErrorCode["InvalidChainAddressMatch"] = "invalid_chain_address_match";
106
106
  UnprocessableEntityErrorCode["InvalidUpdate"] = "invalid_update";
107
107
  UnprocessableEntityErrorCode["CannotDeleteLastProject"] = "cannot_delete_last_project";
108
+ UnprocessableEntityErrorCode["NoHdWalletFound"] = "no_hd_wallet_found";
109
+ UnprocessableEntityErrorCode["WalletAccountExistsForChain"] = "wallet_account_exists_for_chain";
108
110
  })(UnprocessableEntityErrorCode || (UnprocessableEntityErrorCode = {}));
109
111
  function UnprocessableEntityErrorCodeFromJSON(json) {
110
112
  return UnprocessableEntityErrorCodeFromJSONTyped(json);
@@ -38,6 +38,7 @@ export * from './CreateTurnkeyEmbeddedWalletSpecificOpts';
38
38
  export * from './CreateUserEmbeddedWalletsFromFarcasterRequest';
39
39
  export * from './CreateUserEmbeddedWalletsRequest';
40
40
  export * from './CreateUserOauthRequest';
41
+ export * from './CreateWalletAccountRequest';
41
42
  export * from './CreateWalletRequest';
42
43
  export * from './Currency';
43
44
  export * from './CurrencyType';
@@ -267,8 +268,11 @@ export * from './TokenWithRaw';
267
268
  export * from './TokenWithRawProjectEnvironment';
268
269
  export * from './TokensResponse';
269
270
  export * from './TooManyRequests';
271
+ export * from './TurnkeyCreateWalletAccountsRequestBody';
272
+ export * from './TurnkeyCreateWalletAccountsRequestBodyParameters';
270
273
  export * from './TurnkeySignedRequest';
271
274
  export * from './TurnkeyStamp';
275
+ export * from './TurnkeyWalletAccount';
272
276
  export * from './TurnkeyWalletProperties';
273
277
  export * from './Unauthorized';
274
278
  export * from './UnprocessableEntity';