@dynamic-labs/sdk-api-core 0.0.673 → 0.0.674

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-core",
3
- "version": "0.0.673",
3
+ "version": "0.0.674",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../../_virtual/_tslib.cjs');
6
6
  var runtime = require('../runtime.cjs');
7
+ var Account = require('../models/Account.cjs');
7
8
  require('../models/AttestationConveyancePreference.cjs');
8
9
  require('../models/AuthModeEnum.cjs');
9
10
  require('../models/AuthStorageEnum.cjs');
@@ -52,6 +53,7 @@ var EmbeddedWalletSecret = require('../models/EmbeddedWalletSecret.cjs');
52
53
  var SdkUser = require('../models/SdkUser.cjs');
53
54
  require('../models/EmbeddedWalletSecurityMethod.cjs');
54
55
  require('../models/EnvironmentEnum.cjs');
56
+ require('../models/ExchangeKeyEnum.cjs');
55
57
  var ExportEmbeddedWalletResponse = require('../models/ExportEmbeddedWalletResponse.cjs');
56
58
  var ExportWaasWalletPrivateKeyRequest = require('../models/ExportWaasWalletPrivateKeyRequest.cjs');
57
59
  var ExternalAuthSigninRequest = require('../models/ExternalAuthSigninRequest.cjs');
@@ -1927,6 +1929,74 @@ class SDKApi extends runtime.BaseAPI {
1927
1929
  return yield response.value();
1928
1930
  });
1929
1931
  }
