@dynamic-labs/sdk-api-core 0.0.431 → 0.0.433
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 +1 -1
- package/src/apis/SDKApi.cjs +115 -0
- package/src/apis/SDKApi.d.ts +54 -1
- package/src/apis/SDKApi.js +116 -1
- package/src/index.cjs +20 -0
- package/src/index.js +3 -2
- package/src/models/Provider.cjs +11 -0
- package/src/models/Provider.d.ts +14 -0
- package/src/models/Provider.js +12 -1
- package/src/models/TokenBalance.cjs +47 -0
- package/src/models/TokenBalance.d.ts +69 -0
- package/src/models/TokenBalance.js +41 -0
- package/src/models/UnprocessableEntityErrorCode.cjs +1 -0
- package/src/models/UnprocessableEntityErrorCode.d.ts +2 -1
- package/src/models/UnprocessableEntityErrorCode.js +1 -0
- package/src/models/index.d.ts +1 -0
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -72,6 +72,7 @@ require('../models/SocialSignInProviderEnum.cjs');
|
|
|
72
72
|
require('../models/SdkViewSectionAlignment.cjs');
|
|
73
73
|
require('../models/SdkViewSectionType.cjs');
|
|
74
74
|
require('../models/SdkViewType.cjs');
|
|
75
|
+
require('../models/Provider.cjs');
|
|
75
76
|
var PublishEvents = require('../models/PublishEvents.cjs');
|
|
76
77
|
require('../models/PublishEventsEvents.cjs');
|
|
77
78
|
var SdkSettingsRequest = require('../models/SdkSettingsRequest.cjs');
|
|
@@ -80,6 +81,7 @@ var SmsVerificationCreateResponse = require('../models/SmsVerificationCreateResp
|
|
|
80
81
|
var SmsVerificationRetryRequest = require('../models/SmsVerificationRetryRequest.cjs');
|
|
81
82
|
var SmsVerificationVerifyRequest = require('../models/SmsVerificationVerifyRequest.cjs');
|
|
82
83
|
var SupportedOnrampsResponse = require('../models/SupportedOnrampsResponse.cjs');
|
|
84
|
+
var TokenBalance = require('../models/TokenBalance.cjs');
|
|
83
85
|
require('../models/UnprocessableEntityErrorCode.cjs');
|
|
84
86
|
var UpdateRecoveryEmailRequest = require('../models/UpdateRecoveryEmailRequest.cjs');
|
|
85
87
|
var UpdateSelfResponse = require('../models/UpdateSelfResponse.cjs');
|
|
@@ -848,6 +850,91 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
848
850
|
yield this.farcasterSignInOptionsRaw(requestParameters, initOverrides);
|
|
849
851
|
});
|
|
850
852
|
}
|
|
853
|
+
/**
|
|
854
|
+
* Get the token balances for an account
|
|
855
|
+
*/
|
|
856
|
+
getAccountBalancesRaw(requestParameters, initOverrides) {
|
|
857
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
858
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
859
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAccountBalances.');
|
|
860
|
+
}
|
|
861
|
+
if (requestParameters.chainName === null || requestParameters.chainName === undefined) {
|
|
862
|
+
throw new runtime.RequiredError('chainName', 'Required parameter requestParameters.chainName was null or undefined when calling getAccountBalances.');
|
|
863
|
+
}
|
|
864
|
+
if (requestParameters.networkId === null || requestParameters.networkId === undefined) {
|
|
865
|
+
throw new runtime.RequiredError('networkId', 'Required parameter requestParameters.networkId was null or undefined when calling getAccountBalances.');
|
|
866
|
+
}
|
|
867
|
+
if (requestParameters.accountAddress === null || requestParameters.accountAddress === undefined) {
|
|
868
|
+
throw new runtime.RequiredError('accountAddress', 'Required parameter requestParameters.accountAddress was null or undefined when calling getAccountBalances.');
|
|
869
|
+
}
|
|
870
|
+
const queryParameters = {};
|
|
871
|
+
if (requestParameters.networkId !== undefined) {
|
|
872
|
+
queryParameters['networkId'] = requestParameters.networkId;
|
|
873
|
+
}
|
|
874
|
+
if (requestParameters.accountAddress !== undefined) {
|
|
875
|
+
queryParameters['accountAddress'] = requestParameters.accountAddress;
|
|
876
|
+
}
|
|
877
|
+
const headerParameters = {};
|
|
878
|
+
const response = yield this.request({
|
|
879
|
+
path: `/sdk/{environmentId}/chains/{chainName}/balances`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"chainName"}}`, encodeURIComponent(String(requestParameters.chainName))),
|
|
880
|
+
method: 'GET',
|
|
881
|
+
headers: headerParameters,
|
|
882
|
+
query: queryParameters,
|
|
883
|
+
}, initOverrides);
|
|
884
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TokenBalance.TokenBalanceFromJSON));
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Get the token balances for an account
|
|
889
|
+
*/
|
|
890
|
+
getAccountBalances(requestParameters, initOverrides) {
|
|
891
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
892
|
+
const response = yield this.getAccountBalancesRaw(requestParameters, initOverrides);
|
|
893
|
+
return yield response.value();
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Options call for this endpoint
|
|
898
|
+
*/
|
|
899
|
+
getAccountBalancesOptionsRaw(requestParameters, initOverrides) {
|
|
900
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
901
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
902
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAccountBalancesOptions.');
|
|
903
|
+
}
|
|
904
|
+
if (requestParameters.chainName === null || requestParameters.chainName === undefined) {
|
|
905
|
+
throw new runtime.RequiredError('chainName', 'Required parameter requestParameters.chainName was null or undefined when calling getAccountBalancesOptions.');
|
|
906
|
+
}
|
|
907
|
+
if (requestParameters.networkId === null || requestParameters.networkId === undefined) {
|
|
908
|
+
throw new runtime.RequiredError('networkId', 'Required parameter requestParameters.networkId was null or undefined when calling getAccountBalancesOptions.');
|
|
909
|
+
}
|
|
910
|
+
if (requestParameters.accountAddress === null || requestParameters.accountAddress === undefined) {
|
|
911
|
+
throw new runtime.RequiredError('accountAddress', 'Required parameter requestParameters.accountAddress was null or undefined when calling getAccountBalancesOptions.');
|
|
912
|
+
}
|
|
913
|
+
const queryParameters = {};
|
|
914
|
+
if (requestParameters.networkId !== undefined) {
|
|
915
|
+
queryParameters['networkId'] = requestParameters.networkId;
|
|
916
|
+
}
|
|
917
|
+
if (requestParameters.accountAddress !== undefined) {
|
|
918
|
+
queryParameters['accountAddress'] = requestParameters.accountAddress;
|
|
919
|
+
}
|
|
920
|
+
const headerParameters = {};
|
|
921
|
+
const response = yield this.request({
|
|
922
|
+
path: `/sdk/{environmentId}/chains/{chainName}/balances`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"chainName"}}`, encodeURIComponent(String(requestParameters.chainName))),
|
|
923
|
+
method: 'OPTIONS',
|
|
924
|
+
headers: headerParameters,
|
|
925
|
+
query: queryParameters,
|
|
926
|
+
}, initOverrides);
|
|
927
|
+
return new runtime.VoidApiResponse(response);
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Options call for this endpoint
|
|
932
|
+
*/
|
|
933
|
+
getAccountBalancesOptions(requestParameters, initOverrides) {
|
|
934
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
935
|
+
yield this.getAccountBalancesOptionsRaw(requestParameters, initOverrides);
|
|
936
|
+
});
|
|
937
|
+
}
|
|
851
938
|
/**
|
|
852
939
|
* Get auth token for given embedded wallet type
|
|
853
940
|
*/
|
|
@@ -3810,5 +3897,33 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3810
3897
|
});
|
|
3811
3898
|
}
|
|
3812
3899
|
}
|
|
3900
|
+
/**
|
|
3901
|
+
* @export
|
|
3902
|
+
* @enum {string}
|
|
3903
|
+
*/
|
|
3904
|
+
exports.GetAccountBalancesChainNameEnum = void 0;
|
|
3905
|
+
(function (GetAccountBalancesChainNameEnum) {
|
|
3906
|
+
GetAccountBalancesChainNameEnum["Evm"] = "EVM";
|
|
3907
|
+
})(exports.GetAccountBalancesChainNameEnum || (exports.GetAccountBalancesChainNameEnum = {}));
|
|
3908
|
+
/**
|
|
3909
|
+
* @export
|
|
3910
|
+
* @enum {string}
|
|
3911
|
+
*/
|
|
3912
|
+
exports.GetAccountBalancesNetworkIdEnum = void 0;
|
|
3913
|
+
(function (GetAccountBalancesNetworkIdEnum) {
|
|
3914
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_1"] = 1] = "NUMBER_1";
|
|
3915
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_10"] = 10] = "NUMBER_10";
|
|
3916
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_137"] = 137] = "NUMBER_137";
|
|
3917
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_42161"] = 42161] = "NUMBER_42161";
|
|
3918
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_8453"] = 8453] = "NUMBER_8453";
|
|
3919
|
+
})(exports.GetAccountBalancesNetworkIdEnum || (exports.GetAccountBalancesNetworkIdEnum = {}));
|
|
3920
|
+
/**
|
|
3921
|
+
* @export
|
|
3922
|
+
* @enum {string}
|
|
3923
|
+
*/
|
|
3924
|
+
exports.GetAccountBalancesOptionsChainNameEnum = void 0;
|
|
3925
|
+
(function (GetAccountBalancesOptionsChainNameEnum) {
|
|
3926
|
+
GetAccountBalancesOptionsChainNameEnum["Evm"] = "EVM";
|
|
3927
|
+
})(exports.GetAccountBalancesOptionsChainNameEnum || (exports.GetAccountBalancesOptionsChainNameEnum = {}));
|
|
3813
3928
|
|
|
3814
3929
|
exports.SDKApi = SDKApi;
|
package/src/apis/SDKApi.d.ts
CHANGED
|
@@ -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, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, FarcasterSignInRequest, FarcasterSignInResponse, GetUserPasskeysResponse, HealthcheckResponse, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthRecoveryDevicePostRequest, MFAAuthResponse, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, SdkSettingsRequest, SdkUser, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SupportedOnrampsResponse, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UserFields, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
|
|
13
|
+
import { CompletePasskeyRecoveryRequest, ConnectRequest, CreateEmbeddedWalletsRequest, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExportEmbeddedWalletResponse, FarcasterSignInRequest, FarcasterSignInResponse, GetUserPasskeysResponse, HealthcheckResponse, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, JwksResponse, MFAAuthRecoveryDevicePostRequest, MFAAuthResponse, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFARegenRecoveryCodesResponse, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, NetworkConfigurationResponse, NonceResponse, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, SdkSettingsRequest, SdkUser, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SupportedOnrampsResponse, TokenBalance, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UserFields, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest } from '../models';
|
|
14
14
|
export interface AuthMfaRecoveryRequest {
|
|
15
15
|
environmentId: string;
|
|
16
16
|
mFAAuthRecoveryDevicePostRequest: MFAAuthRecoveryDevicePostRequest;
|
|
@@ -94,6 +94,18 @@ export interface FarcasterSignInOperationRequest {
|
|
|
94
94
|
export interface FarcasterSignInOptionsRequest {
|
|
95
95
|
environmentId: string;
|
|
96
96
|
}
|
|
97
|
+
export interface GetAccountBalancesRequest {
|
|
98
|
+
environmentId: string;
|
|
99
|
+
chainName: GetAccountBalancesChainNameEnum;
|
|
100
|
+
networkId: GetAccountBalancesNetworkIdEnum;
|
|
101
|
+
accountAddress: string;
|
|
102
|
+
}
|
|
103
|
+
export interface GetAccountBalancesOptionsRequest {
|
|
104
|
+
environmentId: string;
|
|
105
|
+
chainName: GetAccountBalancesOptionsChainNameEnum;
|
|
106
|
+
networkId: number;
|
|
107
|
+
accountAddress: string;
|
|
108
|
+
}
|
|
97
109
|
export interface GetAuthTokenRequest {
|
|
98
110
|
environmentId: string;
|
|
99
111
|
type?: EmbeddedWalletAuthType;
|
|
@@ -625,6 +637,22 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
625
637
|
* Options call for this endpoint
|
|
626
638
|
*/
|
|
627
639
|
farcasterSignInOptions(requestParameters: FarcasterSignInOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
640
|
+
/**
|
|
641
|
+
* Get the token balances for an account
|
|
642
|
+
*/
|
|
643
|
+
getAccountBalancesRaw(requestParameters: GetAccountBalancesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<TokenBalance>>>;
|
|
644
|
+
/**
|
|
645
|
+
* Get the token balances for an account
|
|
646
|
+
*/
|
|
647
|
+
getAccountBalances(requestParameters: GetAccountBalancesRequest, initOverrides?: RequestInit): Promise<Array<TokenBalance>>;
|
|
648
|
+
/**
|
|
649
|
+
* Options call for this endpoint
|
|
650
|
+
*/
|
|
651
|
+
getAccountBalancesOptionsRaw(requestParameters: GetAccountBalancesOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
|
|
652
|
+
/**
|
|
653
|
+
* Options call for this endpoint
|
|
654
|
+
*/
|
|
655
|
+
getAccountBalancesOptions(requestParameters: GetAccountBalancesOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
628
656
|
/**
|
|
629
657
|
* Get auth token for given embedded wallet type
|
|
630
658
|
*/
|
|
@@ -1382,3 +1410,28 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
1382
1410
|
*/
|
|
1383
1411
|
verifyUnlinkOptions(requestParameters: VerifyUnlinkOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
1384
1412
|
}
|
|
1413
|
+
/**
|
|
1414
|
+
* @export
|
|
1415
|
+
* @enum {string}
|
|
1416
|
+
*/
|
|
1417
|
+
export declare enum GetAccountBalancesChainNameEnum {
|
|
1418
|
+
Evm = "EVM"
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* @export
|
|
1422
|
+
* @enum {string}
|
|
1423
|
+
*/
|
|
1424
|
+
export declare enum GetAccountBalancesNetworkIdEnum {
|
|
1425
|
+
NUMBER_1 = 1,
|
|
1426
|
+
NUMBER_10 = 10,
|
|
1427
|
+
NUMBER_137 = 137,
|
|
1428
|
+
NUMBER_42161 = 42161,
|
|
1429
|
+
NUMBER_8453 = 8453
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* @export
|
|
1433
|
+
* @enum {string}
|
|
1434
|
+
*/
|
|
1435
|
+
export declare enum GetAccountBalancesOptionsChainNameEnum {
|
|
1436
|
+
Evm = "EVM"
|
|
1437
|
+
}
|
package/src/apis/SDKApi.js
CHANGED
|
@@ -68,6 +68,7 @@ import '../models/SocialSignInProviderEnum.js';
|
|
|
68
68
|
import '../models/SdkViewSectionAlignment.js';
|
|
69
69
|
import '../models/SdkViewSectionType.js';
|
|
70
70
|
import '../models/SdkViewType.js';
|
|
71
|
+
import '../models/Provider.js';
|
|
71
72
|
import { PublishEventsToJSON } from '../models/PublishEvents.js';
|
|
72
73
|
import '../models/PublishEventsEvents.js';
|
|
73
74
|
import { SdkSettingsRequestToJSON } from '../models/SdkSettingsRequest.js';
|
|
@@ -76,6 +77,7 @@ import { SmsVerificationCreateResponseFromJSON } from '../models/SmsVerification
|
|
|
76
77
|
import { SmsVerificationRetryRequestToJSON } from '../models/SmsVerificationRetryRequest.js';
|
|
77
78
|
import { SmsVerificationVerifyRequestToJSON } from '../models/SmsVerificationVerifyRequest.js';
|
|
78
79
|
import { SupportedOnrampsResponseFromJSON } from '../models/SupportedOnrampsResponse.js';
|
|
80
|
+
import { TokenBalanceFromJSON } from '../models/TokenBalance.js';
|
|
79
81
|
import '../models/UnprocessableEntityErrorCode.js';
|
|
80
82
|
import { UpdateRecoveryEmailRequestToJSON } from '../models/UpdateRecoveryEmailRequest.js';
|
|
81
83
|
import { UpdateSelfResponseFromJSON } from '../models/UpdateSelfResponse.js';
|
|
@@ -844,6 +846,91 @@ class SDKApi extends BaseAPI {
|
|
|
844
846
|
yield this.farcasterSignInOptionsRaw(requestParameters, initOverrides);
|
|
845
847
|
});
|
|
846
848
|
}
|
|
849
|
+
/**
|
|
850
|
+
* Get the token balances for an account
|
|
851
|
+
*/
|
|
852
|
+
getAccountBalancesRaw(requestParameters, initOverrides) {
|
|
853
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
854
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
855
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAccountBalances.');
|
|
856
|
+
}
|
|
857
|
+
if (requestParameters.chainName === null || requestParameters.chainName === undefined) {
|
|
858
|
+
throw new RequiredError('chainName', 'Required parameter requestParameters.chainName was null or undefined when calling getAccountBalances.');
|
|
859
|
+
}
|
|
860
|
+
if (requestParameters.networkId === null || requestParameters.networkId === undefined) {
|
|
861
|
+
throw new RequiredError('networkId', 'Required parameter requestParameters.networkId was null or undefined when calling getAccountBalances.');
|
|
862
|
+
}
|
|
863
|
+
if (requestParameters.accountAddress === null || requestParameters.accountAddress === undefined) {
|
|
864
|
+
throw new RequiredError('accountAddress', 'Required parameter requestParameters.accountAddress was null or undefined when calling getAccountBalances.');
|
|
865
|
+
}
|
|
866
|
+
const queryParameters = {};
|
|
867
|
+
if (requestParameters.networkId !== undefined) {
|
|
868
|
+
queryParameters['networkId'] = requestParameters.networkId;
|
|
869
|
+
}
|
|
870
|
+
if (requestParameters.accountAddress !== undefined) {
|
|
871
|
+
queryParameters['accountAddress'] = requestParameters.accountAddress;
|
|
872
|
+
}
|
|
873
|
+
const headerParameters = {};
|
|
874
|
+
const response = yield this.request({
|
|
875
|
+
path: `/sdk/{environmentId}/chains/{chainName}/balances`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"chainName"}}`, encodeURIComponent(String(requestParameters.chainName))),
|
|
876
|
+
method: 'GET',
|
|
877
|
+
headers: headerParameters,
|
|
878
|
+
query: queryParameters,
|
|
879
|
+
}, initOverrides);
|
|
880
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(TokenBalanceFromJSON));
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Get the token balances for an account
|
|
885
|
+
*/
|
|
886
|
+
getAccountBalances(requestParameters, initOverrides) {
|
|
887
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
888
|
+
const response = yield this.getAccountBalancesRaw(requestParameters, initOverrides);
|
|
889
|
+
return yield response.value();
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Options call for this endpoint
|
|
894
|
+
*/
|
|
895
|
+
getAccountBalancesOptionsRaw(requestParameters, initOverrides) {
|
|
896
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
897
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
898
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getAccountBalancesOptions.');
|
|
899
|
+
}
|
|
900
|
+
if (requestParameters.chainName === null || requestParameters.chainName === undefined) {
|
|
901
|
+
throw new RequiredError('chainName', 'Required parameter requestParameters.chainName was null or undefined when calling getAccountBalancesOptions.');
|
|
902
|
+
}
|
|
903
|
+
if (requestParameters.networkId === null || requestParameters.networkId === undefined) {
|
|
904
|
+
throw new RequiredError('networkId', 'Required parameter requestParameters.networkId was null or undefined when calling getAccountBalancesOptions.');
|
|
905
|
+
}
|
|
906
|
+
if (requestParameters.accountAddress === null || requestParameters.accountAddress === undefined) {
|
|
907
|
+
throw new RequiredError('accountAddress', 'Required parameter requestParameters.accountAddress was null or undefined when calling getAccountBalancesOptions.');
|
|
908
|
+
}
|
|
909
|
+
const queryParameters = {};
|
|
910
|
+
if (requestParameters.networkId !== undefined) {
|
|
911
|
+
queryParameters['networkId'] = requestParameters.networkId;
|
|
912
|
+
}
|
|
913
|
+
if (requestParameters.accountAddress !== undefined) {
|
|
914
|
+
queryParameters['accountAddress'] = requestParameters.accountAddress;
|
|
915
|
+
}
|
|
916
|
+
const headerParameters = {};
|
|
917
|
+
const response = yield this.request({
|
|
918
|
+
path: `/sdk/{environmentId}/chains/{chainName}/balances`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"chainName"}}`, encodeURIComponent(String(requestParameters.chainName))),
|
|
919
|
+
method: 'OPTIONS',
|
|
920
|
+
headers: headerParameters,
|
|
921
|
+
query: queryParameters,
|
|
922
|
+
}, initOverrides);
|
|
923
|
+
return new VoidApiResponse(response);
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* Options call for this endpoint
|
|
928
|
+
*/
|
|
929
|
+
getAccountBalancesOptions(requestParameters, initOverrides) {
|
|
930
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
931
|
+
yield this.getAccountBalancesOptionsRaw(requestParameters, initOverrides);
|
|
932
|
+
});
|
|
933
|
+
}
|
|
847
934
|
/**
|
|
848
935
|
* Get auth token for given embedded wallet type
|
|
849
936
|
*/
|
|
@@ -3806,5 +3893,33 @@ class SDKApi extends BaseAPI {
|
|
|
3806
3893
|
});
|
|
3807
3894
|
}
|
|
3808
3895
|
}
|
|
3896
|
+
/**
|
|
3897
|
+
* @export
|
|
3898
|
+
* @enum {string}
|
|
3899
|
+
*/
|
|
3900
|
+
var GetAccountBalancesChainNameEnum;
|
|
3901
|
+
(function (GetAccountBalancesChainNameEnum) {
|
|
3902
|
+
GetAccountBalancesChainNameEnum["Evm"] = "EVM";
|
|
3903
|
+
})(GetAccountBalancesChainNameEnum || (GetAccountBalancesChainNameEnum = {}));
|
|
3904
|
+
/**
|
|
3905
|
+
* @export
|
|
3906
|
+
* @enum {string}
|
|
3907
|
+
*/
|
|
3908
|
+
var GetAccountBalancesNetworkIdEnum;
|
|
3909
|
+
(function (GetAccountBalancesNetworkIdEnum) {
|
|
3910
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_1"] = 1] = "NUMBER_1";
|
|
3911
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_10"] = 10] = "NUMBER_10";
|
|
3912
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_137"] = 137] = "NUMBER_137";
|
|
3913
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_42161"] = 42161] = "NUMBER_42161";
|
|
3914
|
+
GetAccountBalancesNetworkIdEnum[GetAccountBalancesNetworkIdEnum["NUMBER_8453"] = 8453] = "NUMBER_8453";
|
|
3915
|
+
})(GetAccountBalancesNetworkIdEnum || (GetAccountBalancesNetworkIdEnum = {}));
|
|
3916
|
+
/**
|
|
3917
|
+
* @export
|
|
3918
|
+
* @enum {string}
|
|
3919
|
+
*/
|
|
3920
|
+
var GetAccountBalancesOptionsChainNameEnum;
|
|
3921
|
+
(function (GetAccountBalancesOptionsChainNameEnum) {
|
|
3922
|
+
GetAccountBalancesOptionsChainNameEnum["Evm"] = "EVM";
|
|
3923
|
+
})(GetAccountBalancesOptionsChainNameEnum || (GetAccountBalancesOptionsChainNameEnum = {}));
|
|
3809
3924
|
|
|
3810
|
-
export { SDKApi };
|
|
3925
|
+
export { GetAccountBalancesChainNameEnum, GetAccountBalancesNetworkIdEnum, GetAccountBalancesOptionsChainNameEnum, SDKApi };
|
package/src/index.cjs
CHANGED
|
@@ -150,6 +150,7 @@ var SupportedOnrampsResponse = require('./models/SupportedOnrampsResponse.cjs');
|
|
|
150
150
|
var SupportedSecurityMethod = require('./models/SupportedSecurityMethod.cjs');
|
|
151
151
|
var SupportedSecurityMethods = require('./models/SupportedSecurityMethods.cjs');
|
|
152
152
|
var TimeUnitEnum = require('./models/TimeUnitEnum.cjs');
|
|
153
|
+
var TokenBalance = require('./models/TokenBalance.cjs');
|
|
153
154
|
var TurnkeySignedRequest = require('./models/TurnkeySignedRequest.cjs');
|
|
154
155
|
var TurnkeyStamp = require('./models/TurnkeyStamp.cjs');
|
|
155
156
|
var TurnkeyWalletProperties = require('./models/TurnkeyWalletProperties.cjs');
|
|
@@ -188,6 +189,18 @@ exports.canConsumeForm = runtime.canConsumeForm;
|
|
|
188
189
|
exports.exists = runtime.exists;
|
|
189
190
|
exports.mapValues = runtime.mapValues;
|
|
190
191
|
exports.querystring = runtime.querystring;
|
|
192
|
+
Object.defineProperty(exports, 'GetAccountBalancesChainNameEnum', {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () { return SDKApi.GetAccountBalancesChainNameEnum; }
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(exports, 'GetAccountBalancesNetworkIdEnum', {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function () { return SDKApi.GetAccountBalancesNetworkIdEnum; }
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, 'GetAccountBalancesOptionsChainNameEnum', {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () { return SDKApi.GetAccountBalancesOptionsChainNameEnum; }
|
|
203
|
+
});
|
|
191
204
|
exports.SDKApi = SDKApi.SDKApi;
|
|
192
205
|
Object.defineProperty(exports, 'AuthModeEnum', {
|
|
193
206
|
enumerable: true,
|
|
@@ -614,6 +627,10 @@ exports.ProjectSettingsSdkWalletConnectToJSON = ProjectSettingsSdkWalletConnect.
|
|
|
614
627
|
exports.ProjectSettingsSecurityFromJSON = ProjectSettingsSecurity.ProjectSettingsSecurityFromJSON;
|
|
615
628
|
exports.ProjectSettingsSecurityFromJSONTyped = ProjectSettingsSecurity.ProjectSettingsSecurityFromJSONTyped;
|
|
616
629
|
exports.ProjectSettingsSecurityToJSON = ProjectSettingsSecurity.ProjectSettingsSecurityToJSON;
|
|
630
|
+
Object.defineProperty(exports, 'ProviderEntryPointVersionEnum', {
|
|
631
|
+
enumerable: true,
|
|
632
|
+
get: function () { return Provider.ProviderEntryPointVersionEnum; }
|
|
633
|
+
});
|
|
617
634
|
exports.ProviderFromJSON = Provider.ProviderFromJSON;
|
|
618
635
|
exports.ProviderFromJSONTyped = Provider.ProviderFromJSONTyped;
|
|
619
636
|
exports.ProviderToJSON = Provider.ProviderToJSON;
|
|
@@ -727,6 +744,9 @@ Object.defineProperty(exports, 'TimeUnitEnum', {
|
|
|
727
744
|
exports.TimeUnitEnumFromJSON = TimeUnitEnum.TimeUnitEnumFromJSON;
|
|
728
745
|
exports.TimeUnitEnumFromJSONTyped = TimeUnitEnum.TimeUnitEnumFromJSONTyped;
|
|
729
746
|
exports.TimeUnitEnumToJSON = TimeUnitEnum.TimeUnitEnumToJSON;
|
|
747
|
+
exports.TokenBalanceFromJSON = TokenBalance.TokenBalanceFromJSON;
|
|
748
|
+
exports.TokenBalanceFromJSONTyped = TokenBalance.TokenBalanceFromJSONTyped;
|
|
749
|
+
exports.TokenBalanceToJSON = TokenBalance.TokenBalanceToJSON;
|
|
730
750
|
exports.TurnkeySignedRequestFromJSON = TurnkeySignedRequest.TurnkeySignedRequestFromJSON;
|
|
731
751
|
exports.TurnkeySignedRequestFromJSONTyped = TurnkeySignedRequest.TurnkeySignedRequestFromJSONTyped;
|
|
732
752
|
exports.TurnkeySignedRequestToJSON = TurnkeySignedRequest.TurnkeySignedRequestToJSON;
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, JSONApiResponse, RequiredError, TextApiResponse, VoidApiResponse, canConsumeForm, exists, mapValues, querystring } from './runtime.js';
|
|
2
|
-
export { SDKApi } from './apis/SDKApi.js';
|
|
2
|
+
export { GetAccountBalancesChainNameEnum, GetAccountBalancesNetworkIdEnum, GetAccountBalancesOptionsChainNameEnum, SDKApi } from './apis/SDKApi.js';
|
|
3
3
|
export { AuthModeEnum, AuthModeEnumFromJSON, AuthModeEnumFromJSONTyped, AuthModeEnumToJSON } from './models/AuthModeEnum.js';
|
|
4
4
|
export { AuthenticatorTransportProtocol, AuthenticatorTransportProtocolFromJSON, AuthenticatorTransportProtocolFromJSONTyped, AuthenticatorTransportProtocolToJSON } from './models/AuthenticatorTransportProtocol.js';
|
|
5
5
|
export { BadRequestFromJSON, BadRequestFromJSONTyped, BadRequestToJSON } from './models/BadRequest.js';
|
|
@@ -119,7 +119,7 @@ export { ProjectSettingsSdkEmbeddedWalletsFromJSON, ProjectSettingsSdkEmbeddedWa
|
|
|
119
119
|
export { ProjectSettingsSdkSocialSignInFromJSON, ProjectSettingsSdkSocialSignInFromJSONTyped, ProjectSettingsSdkSocialSignInToJSON } from './models/ProjectSettingsSdkSocialSignIn.js';
|
|
120
120
|
export { ProjectSettingsSdkWalletConnectFromJSON, ProjectSettingsSdkWalletConnectFromJSONTyped, ProjectSettingsSdkWalletConnectToJSON } from './models/ProjectSettingsSdkWalletConnect.js';
|
|
121
121
|
export { ProjectSettingsSecurityFromJSON, ProjectSettingsSecurityFromJSONTyped, ProjectSettingsSecurityToJSON } from './models/ProjectSettingsSecurity.js';
|
|
122
|
-
export { ProviderFromJSON, ProviderFromJSONTyped, ProviderToJSON } from './models/Provider.js';
|
|
122
|
+
export { ProviderEntryPointVersionEnum, ProviderFromJSON, ProviderFromJSONTyped, ProviderToJSON } from './models/Provider.js';
|
|
123
123
|
export { ProviderAgreementFromJSON, ProviderAgreementFromJSONTyped, ProviderAgreementToJSON } from './models/ProviderAgreement.js';
|
|
124
124
|
export { ProviderEnum, ProviderEnumFromJSON, ProviderEnumFromJSONTyped, ProviderEnumToJSON } from './models/ProviderEnum.js';
|
|
125
125
|
export { PublishEventsFromJSON, PublishEventsFromJSONTyped, PublishEventsToJSON } from './models/PublishEvents.js';
|
|
@@ -146,6 +146,7 @@ export { SupportedOnrampsResponseFromJSON, SupportedOnrampsResponseFromJSONTyped
|
|
|
146
146
|
export { SupportedSecurityMethodFromJSON, SupportedSecurityMethodFromJSONTyped, SupportedSecurityMethodToJSON } from './models/SupportedSecurityMethod.js';
|
|
147
147
|
export { SupportedSecurityMethodsFromJSON, SupportedSecurityMethodsFromJSONTyped, SupportedSecurityMethodsToJSON } from './models/SupportedSecurityMethods.js';
|
|
148
148
|
export { TimeUnitEnum, TimeUnitEnumFromJSON, TimeUnitEnumFromJSONTyped, TimeUnitEnumToJSON } from './models/TimeUnitEnum.js';
|
|
149
|
+
export { TokenBalanceFromJSON, TokenBalanceFromJSONTyped, TokenBalanceToJSON } from './models/TokenBalance.js';
|
|
149
150
|
export { TurnkeySignedRequestFromJSON, TurnkeySignedRequestFromJSONTyped, TurnkeySignedRequestToJSON } from './models/TurnkeySignedRequest.js';
|
|
150
151
|
export { TurnkeyStampFromJSON, TurnkeyStampFromJSONTyped, TurnkeyStampToJSON } from './models/TurnkeyStamp.js';
|
|
151
152
|
export { TurnkeyWalletPropertiesFromJSON, TurnkeyWalletPropertiesFromJSONTyped, TurnkeyWalletPropertiesToJSON } from './models/TurnkeyWalletProperties.js';
|
package/src/models/Provider.cjs
CHANGED
|
@@ -8,6 +8,15 @@ var ProviderEnum = require('./ProviderEnum.cjs');
|
|
|
8
8
|
var SmsCountryCode = require('./SmsCountryCode.cjs');
|
|
9
9
|
|
|
10
10
|
/* tslint:disable */
|
|
11
|
+
/**
|
|
12
|
+
* @export
|
|
13
|
+
* @enum {string}
|
|
14
|
+
*/
|
|
15
|
+
exports.ProviderEntryPointVersionEnum = void 0;
|
|
16
|
+
(function (ProviderEntryPointVersionEnum) {
|
|
17
|
+
ProviderEntryPointVersionEnum["V6"] = "v6";
|
|
18
|
+
ProviderEntryPointVersionEnum["V7"] = "v7";
|
|
19
|
+
})(exports.ProviderEntryPointVersionEnum || (exports.ProviderEntryPointVersionEnum = {}));
|
|
11
20
|
function ProviderFromJSON(json) {
|
|
12
21
|
return ProviderFromJSONTyped(json);
|
|
13
22
|
}
|
|
@@ -33,6 +42,7 @@ function ProviderFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
42
|
'accountSid': !runtime.exists(json, 'accountSid') ? undefined : json['accountSid'],
|
|
34
43
|
'twilioNumber': !runtime.exists(json, 'twilioNumber') ? undefined : json['twilioNumber'],
|
|
35
44
|
'enabledCountries': !runtime.exists(json, 'enabledCountries') ? undefined : (json['enabledCountries'].map(SmsCountryCode.SmsCountryCodeFromJSON)),
|
|
45
|
+
'entryPointVersion': !runtime.exists(json, 'entryPointVersion') ? undefined : json['entryPointVersion'],
|
|
36
46
|
};
|
|
37
47
|
}
|
|
38
48
|
function ProviderToJSON(value) {
|
|
@@ -60,6 +70,7 @@ function ProviderToJSON(value) {
|
|
|
60
70
|
'accountSid': value.accountSid,
|
|
61
71
|
'twilioNumber': value.twilioNumber,
|
|
62
72
|
'enabledCountries': value.enabledCountries === undefined ? undefined : (value.enabledCountries.map(SmsCountryCode.SmsCountryCodeToJSON)),
|
|
73
|
+
'entryPointVersion': value.entryPointVersion,
|
|
63
74
|
};
|
|
64
75
|
}
|
|
65
76
|
|
package/src/models/Provider.d.ts
CHANGED
|
@@ -120,6 +120,20 @@ export interface Provider {
|
|
|
120
120
|
* @memberof Provider
|
|
121
121
|
*/
|
|
122
122
|
enabledCountries?: Array<SmsCountryCode>;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @type {string}
|
|
126
|
+
* @memberof Provider
|
|
127
|
+
*/
|
|
128
|
+
entryPointVersion?: ProviderEntryPointVersionEnum;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @export
|
|
132
|
+
* @enum {string}
|
|
133
|
+
*/
|
|
134
|
+
export declare enum ProviderEntryPointVersionEnum {
|
|
135
|
+
V6 = "v6",
|
|
136
|
+
V7 = "v7"
|
|
123
137
|
}
|
|
124
138
|
export declare function ProviderFromJSON(json: any): Provider;
|
|
125
139
|
export declare function ProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Provider;
|
package/src/models/Provider.js
CHANGED
|
@@ -4,6 +4,15 @@ import { ProviderEnumFromJSON, ProviderEnumToJSON } from './ProviderEnum.js';
|
|
|
4
4
|
import { SmsCountryCodeFromJSON, SmsCountryCodeToJSON } from './SmsCountryCode.js';
|
|
5
5
|
|
|
6
6
|
/* tslint:disable */
|
|
7
|
+
/**
|
|
8
|
+
* @export
|
|
9
|
+
* @enum {string}
|
|
10
|
+
*/
|
|
11
|
+
var ProviderEntryPointVersionEnum;
|
|
12
|
+
(function (ProviderEntryPointVersionEnum) {
|
|
13
|
+
ProviderEntryPointVersionEnum["V6"] = "v6";
|
|
14
|
+
ProviderEntryPointVersionEnum["V7"] = "v7";
|
|
15
|
+
})(ProviderEntryPointVersionEnum || (ProviderEntryPointVersionEnum = {}));
|
|
7
16
|
function ProviderFromJSON(json) {
|
|
8
17
|
return ProviderFromJSONTyped(json);
|
|
9
18
|
}
|
|
@@ -29,6 +38,7 @@ function ProviderFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
38
|
'accountSid': !exists(json, 'accountSid') ? undefined : json['accountSid'],
|
|
30
39
|
'twilioNumber': !exists(json, 'twilioNumber') ? undefined : json['twilioNumber'],
|
|
31
40
|
'enabledCountries': !exists(json, 'enabledCountries') ? undefined : (json['enabledCountries'].map(SmsCountryCodeFromJSON)),
|
|
41
|
+
'entryPointVersion': !exists(json, 'entryPointVersion') ? undefined : json['entryPointVersion'],
|
|
32
42
|
};
|
|
33
43
|
}
|
|
34
44
|
function ProviderToJSON(value) {
|
|
@@ -56,7 +66,8 @@ function ProviderToJSON(value) {
|
|
|
56
66
|
'accountSid': value.accountSid,
|
|
57
67
|
'twilioNumber': value.twilioNumber,
|
|
58
68
|
'enabledCountries': value.enabledCountries === undefined ? undefined : (value.enabledCountries.map(SmsCountryCodeToJSON)),
|
|
69
|
+
'entryPointVersion': value.entryPointVersion,
|
|
59
70
|
};
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
export { ProviderFromJSON, ProviderFromJSONTyped, ProviderToJSON };
|
|
73
|
+
export { ProviderEntryPointVersionEnum, ProviderFromJSON, ProviderFromJSONTyped, ProviderToJSON };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
function TokenBalanceFromJSON(json) {
|
|
9
|
+
return TokenBalanceFromJSONTyped(json);
|
|
10
|
+
}
|
|
11
|
+
function TokenBalanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
12
|
+
if ((json === undefined) || (json === null)) {
|
|
13
|
+
return json;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
'networkId': !runtime.exists(json, 'networkId') ? undefined : json['networkId'],
|
|
17
|
+
'address': json['address'],
|
|
18
|
+
'name': json['name'],
|
|
19
|
+
'symbol': json['symbol'],
|
|
20
|
+
'decimals': json['decimals'],
|
|
21
|
+
'logoURI': json['logoURI'],
|
|
22
|
+
'balance': json['balance'],
|
|
23
|
+
'rawBalance': json['rawBalance'],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function TokenBalanceToJSON(value) {
|
|
27
|
+
if (value === undefined) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
if (value === null) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'networkId': value.networkId,
|
|
35
|
+
'address': value.address,
|
|
36
|
+
'name': value.name,
|
|
37
|
+
'symbol': value.symbol,
|
|
38
|
+
'decimals': value.decimals,
|
|
39
|
+
'logoURI': value.logoURI,
|
|
40
|
+
'balance': value.balance,
|
|
41
|
+
'rawBalance': value.rawBalance,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.TokenBalanceFromJSON = TokenBalanceFromJSON;
|
|
46
|
+
exports.TokenBalanceFromJSONTyped = TokenBalanceFromJSONTyped;
|
|
47
|
+
exports.TokenBalanceToJSON = TokenBalanceToJSON;
|
|
@@ -0,0 +1,69 @@
|
|
|
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 TokenBalance
|
|
16
|
+
*/
|
|
17
|
+
export interface TokenBalance {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof TokenBalance
|
|
22
|
+
*/
|
|
23
|
+
networkId?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Valid blockchain wallet address, must be an alphanumeric string without any special characters
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof TokenBalance
|
|
28
|
+
*/
|
|
29
|
+
address: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof TokenBalance
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof TokenBalance
|
|
40
|
+
*/
|
|
41
|
+
symbol: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof TokenBalance
|
|
46
|
+
*/
|
|
47
|
+
decimals: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof TokenBalance
|
|
52
|
+
*/
|
|
53
|
+
logoURI: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof TokenBalance
|
|
58
|
+
*/
|
|
59
|
+
balance: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof TokenBalance
|
|
64
|
+
*/
|
|
65
|
+
rawBalance: number;
|
|
66
|
+
}
|
|
67
|
+
export declare function TokenBalanceFromJSON(json: any): TokenBalance;
|
|
68
|
+
export declare function TokenBalanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenBalance;
|
|
69
|
+
export declare function TokenBalanceToJSON(value?: TokenBalance | null): any;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
function TokenBalanceFromJSON(json) {
|
|
5
|
+
return TokenBalanceFromJSONTyped(json);
|
|
6
|
+
}
|
|
7
|
+
function TokenBalanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
8
|
+
if ((json === undefined) || (json === null)) {
|
|
9
|
+
return json;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
'networkId': !exists(json, 'networkId') ? undefined : json['networkId'],
|
|
13
|
+
'address': json['address'],
|
|
14
|
+
'name': json['name'],
|
|
15
|
+
'symbol': json['symbol'],
|
|
16
|
+
'decimals': json['decimals'],
|
|
17
|
+
'logoURI': json['logoURI'],
|
|
18
|
+
'balance': json['balance'],
|
|
19
|
+
'rawBalance': json['rawBalance'],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function TokenBalanceToJSON(value) {
|
|
23
|
+
if (value === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (value === null) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'networkId': value.networkId,
|
|
31
|
+
'address': value.address,
|
|
32
|
+
'name': value.name,
|
|
33
|
+
'symbol': value.symbol,
|
|
34
|
+
'decimals': value.decimals,
|
|
35
|
+
'logoURI': value.logoURI,
|
|
36
|
+
'balance': value.balance,
|
|
37
|
+
'rawBalance': value.rawBalance,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { TokenBalanceFromJSON, TokenBalanceFromJSONTyped, TokenBalanceToJSON };
|
|
@@ -93,6 +93,7 @@ exports.UnprocessableEntityErrorCode = void 0;
|
|
|
93
93
|
UnprocessableEntityErrorCode["MergeAccountsConfirmation"] = "merge_accounts_confirmation";
|
|
94
94
|
UnprocessableEntityErrorCode["MergeAccountsInvalid"] = "merge_accounts_invalid";
|
|
95
95
|
UnprocessableEntityErrorCode["InvalidWalletId"] = "invalid_wallet_id";
|
|
96
|
+
UnprocessableEntityErrorCode["UnableToFetchBalances"] = "unable_to_fetch_balances";
|
|
96
97
|
})(exports.UnprocessableEntityErrorCode || (exports.UnprocessableEntityErrorCode = {}));
|
|
97
98
|
function UnprocessableEntityErrorCodeFromJSON(json) {
|
|
98
99
|
return UnprocessableEntityErrorCodeFromJSONTyped(json);
|
|
@@ -85,7 +85,8 @@ export declare enum UnprocessableEntityErrorCode {
|
|
|
85
85
|
InvalidEmbeddedWalletChainsConfiguration = "invalid_embedded_wallet_chains_configuration",
|
|
86
86
|
MergeAccountsConfirmation = "merge_accounts_confirmation",
|
|
87
87
|
MergeAccountsInvalid = "merge_accounts_invalid",
|
|
88
|
-
InvalidWalletId = "invalid_wallet_id"
|
|
88
|
+
InvalidWalletId = "invalid_wallet_id",
|
|
89
|
+
UnableToFetchBalances = "unable_to_fetch_balances"
|
|
89
90
|
}
|
|
90
91
|
export declare function UnprocessableEntityErrorCodeFromJSON(json: any): UnprocessableEntityErrorCode;
|
|
91
92
|
export declare function UnprocessableEntityErrorCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnprocessableEntityErrorCode;
|
|
@@ -89,6 +89,7 @@ var UnprocessableEntityErrorCode;
|
|
|
89
89
|
UnprocessableEntityErrorCode["MergeAccountsConfirmation"] = "merge_accounts_confirmation";
|
|
90
90
|
UnprocessableEntityErrorCode["MergeAccountsInvalid"] = "merge_accounts_invalid";
|
|
91
91
|
UnprocessableEntityErrorCode["InvalidWalletId"] = "invalid_wallet_id";
|
|
92
|
+
UnprocessableEntityErrorCode["UnableToFetchBalances"] = "unable_to_fetch_balances";
|
|
92
93
|
})(UnprocessableEntityErrorCode || (UnprocessableEntityErrorCode = {}));
|
|
93
94
|
function UnprocessableEntityErrorCodeFromJSON(json) {
|
|
94
95
|
return UnprocessableEntityErrorCodeFromJSONTyped(json);
|
package/src/models/index.d.ts
CHANGED
|
@@ -144,6 +144,7 @@ export * from './SupportedOnrampsResponse';
|
|
|
144
144
|
export * from './SupportedSecurityMethod';
|
|
145
145
|
export * from './SupportedSecurityMethods';
|
|
146
146
|
export * from './TimeUnitEnum';
|
|
147
|
+
export * from './TokenBalance';
|
|
147
148
|
export * from './TurnkeySignedRequest';
|
|
148
149
|
export * from './TurnkeyStamp';
|
|
149
150
|
export * from './TurnkeyWalletProperties';
|