1932
+ /**
1933
+ * Get the coinbase accounts for a given dynamic user
1934
+ */
1935
+ getCoinbaseUserAccountsRaw(requestParameters, initOverrides) {
1936
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1937
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1938
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCoinbaseUserAccounts.');
1939
+ }
1940
+ if (requestParameters.exchangeKey === null || requestParameters.exchangeKey === undefined) {
1941
+ throw new runtime.RequiredError('exchangeKey', 'Required parameter requestParameters.exchangeKey was null or undefined when calling getCoinbaseUserAccounts.');
1942
+ }
1943
+ const queryParameters = {};
1944
+ const headerParameters = {};
1945
+ if (this.configuration && this.configuration.accessToken) {
1946
+ const token = this.configuration.accessToken;
1947
+ const tokenString = yield token("bearerAuth", []);
1948
+ if (tokenString) {
1949
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1950
+ }
1951
+ }
1952
+ const response = yield this.request({
1953
+ path: `/sdk/{environmentId}/exchange/{exchangeKey}/accounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"exchangeKey"}}`, encodeURIComponent(String(requestParameters.exchangeKey))),
1954
+ method: 'GET',
1955
+ headers: headerParameters,
1956
+ query: queryParameters,
1957
+ }, initOverrides);
1958
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(Account.AccountFromJSON));
1959
+ });
1960
+ }
1961
+ /**
1962
+ * Get the coinbase accounts for a given dynamic user
1963
+ */
1964
+ getCoinbaseUserAccounts(requestParameters, initOverrides) {
1965
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1966
+ const response = yield this.getCoinbaseUserAccountsRaw(requestParameters, initOverrides);
1967
+ return yield response.value();
1968
+ });
1969
+ }
1970
+ /**
1971
+ * Options call for this endpoint
1972
+ */
1973
+ getCoinbaseUserAccountsOptionsRaw(requestParameters, initOverrides) {
1974
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1975
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1976
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCoinbaseUserAccountsOptions.');
1977
+ }
1978
+ if (requestParameters.exchangeKey === null || requestParameters.exchangeKey === undefined) {
1979
+ throw new runtime.RequiredError('exchangeKey', 'Required parameter requestParameters.exchangeKey was null or undefined when calling getCoinbaseUserAccountsOptions.');
1980
+ }
1981
+ const queryParameters = {};
1982
+ const headerParameters = {};
1983
+ const response = yield this.request({
1984
+ path: `/sdk/{environmentId}/exchange/{exchangeKey}/accounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"exchangeKey"}}`, encodeURIComponent(String(requestParameters.exchangeKey))),
1985
+ method: 'OPTIONS',
1986
+ headers: headerParameters,
1987
+ query: queryParameters,
1988
+ }, initOverrides);
1989
+ return new runtime.VoidApiResponse(response);
1990
+ });
1991
+ }
1992
+ /**
1993
+ * Options call for this endpoint
1994
+ */
1995
+ getCoinbaseUserAccountsOptions(requestParameters, initOverrides) {
1996
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
1997
+ yield this.getCoinbaseUserAccountsOptionsRaw(requestParameters, initOverrides);
1998
+ });
1999
+ }
1930
2000
  /**
1931
2001
  * Generates the turnkey request body for a user\'s create wallet account request
1932
2002
  * Generates the turnkey request body for a user\'s create wallet account request
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { BackupMultipleClientKeySharesRequest, BackupMultipleClientKeySharesResponse, ChainEnum, CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, CreateWaasAccountRequest, CreateWalletAccountRequest, Currency, DeleteEmbeddedWalletsRequest, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletChainEnum, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, ExportWaasWalletPrivateKeyRequest, ExternalAuthSigninRequest, FarcasterSignInRequest, GetUserPasskeysResponse, GlobalWalletSettings, HealthcheckResponse, ImportWaasPrivateKeyRequest, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthPasskeyDeviceGetResponse, MFAAuthPasskeyDevicePostRequest, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterPasskeyDeviceGetResponse, MFARegisterPasskeyDevicePostRequest, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, OpenRoomResponse, OpenRoomResponseForReshare, OpenRoomResponseWithServerKeygenIds, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RecoverMultipleClientKeySharesRequest, RecoverMultipleClientKeySharesResponse, RegisterEmbeddedWalletSessionKeyResponse, RegisterSessionKeyRequest, ReshareRequest, ScanWebsiteUrlRequest, ScanWebsiteUrlResponse, SdkSettingsRequest, SdkUser, SignMessageWithWaasRequest, SimulateEVMTransactionRequest, SimulateSVMTransactionRequest, SimulateTransactionResponse, SimulateUserOpRequest, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SolanaTransactionOptimizationRequest, SolanaTransactionOptimizationResponse, SupportedOfframpsResponse, SupportedOnrampsResponse, TelegramPostRequest, TokenBalance, TurnkeyCreateWalletAccountsRequestBody, TurnkeyDeleteEmbeddedWalletsRequestBody, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UpgradeEmbeddedWalletToV2Request, UserFields, UserFieldsCheckParams, UserFieldsCheckResponse, UserOauthAccessTokenResponse, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
13
+ import { Account, BackupMultipleClientKeySharesRequest, BackupMultipleClientKeySharesResponse, ChainEnum, CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, CreateWaasAccountRequest, CreateWalletAccountRequest, Currency, DeleteEmbeddedWalletsRequest, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletChainEnum, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExchangeKeyEnum, ExportEmbeddedWalletResponse, ExportWaasWalletPrivateKeyRequest, ExternalAuthSigninRequest, FarcasterSignInRequest, GetUserPasskeysResponse, GlobalWalletSettings, HealthcheckResponse, ImportWaasPrivateKeyRequest, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthPasskeyDeviceGetResponse, MFAAuthPasskeyDevicePostRequest, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterPasskeyDeviceGetResponse, MFARegisterPasskeyDevicePostRequest, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, OpenRoomResponse, OpenRoomResponseForReshare, OpenRoomResponseWithServerKeygenIds, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RecoverMultipleClientKeySharesRequest, RecoverMultipleClientKeySharesResponse, RegisterEmbeddedWalletSessionKeyResponse, RegisterSessionKeyRequest, ReshareRequest, ScanWebsiteUrlRequest, ScanWebsiteUrlResponse, SdkSettingsRequest, SdkUser, SignMessageWithWaasRequest, SimulateEVMTransactionRequest, SimulateSVMTransactionRequest, SimulateTransactionResponse, SimulateUserOpRequest, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SolanaTransactionOptimizationRequest, SolanaTransactionOptimizationResponse, SupportedOfframpsResponse, SupportedOnrampsResponse, TelegramPostRequest, TokenBalance, TurnkeyCreateWalletAccountsRequestBody, TurnkeyDeleteEmbeddedWalletsRequestBody, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UpgradeEmbeddedWalletToV2Request, UserFields, UserFieldsCheckParams, UserFieldsCheckResponse, UserOauthAccessTokenResponse, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
14
14
  export interface AuthMfaPasskeyDeviceRequest {
15
15
  environmentId: string;
16
16
  mFAAuthPasskeyDevicePostRequest: MFAAuthPasskeyDevicePostRequest;
@@ -213,6 +213,14 @@ export interface GetAuthenticatedUserRequest {
213
213
  export interface GetCoinbaseSupportedNetworksRequest {
214
214
  environmentId: string;
215
215
  }
216
+ export interface GetCoinbaseUserAccountsRequest {
217
+ environmentId: string;
218
+ exchangeKey: ExchangeKeyEnum;
219
+ }
220
+ export interface GetCoinbaseUserAccountsOptionsRequest {
221
+ environmentId: string;
222
+ exchangeKey: ExchangeKeyEnum;
223
+ }
216
224
  export interface GetCreateWalletAccountRequestRequest {
217
225
  environmentId: string;
218
226
  chain: EmbeddedWalletChainEnum;
@@ -1192,6 +1200,22 @@ export declare class SDKApi extends runtime.BaseAPI {
1192
1200
  * Get Coinbase supported networks
1193
1201
  */
1194
1202
  getCoinbaseSupportedNetworks(requestParameters: GetCoinbaseSupportedNetworksRequest, initOverrides?: RequestInit): Promise<Array<string>>;
1203
+ /**
1204
+ * Get the coinbase accounts for a given dynamic user
1205
+ */
1206
+ getCoinbaseUserAccountsRaw(requestParameters: GetCoinbaseUserAccountsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Account>>>;
1207
+ /**
1208
+ * Get the coinbase accounts for a given dynamic user
1209
+ */
1210
+ getCoinbaseUserAccounts(requestParameters: GetCoinbaseUserAccountsRequest, initOverrides?: RequestInit): Promise<Array<Account>>;
1211
+ /**
1212
+ * Options call for this endpoint
1213
+ */
1214
+ getCoinbaseUserAccountsOptionsRaw(requestParameters: GetCoinbaseUserAccountsOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
1215
+ /**
1216
+ * Options call for this endpoint
1217
+ */
1218
+ getCoinbaseUserAccountsOptions(requestParameters: GetCoinbaseUserAccountsOptionsRequest, initOverrides?: RequestInit): Promise<void>;
1195
1219
  /**
1196
1220
  * Generates the turnkey request body for a user\'s create wallet account request
1197
1221
  * Generates the turnkey request body for a user\'s create wallet account request
@@ -1,5 +1,6 @@
1
1
  import { __awaiter } from '../../_virtual/_tslib.js';
2
2
  import { BaseAPI, RequiredError, JSONApiResponse, VoidApiResponse, TextApiResponse, canConsumeForm } from '../runtime.js';
3
+ import { AccountFromJSON } from '../models/Account.js';
3
4
  import '../models/AttestationConveyancePreference.js';
4
5
  import '../models/AuthModeEnum.js';
5
6
  import '../models/AuthStorageEnum.js';
@@ -48,6 +49,7 @@ import { EmbeddedWalletSecretFromJSON } from '../models/EmbeddedWalletSecret.js'
48
49
  import { SdkUserFromJSON } from '../models/SdkUser.js';
49
50
  import '../models/EmbeddedWalletSecurityMethod.js';
50
51
  import '../models/EnvironmentEnum.js';
52
+ import '../models/ExchangeKeyEnum.js';
51
53
  import { ExportEmbeddedWalletResponseFromJSON } from '../models/ExportEmbeddedWalletResponse.js';
52
54
  import { ExportWaasWalletPrivateKeyRequestToJSON } from '../models/ExportWaasWalletPrivateKeyRequest.js';
53
55
  import { ExternalAuthSigninRequestToJSON } from '../models/ExternalAuthSigninRequest.js';
@@ -1923,6 +1925,74 @@ class SDKApi extends BaseAPI {
1923
1925
  return yield response.value();
1924
1926
  });
1925
1927
  }
1928
+ /**
1929
+ * Get the coinbase accounts for a given dynamic user
1930
+ */
1931
+ getCoinbaseUserAccountsRaw(requestParameters, initOverrides) {
1932
+ return __awaiter(this, void 0, void 0, function* () {
1933
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1934
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCoinbaseUserAccounts.');
1935
+ }
1936
+ if (requestParameters.exchangeKey === null || requestParameters.exchangeKey === undefined) {
1937
+ throw new RequiredError('exchangeKey', 'Required parameter requestParameters.exchangeKey was null or undefined when calling getCoinbaseUserAccounts.');
1938
+ }
1939
+ const queryParameters = {};
1940
+ const headerParameters = {};
1941
+ if (this.configuration && this.configuration.accessToken) {
1942
+ const token = this.configuration.accessToken;
1943
+ const tokenString = yield token("bearerAuth", []);
1944
+ if (tokenString) {
1945
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1946
+ }
1947
+ }
1948
+ const response = yield this.request({
1949
+ path: `/sdk/{environmentId}/exchange/{exchangeKey}/accounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"exchangeKey"}}`, encodeURIComponent(String(requestParameters.exchangeKey))),
1950
+ method: 'GET',
1951
+ headers: headerParameters,
1952
+ query: queryParameters,
1953
+ }, initOverrides);
1954
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(AccountFromJSON));
1955
+ });
1956
+ }
1957
+ /**
1958
+ * Get the coinbase accounts for a given dynamic user
1959
+ */
1960
+ getCoinbaseUserAccounts(requestParameters, initOverrides) {
1961
+ return __awaiter(this, void 0, void 0, function* () {
1962
+ const response = yield this.getCoinbaseUserAccountsRaw(requestParameters, initOverrides);
1963
+ return yield response.value();
1964
+ });
1965
+ }
1966
+ /**
1967
+ * Options call for this endpoint
1968
+ */
1969
+ getCoinbaseUserAccountsOptionsRaw(requestParameters, initOverrides) {
1970
+ return __awaiter(this, void 0, void 0, function* () {
1971
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1972
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getCoinbaseUserAccountsOptions.');
1973
+ }
1974
+ if (requestParameters.exchangeKey === null || requestParameters.exchangeKey === undefined) {
1975
+ throw new RequiredError('exchangeKey', 'Required parameter requestParameters.exchangeKey was null or undefined when calling getCoinbaseUserAccountsOptions.');
1976
+ }
1977
+ const queryParameters = {};
1978
+ const headerParameters = {};
1979
+ const response = yield this.request({
1980
+ path: `/sdk/{environmentId}/exchange/{exchangeKey}/accounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"exchangeKey"}}`, encodeURIComponent(String(requestParameters.exchangeKey))),
1981
+ method: 'OPTIONS',
1982
+ headers: headerParameters,
1983
+ query: queryParameters,
1984
+ }, initOverrides);
1985
+ return new VoidApiResponse(response);
1986
+ });
1987
+ }
1988
+ /**
1989
+ * Options call for this endpoint
1990
+ */
1991
+ getCoinbaseUserAccountsOptions(requestParameters, initOverrides) {
1992
+ return __awaiter(this, void 0, void 0, function* () {
1993
+ yield this.getCoinbaseUserAccountsOptionsRaw(requestParameters, initOverrides);
1994
+ });
1995
+ }
1926
1996
  /**
1927
1997
  * Generates the turnkey request body for a user\'s create wallet account request
1928
1998
  * Generates the turnkey request body for a user\'s create wallet account request
package/src/index.cjs CHANGED
@@ -4,6 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var runtime = require('./runtime.cjs');
6
6
  var SDKApi = require('./apis/SDKApi.cjs');
7
+ var Account = require('./models/Account.cjs');
8
+ var AccountBalances = require('./models/AccountBalances.cjs');
7
9
  var Asset = require('./models/Asset.cjs');
8
10
  var AssetDiff = require('./models/AssetDiff.cjs');
9
11
  var AssetExposure = require('./models/AssetExposure.cjs');
@@ -66,6 +68,7 @@ var EmbeddedWalletSecurityMethod = require('./models/EmbeddedWalletSecurityMetho
66
68
  var EmbeddedWalletVersionEnum = require('./models/EmbeddedWalletVersionEnum.cjs');
67
69
  var EnvironmentEnum = require('./models/EnvironmentEnum.cjs');
68
70
  var ErrorMessageWithCode = require('./models/ErrorMessageWithCode.cjs');
71
+ var ExchangeKeyEnum = require('./models/ExchangeKeyEnum.cjs');
69
72
  var ExportEmbeddedWalletResponse = require('./models/ExportEmbeddedWalletResponse.cjs');
70
73
  var ExportWaasWalletPrivateKeyRequest = require('./models/ExportWaasWalletPrivateKeyRequest.cjs');
71
74
  var ExternalAuth = require('./models/ExternalAuth.cjs');
@@ -300,6 +303,12 @@ exports.exists = runtime.exists;
300
303
  exports.mapValues = runtime.mapValues;
301
304
  exports.querystring = runtime.querystring;
302
305
  exports.SDKApi = SDKApi.SDKApi;
306
+ exports.AccountFromJSON = Account.AccountFromJSON;
307
+ exports.AccountFromJSONTyped = Account.AccountFromJSONTyped;
308
+ exports.AccountToJSON = Account.AccountToJSON;
309
+ exports.AccountBalancesFromJSON = AccountBalances.AccountBalancesFromJSON;
310
+ exports.AccountBalancesFromJSONTyped = AccountBalances.AccountBalancesFromJSONTyped;
311
+ exports.AccountBalancesToJSON = AccountBalances.AccountBalancesToJSON;
303
312
  exports.AssetFromJSON = Asset.AssetFromJSON;
304
313
  exports.AssetFromJSONTyped = Asset.AssetFromJSONTyped;
305
314
  exports.AssetToJSON = Asset.AssetToJSON;
@@ -546,6 +555,13 @@ exports.EnvironmentEnumToJSON = EnvironmentEnum.EnvironmentEnumToJSON;
546
555
  exports.ErrorMessageWithCodeFromJSON = ErrorMessageWithCode.ErrorMessageWithCodeFromJSON;
547
556
  exports.ErrorMessageWithCodeFromJSONTyped = ErrorMessageWithCode.ErrorMessageWithCodeFromJSONTyped;
548
557
  exports.ErrorMessageWithCodeToJSON = ErrorMessageWithCode.ErrorMessageWithCodeToJSON;
558
+ Object.defineProperty(exports, 'ExchangeKeyEnum', {
559
+ enumerable: true,
560
+ get: function () { return ExchangeKeyEnum.ExchangeKeyEnum; }
561
+ });
562
+ exports.ExchangeKeyEnumFromJSON = ExchangeKeyEnum.ExchangeKeyEnumFromJSON;
563
+ exports.ExchangeKeyEnumFromJSONTyped = ExchangeKeyEnum.ExchangeKeyEnumFromJSONTyped;
564
+ exports.ExchangeKeyEnumToJSON = ExchangeKeyEnum.ExchangeKeyEnumToJSON;
549
565
  exports.ExportEmbeddedWalletResponseFromJSON = ExportEmbeddedWalletResponse.ExportEmbeddedWalletResponseFromJSON;
550
566
  exports.ExportEmbeddedWalletResponseFromJSONTyped = ExportEmbeddedWalletResponse.ExportEmbeddedWalletResponseFromJSONTyped;
551
567
  exports.ExportEmbeddedWalletResponseToJSON = ExportEmbeddedWalletResponse.ExportEmbeddedWalletResponseToJSON;
package/src/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  export { BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, JSONApiResponse, RequiredError, TextApiResponse, VoidApiResponse, canConsumeForm, exists, mapValues, querystring } from './runtime.js';
2
2
  export { SDKApi } from './apis/SDKApi.js';
3
+ export { AccountFromJSON, AccountFromJSONTyped, AccountToJSON } from './models/Account.js';
4
+ export { AccountBalancesFromJSON, AccountBalancesFromJSONTyped, AccountBalancesToJSON } from './models/AccountBalances.js';
3
5
  export { AssetFromJSON, AssetFromJSONTyped, AssetToJSON } from './models/Asset.js';
4
6
  export { AssetDiffFromJSON, AssetDiffFromJSONTyped, AssetDiffToJSON } from './models/AssetDiff.js';
5
7
  export { AssetExposureFromJSON, AssetExposureFromJSONTyped, AssetExposureToJSON } from './models/AssetExposure.js';
@@ -62,6 +64,7 @@ export { EmbeddedWalletSecurityMethod, EmbeddedWalletSecurityMethodFromJSON, Emb
62
64
  export { EmbeddedWalletVersionEnum, EmbeddedWalletVersionEnumFromJSON, EmbeddedWalletVersionEnumFromJSONTyped, EmbeddedWalletVersionEnumToJSON } from './models/EmbeddedWalletVersionEnum.js';
63
65
  export { EnvironmentEnum, EnvironmentEnumFromJSON, EnvironmentEnumFromJSONTyped, EnvironmentEnumToJSON } from './models/EnvironmentEnum.js';
64
66
  export { ErrorMessageWithCodeFromJSON, ErrorMessageWithCodeFromJSONTyped, ErrorMessageWithCodeToJSON } from './models/ErrorMessageWithCode.js';
67
+ export { ExchangeKeyEnum, ExchangeKeyEnumFromJSON, ExchangeKeyEnumFromJSONTyped, ExchangeKeyEnumToJSON } from './models/ExchangeKeyEnum.js';
65
68
  export { ExportEmbeddedWalletResponseFromJSON, ExportEmbeddedWalletResponseFromJSONTyped, ExportEmbeddedWalletResponseToJSON } from './models/ExportEmbeddedWalletResponse.js';
66
69
  export { ExportWaasWalletPrivateKeyRequestFromJSON, ExportWaasWalletPrivateKeyRequestFromJSONTyped, ExportWaasWalletPrivateKeyRequestToJSON } from './models/ExportWaasWalletPrivateKeyRequest.js';
67
70
  export { ExternalAuthFromJSON, ExternalAuthFromJSONTyped, ExternalAuthToJSON } from './models/ExternalAuth.js';
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+ var AccountBalances = require('./AccountBalances.cjs');
7
+ var ExchangeKeyEnum = require('./ExchangeKeyEnum.cjs');
8
+
9
+ /* tslint:disable */
10
+ function AccountFromJSON(json) {
11
+ return AccountFromJSONTyped(json);
12
+ }
13
+ function AccountFromJSONTyped(json, ignoreDiscriminator) {
14
+ if ((json === undefined) || (json === null)) {
15
+ return json;
16
+ }
17
+ return {
18
+ 'id': json['id'],
19
+ 'exchange': ExchangeKeyEnum.ExchangeKeyEnumFromJSON(json['exchange']),
20
+ 'type': !runtime.exists(json, 'type') ? undefined : json['type'],
21
+ 'balances': (json['balances'].map(AccountBalances.AccountBalancesFromJSON)),
22
+ 'name': !runtime.exists(json, 'name') ? undefined : json['name'],
23
+ 'chain': !runtime.exists(json, 'chain') ? undefined : json['chain'],
24
+ };
25
+ }
26
+ function AccountToJSON(value) {
27
+ if (value === undefined) {
28
+ return undefined;
29
+ }
30
+ if (value === null) {
31
+ return null;
32
+ }
33
+ return {
34
+ 'id': value.id,
35
+ 'exchange': ExchangeKeyEnum.ExchangeKeyEnumToJSON(value.exchange),
36
+ 'type': value.type,
37
+ 'balances': (value.balances.map(AccountBalances.AccountBalancesToJSON)),
38
+ 'name': value.name,
39
+ 'chain': value.chain,
40
+ };
41
+ }
42
+
43
+ exports.AccountFromJSON = AccountFromJSON;
44
+ exports.AccountFromJSONTyped = AccountFromJSONTyped;
45
+ exports.AccountToJSON = AccountToJSON;
@@ -0,0 +1,59 @@
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 { AccountBalances } from './AccountBalances';
13
+ import { ExchangeKeyEnum } from './ExchangeKeyEnum';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface Account
18
+ */
19
+ export interface Account {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof Account
24
+ */
25
+ id: string;
26
+ /**
27
+ *
28
+ * @type {ExchangeKeyEnum}
29
+ * @memberof Account
30
+ */
31
+ exchange: ExchangeKeyEnum;
32
+ /**
33
+ * Account type as reported by the exchange
34
+ * @type {string}
35
+ * @memberof Account
36
+ */
37
+ type?: string;
38
+ /**
39
+ *
40
+ * @type {Array<AccountBalances>}
41
+ * @memberof Account
42
+ */
43
+ balances: Array<AccountBalances>;
44
+ /**
45
+ * Human-friendly label if supplied by the exchange.
46
+ * @type {string}
47
+ * @memberof Account
48
+ */
49
+ name?: string;
50
+ /**
51
+ * Blockchain network if relevant
52
+ * @type {string}
53
+ * @memberof Account
54
+ */
55
+ chain?: string;
56
+ }
57
+ export declare function AccountFromJSON(json: any): Account;
58
+ export declare function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Account;
59
+ export declare function AccountToJSON(value?: Account | null): any;
@@ -0,0 +1,39 @@
1
+ import { exists } from '../runtime.js';
2
+ import { AccountBalancesFromJSON, AccountBalancesToJSON } from './AccountBalances.js';
3
+ import { ExchangeKeyEnumFromJSON, ExchangeKeyEnumToJSON } from './ExchangeKeyEnum.js';
4
+
5
+ /* tslint:disable */
6
+ function AccountFromJSON(json) {
7
+ return AccountFromJSONTyped(json);
8
+ }
9
+ function AccountFromJSONTyped(json, ignoreDiscriminator) {
10
+ if ((json === undefined) || (json === null)) {
11
+ return json;
12
+ }
13
+ return {
14
+ 'id': json['id'],
15
+ 'exchange': ExchangeKeyEnumFromJSON(json['exchange']),
16
+ 'type': !exists(json, 'type') ? undefined : json['type'],
17
+ 'balances': (json['balances'].map(AccountBalancesFromJSON)),
18
+ 'name': !exists(json, 'name') ? undefined : json['name'],
19
+ 'chain': !exists(json, 'chain') ? undefined : json['chain'],
20
+ };
21
+ }
22
+ function AccountToJSON(value) {
23
+ if (value === undefined) {
24
+ return undefined;
25
+ }
26
+ if (value === null) {
27
+ return null;
28
+ }
29
+ return {
30
+ 'id': value.id,
31
+ 'exchange': ExchangeKeyEnumToJSON(value.exchange),
32
+ 'type': value.type,
33
+ 'balances': (value.balances.map(AccountBalancesToJSON)),
34
+ 'name': value.name,
35
+ 'chain': value.chain,
36
+ };
37
+ }
38
+
39
+ export { AccountFromJSON, AccountFromJSONTyped, AccountToJSON };
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+
7
+ /* tslint:disable */
8
+ function AccountBalancesFromJSON(json) {
9
+ return AccountBalancesFromJSONTyped(json);
10
+ }
11
+ function AccountBalancesFromJSONTyped(json, ignoreDiscriminator) {
12
+ if ((json === undefined) || (json === null)) {
13
+ return json;
14
+ }
15
+ return {
16
+ 'currency': json['currency'],
17
+ 'balance': json['balance'],
18
+ 'availableBalance': !runtime.exists(json, 'availableBalance') ? undefined : json['availableBalance'],
19
+ };
20
+ }
21
+ function AccountBalancesToJSON(value) {
22
+ if (value === undefined) {
23
+ return undefined;
24
+ }
25
+ if (value === null) {
26
+ return null;
27
+ }
28
+ return {
29
+ 'currency': value.currency,
30
+ 'balance': value.balance,
31
+ 'availableBalance': value.availableBalance,
32
+ };
33
+ }
34
+
35
+ exports.AccountBalancesFromJSON = AccountBalancesFromJSON;
36
+ exports.AccountBalancesFromJSONTyped = AccountBalancesFromJSONTyped;
37
+ exports.AccountBalancesToJSON = AccountBalancesToJSON;
@@ -0,0 +1,39 @@
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 AccountBalances
16
+ */
17
+ export interface AccountBalances {
18
+ /**
19
+ * Chain symbol that funds are denominated in.
20
+ * @type {string}
21
+ * @memberof AccountBalances
22
+ */
23
+ currency: string;
24
+ /**
25
+ * amount held in associated currency
26
+ * @type {number}
27
+ * @memberof AccountBalances
28
+ */
29
+ balance: number;
30
+ /**
31
+ * Funds immediately available for withdrawal or trading
32
+ * @type {number}
33
+ * @memberof AccountBalances
34
+ */
35
+ availableBalance?: number;
36
+ }
37
+ export declare function AccountBalancesFromJSON(json: any): AccountBalances;
38
+ export declare function AccountBalancesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBalances;
39
+ export declare function AccountBalancesToJSON(value?: AccountBalances | null): any;
@@ -0,0 +1,31 @@
1
+ import { exists } from '../runtime.js';
2
+
3
+ /* tslint:disable */
4
+ function AccountBalancesFromJSON(json) {
5
+ return AccountBalancesFromJSONTyped(json);
6
+ }
7
+ function AccountBalancesFromJSONTyped(json, ignoreDiscriminator) {
8
+ if ((json === undefined) || (json === null)) {
9
+ return json;
10
+ }
11
+ return {
12
+ 'currency': json['currency'],
13
+ 'balance': json['balance'],
14
+ 'availableBalance': !exists(json, 'availableBalance') ? undefined : json['availableBalance'],
15
+ };
16
+ }
17
+ function AccountBalancesToJSON(value) {
18
+ if (value === undefined) {
19
+ return undefined;
20
+ }
21
+ if (value === null) {
22
+ return null;
23
+ }
24
+ return {
25
+ 'currency': value.currency,
26
+ 'balance': value.balance,
27
+ 'availableBalance': value.availableBalance,
28
+ };
29
+ }
30
+
31
+ export { AccountBalancesFromJSON, AccountBalancesFromJSONTyped, AccountBalancesToJSON };
@@ -0,0 +1,39 @@
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
+ /**
19
+ * Source exchange identifier
20
+ * @export
21
+ * @enum {string}
22
+ */
23
+ exports.ExchangeKeyEnum = void 0;
24
+ (function (ExchangeKeyEnum) {
25
+ ExchangeKeyEnum["Coinbase"] = "coinbase";
26
+ })(exports.ExchangeKeyEnum || (exports.ExchangeKeyEnum = {}));
27
+ function ExchangeKeyEnumFromJSON(json) {
28
+ return ExchangeKeyEnumFromJSONTyped(json);
29
+ }
30
+ function ExchangeKeyEnumFromJSONTyped(json, ignoreDiscriminator) {
31
+ return json;
32
+ }
33
+ function ExchangeKeyEnumToJSON(value) {
34
+ return value;
35
+ }
36
+
37
+ exports.ExchangeKeyEnumFromJSON = ExchangeKeyEnumFromJSON;
38
+ exports.ExchangeKeyEnumFromJSONTyped = ExchangeKeyEnumFromJSONTyped;
39
+ exports.ExchangeKeyEnumToJSON = ExchangeKeyEnumToJSON;
@@ -0,0 +1,22 @@
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
+ * Source exchange identifier
14
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum ExchangeKeyEnum {
18
+ Coinbase = "coinbase"
19
+ }
20
+ export declare function ExchangeKeyEnumFromJSON(json: any): ExchangeKeyEnum;
21
+ export declare function ExchangeKeyEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeKeyEnum;
22
+ export declare function ExchangeKeyEnumToJSON(value?: ExchangeKeyEnum | null): any;
@@ -0,0 +1,33 @@
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
+ /**
15
+ * Source exchange identifier
16
+ * @export
17
+ * @enum {string}
18
+ */
19
+ var ExchangeKeyEnum;
20
+ (function (ExchangeKeyEnum) {
21
+ ExchangeKeyEnum["Coinbase"] = "coinbase";
22
+ })(ExchangeKeyEnum || (ExchangeKeyEnum = {}));
23
+ function ExchangeKeyEnumFromJSON(json) {
24
+ return ExchangeKeyEnumFromJSONTyped(json);
25
+ }
26
+ function ExchangeKeyEnumFromJSONTyped(json, ignoreDiscriminator) {
27
+ return json;
28
+ }
29
+ function ExchangeKeyEnumToJSON(value) {
30
+ return value;
31
+ }
32
+
33
+ export { ExchangeKeyEnum, ExchangeKeyEnumFromJSON, ExchangeKeyEnumFromJSONTyped, ExchangeKeyEnumToJSON };
@@ -22,6 +22,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
22
22
  */
23
23
  exports.UnprocessableEntityErrorCode = void 0;
24
24
  (function (UnprocessableEntityErrorCode) {
25
+ UnprocessableEntityErrorCode["InvalidExchangeProvider"] = "invalid_exchange_provider";
25
26
  UnprocessableEntityErrorCode["InvalidEmail"] = "invalid_email";
26
27
  UnprocessableEntityErrorCode["EmailAlreadyExists"] = "email_already_exists";
27
28
  UnprocessableEntityErrorCode["AllowlistAlreadyExists"] = "allowlist_already_exists";
@@ -15,6 +15,7 @@
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum UnprocessableEntityErrorCode {
18
+ InvalidExchangeProvider = "invalid_exchange_provider",
18
19
  InvalidEmail = "invalid_email",
19
20
  EmailAlreadyExists = "email_already_exists",
20
21
  AllowlistAlreadyExists = "allowlist_already_exists",
@@ -18,6 +18,7 @@
18
18
  */
19
19
  var UnprocessableEntityErrorCode;
20
20
  (function (UnprocessableEntityErrorCode) {
21
+ UnprocessableEntityErrorCode["InvalidExchangeProvider"] = "invalid_exchange_provider";
21
22
  UnprocessableEntityErrorCode["InvalidEmail"] = "invalid_email";
22
23
  UnprocessableEntityErrorCode["EmailAlreadyExists"] = "email_already_exists";
23
24
  UnprocessableEntityErrorCode["AllowlistAlreadyExists"] = "allowlist_already_exists";
@@ -1,3 +1,5 @@
1
+ export * from './Account';
2
+ export * from './AccountBalances';
1
3
  export * from './Asset';
2
4
  export * from './AssetDiff';
3
5
  export * from './AssetExposure';
@@ -60,6 +62,7 @@ export * from './EmbeddedWalletSecurityMethod';
60
62
  export * from './EmbeddedWalletVersionEnum';
61
63
  export * from './EnvironmentEnum';
62
64
  export * from './ErrorMessageWithCode';
65
+ export * from './ExchangeKeyEnum';
63
66
  export * from './ExportEmbeddedWalletResponse';
64
67
  export * from './ExportWaasWalletPrivateKeyRequest';
65
68
  export * from './ExternalAuth';