@dynamic-labs/sdk-api-core 0.0.910 → 0.0.912
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 +129 -0
- package/src/apis/SDKApi.d.ts +51 -1
- package/src/apis/SDKApi.js +129 -0
- package/src/apis/WaasApi.cjs +4 -0
- package/src/apis/WaasApi.js +4 -0
- package/src/index.cjs +88 -20
- package/src/index.js +19 -6
- package/src/models/BackupKeySharesToLocationsPendingResponse.cjs +55 -0
- package/src/models/BackupKeySharesToLocationsPendingResponse.d.ts +46 -0
- package/src/models/BackupKeySharesToLocationsPendingResponse.js +49 -0
- package/src/models/BackupKeySharesToLocationsRequest.cjs +3 -0
- package/src/models/BackupKeySharesToLocationsRequest.d.ts +6 -0
- package/src/models/BackupKeySharesToLocationsRequest.js +3 -0
- package/src/models/BackupKeySharesToLocationsResponse.cjs +12 -0
- package/src/models/BackupKeySharesToLocationsResponse.d.ts +14 -0
- package/src/models/BackupKeySharesToLocationsResponse.js +13 -1
- package/src/models/CheckoutTransaction.cjs +5 -5
- package/src/models/CheckoutTransaction.d.ts +5 -5
- package/src/models/CheckoutTransaction.js +5 -5
- package/src/models/CheckoutTransactionCreateRequest.cjs +2 -2
- package/src/models/CheckoutTransactionCreateRequest.d.ts +2 -2
- package/src/models/CheckoutTransactionCreateRequest.js +2 -2
- package/src/models/{CheckoutEvmApprovalData.cjs → SwapEvmApprovalData.cjs} +7 -7
- package/src/models/{CheckoutEvmApprovalData.d.ts → SwapEvmApprovalData.d.ts} +8 -8
- package/src/models/{CheckoutEvmApprovalData.js → SwapEvmApprovalData.js} +5 -5
- package/src/models/SwapEvmTransactionData.cjs +47 -0
- package/src/models/SwapEvmTransactionData.d.ts +69 -0
- package/src/models/SwapEvmTransactionData.js +41 -0
- package/src/models/SwapFee.cjs +42 -0
- package/src/models/SwapFee.d.ts +52 -0
- package/src/models/SwapFee.js +36 -0
- package/src/models/SwapGasCost.cjs +38 -0
- package/src/models/SwapGasCost.d.ts +40 -0
- package/src/models/SwapGasCost.js +32 -0
- package/src/models/{CheckoutPsbtTransactionData.cjs → SwapPsbtTransactionData.cjs} +7 -7
- package/src/models/SwapPsbtTransactionData.d.ts +27 -0
- package/src/models/{CheckoutPsbtTransactionData.js → SwapPsbtTransactionData.js} +5 -5
- package/src/models/SwapQuoteRequest.cjs +51 -0
- package/src/models/SwapQuoteRequest.d.ts +60 -0
- package/src/models/SwapQuoteRequest.js +45 -0
- package/src/models/SwapQuoteRequestSide.cjs +42 -0
- package/src/models/SwapQuoteRequestSide.d.ts +52 -0
- package/src/models/SwapQuoteRequestSide.js +36 -0
- package/src/models/SwapQuoteResponse.cjs +51 -0
- package/src/models/SwapQuoteResponse.d.ts +73 -0
- package/src/models/SwapQuoteResponse.js +45 -0
- package/src/models/SwapQuoteResponseSide.cjs +42 -0
- package/src/models/SwapQuoteResponseSide.d.ts +52 -0
- package/src/models/SwapQuoteResponseSide.js +36 -0
- package/src/models/{CheckoutSerializedTransactionData.cjs → SwapSerializedTransactionData.cjs} +7 -7
- package/src/models/SwapSerializedTransactionData.d.ts +27 -0
- package/src/models/{CheckoutSerializedTransactionData.js → SwapSerializedTransactionData.js} +5 -5
- package/src/models/SwapSigningPayload.cjs +48 -0
- package/src/models/SwapSigningPayload.d.ts +62 -0
- package/src/models/SwapSigningPayload.js +42 -0
- package/src/models/SwapStatusRequest.cjs +38 -0
- package/src/models/SwapStatusRequest.d.ts +40 -0
- package/src/models/SwapStatusRequest.js +32 -0
- package/src/models/SwapStatusRequestChain.cjs +36 -0
- package/src/models/SwapStatusRequestChain.d.ts +34 -0
- package/src/models/SwapStatusRequestChain.js +30 -0
- package/src/models/SwapStatusResponse.cjs +56 -0
- package/src/models/SwapStatusResponse.d.ts +73 -0
- package/src/models/SwapStatusResponse.js +50 -0
- package/src/models/SwapStep.cjs +48 -0
- package/src/models/SwapStep.d.ts +66 -0
- package/src/models/SwapStep.js +42 -0
- package/src/models/SwapStepSide.cjs +40 -0
- package/src/models/SwapStepSide.d.ts +46 -0
- package/src/models/SwapStepSide.js +34 -0
- package/src/models/SwapToken.cjs +47 -0
- package/src/models/SwapToken.d.ts +69 -0
- package/src/models/SwapToken.js +41 -0
- package/src/models/index.d.ts +18 -5
- package/src/models/CheckoutEvmTransactionData.cjs +0 -39
- package/src/models/CheckoutEvmTransactionData.d.ts +0 -45
- package/src/models/CheckoutEvmTransactionData.js +0 -33
- package/src/models/CheckoutPsbtTransactionData.d.ts +0 -27
- package/src/models/CheckoutSerializedTransactionData.d.ts +0 -27
- package/src/models/CheckoutSigningPayload.cjs +0 -48
- package/src/models/CheckoutSigningPayload.d.ts +0 -62
- package/src/models/CheckoutSigningPayload.js +0 -42
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
var ChainEnum = require('./ChainEnum.cjs');
|
|
7
|
+
|
|
8
|
+
/* tslint:disable */
|
|
9
|
+
function SwapQuoteRequestSideFromJSON(json) {
|
|
10
|
+
return SwapQuoteRequestSideFromJSONTyped(json);
|
|
11
|
+
}
|
|
12
|
+
function SwapQuoteRequestSideFromJSONTyped(json, ignoreDiscriminator) {
|
|
13
|
+
if ((json === undefined) || (json === null)) {
|
|
14
|
+
return json;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
'address': json['address'],
|
|
18
|
+
'amount': !runtime.exists(json, 'amount') ? undefined : json['amount'],
|
|
19
|
+
'chainId': json['chainId'],
|
|
20
|
+
'chainName': ChainEnum.ChainEnumFromJSON(json['chainName']),
|
|
21
|
+
'tokenAddress': json['tokenAddress'],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function SwapQuoteRequestSideToJSON(value) {
|
|
25
|
+
if (value === undefined) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
if (value === null) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'address': value.address,
|
|
33
|
+
'amount': value.amount,
|
|
34
|
+
'chainId': value.chainId,
|
|
35
|
+
'chainName': ChainEnum.ChainEnumToJSON(value.chainName),
|
|
36
|
+
'tokenAddress': value.tokenAddress,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.SwapQuoteRequestSideFromJSON = SwapQuoteRequestSideFromJSON;
|
|
41
|
+
exports.SwapQuoteRequestSideFromJSONTyped = SwapQuoteRequestSideFromJSONTyped;
|
|
42
|
+
exports.SwapQuoteRequestSideToJSON = SwapQuoteRequestSideToJSON;
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { ChainEnum } from './ChainEnum';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SwapQuoteRequestSide
|
|
17
|
+
*/
|
|
18
|
+
export interface SwapQuoteRequestSide {
|
|
19
|
+
/**
|
|
20
|
+
* Valid blockchain wallet address, must be an alphanumeric string without any special characters
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SwapQuoteRequestSide
|
|
23
|
+
*/
|
|
24
|
+
address: string;
|
|
25
|
+
/**
|
|
26
|
+
* Token amount in raw units. Only one side (from or to) should specify an amount.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SwapQuoteRequestSide
|
|
29
|
+
*/
|
|
30
|
+
amount?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SwapQuoteRequestSide
|
|
35
|
+
*/
|
|
36
|
+
chainId: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {ChainEnum}
|
|
40
|
+
* @memberof SwapQuoteRequestSide
|
|
41
|
+
*/
|
|
42
|
+
chainName: ChainEnum;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof SwapQuoteRequestSide
|
|
47
|
+
*/
|
|
48
|
+
tokenAddress: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function SwapQuoteRequestSideFromJSON(json: any): SwapQuoteRequestSide;
|
|
51
|
+
export declare function SwapQuoteRequestSideFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteRequestSide;
|
|
52
|
+
export declare function SwapQuoteRequestSideToJSON(value?: SwapQuoteRequestSide | null): any;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
import { ChainEnumFromJSON, ChainEnumToJSON } from './ChainEnum.js';
|
|
3
|
+
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
function SwapQuoteRequestSideFromJSON(json) {
|
|
6
|
+
return SwapQuoteRequestSideFromJSONTyped(json);
|
|
7
|
+
}
|
|
8
|
+
function SwapQuoteRequestSideFromJSONTyped(json, ignoreDiscriminator) {
|
|
9
|
+
if ((json === undefined) || (json === null)) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
'address': json['address'],
|
|
14
|
+
'amount': !exists(json, 'amount') ? undefined : json['amount'],
|
|
15
|
+
'chainId': json['chainId'],
|
|
16
|
+
'chainName': ChainEnumFromJSON(json['chainName']),
|
|
17
|
+
'tokenAddress': json['tokenAddress'],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function SwapQuoteRequestSideToJSON(value) {
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
if (value === null) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'address': value.address,
|
|
29
|
+
'amount': value.amount,
|
|
30
|
+
'chainId': value.chainId,
|
|
31
|
+
'chainName': ChainEnumToJSON(value.chainName),
|
|
32
|
+
'tokenAddress': value.tokenAddress,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { SwapQuoteRequestSideFromJSON, SwapQuoteRequestSideFromJSONTyped, SwapQuoteRequestSideToJSON };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
var SwapFee = require('./SwapFee.cjs');
|
|
7
|
+
var SwapQuoteResponseSide = require('./SwapQuoteResponseSide.cjs');
|
|
8
|
+
var SwapSigningPayload = require('./SwapSigningPayload.cjs');
|
|
9
|
+
var SwapStep = require('./SwapStep.cjs');
|
|
10
|
+
|
|
11
|
+
/* tslint:disable */
|
|
12
|
+
function SwapQuoteResponseFromJSON(json) {
|
|
13
|
+
return SwapQuoteResponseFromJSONTyped(json);
|
|
14
|
+
}
|
|
15
|
+
function SwapQuoteResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
16
|
+
if ((json === undefined) || (json === null)) {
|
|
17
|
+
return json;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
'approvalAddress': !runtime.exists(json, 'approvalAddress') ? undefined : json['approvalAddress'],
|
|
21
|
+
'feeCosts': !runtime.exists(json, 'feeCosts') ? undefined : (json['feeCosts'].map(SwapFee.SwapFeeFromJSON)),
|
|
22
|
+
'from': SwapQuoteResponseSide.SwapQuoteResponseSideFromJSON(json['from']),
|
|
23
|
+
'gasCostUSD': !runtime.exists(json, 'gasCostUSD') ? undefined : json['gasCostUSD'],
|
|
24
|
+
'id': json['id'],
|
|
25
|
+
'signingPayload': !runtime.exists(json, 'signingPayload') ? undefined : SwapSigningPayload.SwapSigningPayloadFromJSON(json['signingPayload']),
|
|
26
|
+
'steps': (json['steps'].map(SwapStep.SwapStepFromJSON)),
|
|
27
|
+
'to': SwapQuoteResponseSide.SwapQuoteResponseSideFromJSON(json['to']),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function SwapQuoteResponseToJSON(value) {
|
|
31
|
+
if (value === undefined) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (value === null) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'approvalAddress': value.approvalAddress,
|
|
39
|
+
'feeCosts': value.feeCosts === undefined ? undefined : (value.feeCosts.map(SwapFee.SwapFeeToJSON)),
|
|
40
|
+
'from': SwapQuoteResponseSide.SwapQuoteResponseSideToJSON(value.from),
|
|
41
|
+
'gasCostUSD': value.gasCostUSD,
|
|
42
|
+
'id': value.id,
|
|
43
|
+
'signingPayload': SwapSigningPayload.SwapSigningPayloadToJSON(value.signingPayload),
|
|
44
|
+
'steps': (value.steps.map(SwapStep.SwapStepToJSON)),
|
|
45
|
+
'to': SwapQuoteResponseSide.SwapQuoteResponseSideToJSON(value.to),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
exports.SwapQuoteResponseFromJSON = SwapQuoteResponseFromJSON;
|
|
50
|
+
exports.SwapQuoteResponseFromJSONTyped = SwapQuoteResponseFromJSONTyped;
|
|
51
|
+
exports.SwapQuoteResponseToJSON = SwapQuoteResponseToJSON;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 { SwapFee } from './SwapFee';
|
|
13
|
+
import { SwapQuoteResponseSide } from './SwapQuoteResponseSide';
|
|
14
|
+
import { SwapSigningPayload } from './SwapSigningPayload';
|
|
15
|
+
import { SwapStep } from './SwapStep';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SwapQuoteResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface SwapQuoteResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Address that needs token approval (spender), if applicable
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SwapQuoteResponse
|
|
26
|
+
*/
|
|
27
|
+
approvalAddress?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {Array<SwapFee>}
|
|
31
|
+
* @memberof SwapQuoteResponse
|
|
32
|
+
*/
|
|
33
|
+
feeCosts?: Array<SwapFee>;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {SwapQuoteResponseSide}
|
|
37
|
+
* @memberof SwapQuoteResponse
|
|
38
|
+
*/
|
|
39
|
+
from: SwapQuoteResponseSide;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SwapQuoteResponse
|
|
44
|
+
*/
|
|
45
|
+
gasCostUSD?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SwapQuoteResponse
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {SwapSigningPayload}
|
|
55
|
+
* @memberof SwapQuoteResponse
|
|
56
|
+
*/
|
|
57
|
+
signingPayload?: SwapSigningPayload;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<SwapStep>}
|
|
61
|
+
* @memberof SwapQuoteResponse
|
|
62
|
+
*/
|
|
63
|
+
steps: Array<SwapStep>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {SwapQuoteResponseSide}
|
|
67
|
+
* @memberof SwapQuoteResponse
|
|
68
|
+
*/
|
|
69
|
+
to: SwapQuoteResponseSide;
|
|
70
|
+
}
|
|
71
|
+
export declare function SwapQuoteResponseFromJSON(json: any): SwapQuoteResponse;
|
|
72
|
+
export declare function SwapQuoteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteResponse;
|
|
73
|
+
export declare function SwapQuoteResponseToJSON(value?: SwapQuoteResponse | null): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
import { SwapFeeFromJSON, SwapFeeToJSON } from './SwapFee.js';
|
|
3
|
+
import { SwapQuoteResponseSideFromJSON, SwapQuoteResponseSideToJSON } from './SwapQuoteResponseSide.js';
|
|
4
|
+
import { SwapSigningPayloadFromJSON, SwapSigningPayloadToJSON } from './SwapSigningPayload.js';
|
|
5
|
+
import { SwapStepFromJSON, SwapStepToJSON } from './SwapStep.js';
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
function SwapQuoteResponseFromJSON(json) {
|
|
9
|
+
return SwapQuoteResponseFromJSONTyped(json);
|
|
10
|
+
}
|
|
11
|
+
function SwapQuoteResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
12
|
+
if ((json === undefined) || (json === null)) {
|
|
13
|
+
return json;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
'approvalAddress': !exists(json, 'approvalAddress') ? undefined : json['approvalAddress'],
|
|
17
|
+
'feeCosts': !exists(json, 'feeCosts') ? undefined : (json['feeCosts'].map(SwapFeeFromJSON)),
|
|
18
|
+
'from': SwapQuoteResponseSideFromJSON(json['from']),
|
|
19
|
+
'gasCostUSD': !exists(json, 'gasCostUSD') ? undefined : json['gasCostUSD'],
|
|
20
|
+
'id': json['id'],
|
|
21
|
+
'signingPayload': !exists(json, 'signingPayload') ? undefined : SwapSigningPayloadFromJSON(json['signingPayload']),
|
|
22
|
+
'steps': (json['steps'].map(SwapStepFromJSON)),
|
|
23
|
+
'to': SwapQuoteResponseSideFromJSON(json['to']),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function SwapQuoteResponseToJSON(value) {
|
|
27
|
+
if (value === undefined) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
if (value === null) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'approvalAddress': value.approvalAddress,
|
|
35
|
+
'feeCosts': value.feeCosts === undefined ? undefined : (value.feeCosts.map(SwapFeeToJSON)),
|
|
36
|
+
'from': SwapQuoteResponseSideToJSON(value.from),
|
|
37
|
+
'gasCostUSD': value.gasCostUSD,
|
|
38
|
+
'id': value.id,
|
|
39
|
+
'signingPayload': SwapSigningPayloadToJSON(value.signingPayload),
|
|
40
|
+
'steps': (value.steps.map(SwapStepToJSON)),
|
|
41
|
+
'to': SwapQuoteResponseSideToJSON(value.to),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { SwapQuoteResponseFromJSON, SwapQuoteResponseFromJSONTyped, SwapQuoteResponseToJSON };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
var SwapToken = require('./SwapToken.cjs');
|
|
7
|
+
|
|
8
|
+
/* tslint:disable */
|
|
9
|
+
function SwapQuoteResponseSideFromJSON(json) {
|
|
10
|
+
return SwapQuoteResponseSideFromJSONTyped(json);
|
|
11
|
+
}
|
|
12
|
+
function SwapQuoteResponseSideFromJSONTyped(json, ignoreDiscriminator) {
|
|
13
|
+
if ((json === undefined) || (json === null)) {
|
|
14
|
+
return json;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
'address': json['address'],
|
|
18
|
+
'amount': json['amount'],
|
|
19
|
+
'amountMin': !runtime.exists(json, 'amountMin') ? undefined : json['amountMin'],
|
|
20
|
+
'amountUSD': !runtime.exists(json, 'amountUSD') ? undefined : json['amountUSD'],
|
|
21
|
+
'token': SwapToken.SwapTokenFromJSON(json['token']),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function SwapQuoteResponseSideToJSON(value) {
|
|
25
|
+
if (value === undefined) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
if (value === null) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'address': value.address,
|
|
33
|
+
'amount': value.amount,
|
|
34
|
+
'amountMin': value.amountMin,
|
|
35
|
+
'amountUSD': value.amountUSD,
|
|
36
|
+
'token': SwapToken.SwapTokenToJSON(value.token),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.SwapQuoteResponseSideFromJSON = SwapQuoteResponseSideFromJSON;
|
|
41
|
+
exports.SwapQuoteResponseSideFromJSONTyped = SwapQuoteResponseSideFromJSONTyped;
|
|
42
|
+
exports.SwapQuoteResponseSideToJSON = SwapQuoteResponseSideToJSON;
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { SwapToken } from './SwapToken';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SwapQuoteResponseSide
|
|
17
|
+
*/
|
|
18
|
+
export interface SwapQuoteResponseSide {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SwapQuoteResponseSide
|
|
23
|
+
*/
|
|
24
|
+
address: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SwapQuoteResponseSide
|
|
29
|
+
*/
|
|
30
|
+
amount: string;
|
|
31
|
+
/**
|
|
32
|
+
* Minimum amount accounting for slippage (to side only)
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SwapQuoteResponseSide
|
|
35
|
+
*/
|
|
36
|
+
amountMin?: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SwapQuoteResponseSide
|
|
41
|
+
*/
|
|
42
|
+
amountUSD?: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {SwapToken}
|
|
46
|
+
* @memberof SwapQuoteResponseSide
|
|
47
|
+
*/
|
|
48
|
+
token: SwapToken;
|
|
49
|
+
}
|
|
50
|
+
export declare function SwapQuoteResponseSideFromJSON(json: any): SwapQuoteResponseSide;
|
|
51
|
+
export declare function SwapQuoteResponseSideFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteResponseSide;
|
|
52
|
+
export declare function SwapQuoteResponseSideToJSON(value?: SwapQuoteResponseSide | null): any;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
import { SwapTokenFromJSON, SwapTokenToJSON } from './SwapToken.js';
|
|
3
|
+
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
function SwapQuoteResponseSideFromJSON(json) {
|
|
6
|
+
return SwapQuoteResponseSideFromJSONTyped(json);
|
|
7
|
+
}
|
|
8
|
+
function SwapQuoteResponseSideFromJSONTyped(json, ignoreDiscriminator) {
|
|
9
|
+
if ((json === undefined) || (json === null)) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
'address': json['address'],
|
|
14
|
+
'amount': json['amount'],
|
|
15
|
+
'amountMin': !exists(json, 'amountMin') ? undefined : json['amountMin'],
|
|
16
|
+
'amountUSD': !exists(json, 'amountUSD') ? undefined : json['amountUSD'],
|
|
17
|
+
'token': SwapTokenFromJSON(json['token']),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function SwapQuoteResponseSideToJSON(value) {
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
if (value === null) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'address': value.address,
|
|
29
|
+
'amount': value.amount,
|
|
30
|
+
'amountMin': value.amountMin,
|
|
31
|
+
'amountUSD': value.amountUSD,
|
|
32
|
+
'token': SwapTokenToJSON(value.token),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { SwapQuoteResponseSideFromJSON, SwapQuoteResponseSideFromJSONTyped, SwapQuoteResponseSideToJSON };
|
package/src/models/{CheckoutSerializedTransactionData.cjs → SwapSerializedTransactionData.cjs}
RENAMED
|
@@ -15,10 +15,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
15
15
|
* https://openapi-generator.tech
|
|
16
16
|
* Do not edit the class manually.
|
|
17
17
|
*/
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function SwapSerializedTransactionDataFromJSON(json) {
|
|
19
|
+
return SwapSerializedTransactionDataFromJSONTyped(json);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function SwapSerializedTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
22
|
if ((json === undefined) || (json === null)) {
|
|
23
23
|
return json;
|
|
24
24
|
}
|
|
@@ -26,7 +26,7 @@ function CheckoutSerializedTransactionDataFromJSONTyped(json, ignoreDiscriminato
|
|
|
26
26
|
'serializedTransaction': json['serializedTransaction'],
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function SwapSerializedTransactionDataToJSON(value) {
|
|
30
30
|
if (value === undefined) {
|
|
31
31
|
return undefined;
|
|
32
32
|
}
|
|
@@ -38,6 +38,6 @@ function CheckoutSerializedTransactionDataToJSON(value) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
41
|
+
exports.SwapSerializedTransactionDataFromJSON = SwapSerializedTransactionDataFromJSON;
|
|
42
|
+
exports.SwapSerializedTransactionDataFromJSONTyped = SwapSerializedTransactionDataFromJSONTyped;
|
|
43
|
+
exports.SwapSerializedTransactionDataToJSON = SwapSerializedTransactionDataToJSON;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 SwapSerializedTransactionData
|
|
16
|
+
*/
|
|
17
|
+
export interface SwapSerializedTransactionData {
|
|
18
|
+
/**
|
|
19
|
+
* Base64-encoded serialized transaction
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SwapSerializedTransactionData
|
|
22
|
+
*/
|
|
23
|
+
serializedTransaction: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function SwapSerializedTransactionDataFromJSON(json: any): SwapSerializedTransactionData;
|
|
26
|
+
export declare function SwapSerializedTransactionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapSerializedTransactionData;
|
|
27
|
+
export declare function SwapSerializedTransactionDataToJSON(value?: SwapSerializedTransactionData | null): any;
|
package/src/models/{CheckoutSerializedTransactionData.js → SwapSerializedTransactionData.js}
RENAMED
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function SwapSerializedTransactionDataFromJSON(json) {
|
|
15
|
+
return SwapSerializedTransactionDataFromJSONTyped(json);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function SwapSerializedTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
18
|
if ((json === undefined) || (json === null)) {
|
|
19
19
|
return json;
|
|
20
20
|
}
|
|
@@ -22,7 +22,7 @@ function CheckoutSerializedTransactionDataFromJSONTyped(json, ignoreDiscriminato
|
|
|
22
22
|
'serializedTransaction': json['serializedTransaction'],
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function SwapSerializedTransactionDataToJSON(value) {
|
|
26
26
|
if (value === undefined) {
|
|
27
27
|
return undefined;
|
|
28
28
|
}
|
|
@@ -34,4 +34,4 @@ function CheckoutSerializedTransactionDataToJSON(value) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export {
|
|
37
|
+
export { SwapSerializedTransactionDataFromJSON, SwapSerializedTransactionDataFromJSONTyped, SwapSerializedTransactionDataToJSON };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
var ChainEnum = require('./ChainEnum.cjs');
|
|
7
|
+
var SwapEvmApprovalData = require('./SwapEvmApprovalData.cjs');
|
|
8
|
+
var SwapEvmTransactionData = require('./SwapEvmTransactionData.cjs');
|
|
9
|
+
var SwapPsbtTransactionData = require('./SwapPsbtTransactionData.cjs');
|
|
10
|
+
var SwapSerializedTransactionData = require('./SwapSerializedTransactionData.cjs');
|
|
11
|
+
|
|
12
|
+
/* tslint:disable */
|
|
13
|
+
function SwapSigningPayloadFromJSON(json) {
|
|
14
|
+
return SwapSigningPayloadFromJSONTyped(json);
|
|
15
|
+
}
|
|
16
|
+
function SwapSigningPayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
17
|
+
if ((json === undefined) || (json === null)) {
|
|
18
|
+
return json;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
'chainName': ChainEnum.ChainEnumFromJSON(json['chainName']),
|
|
22
|
+
'chainId': json['chainId'],
|
|
23
|
+
'evmTransaction': !runtime.exists(json, 'evmTransaction') ? undefined : SwapEvmTransactionData.SwapEvmTransactionDataFromJSON(json['evmTransaction']),
|
|
24
|
+
'evmApproval': !runtime.exists(json, 'evmApproval') ? undefined : SwapEvmApprovalData.SwapEvmApprovalDataFromJSON(json['evmApproval']),
|
|
25
|
+
'serializedTransaction': !runtime.exists(json, 'serializedTransaction') ? undefined : SwapSerializedTransactionData.SwapSerializedTransactionDataFromJSON(json['serializedTransaction']),
|
|
26
|
+
'psbtTransaction': !runtime.exists(json, 'psbtTransaction') ? undefined : SwapPsbtTransactionData.SwapPsbtTransactionDataFromJSON(json['psbtTransaction']),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function SwapSigningPayloadToJSON(value) {
|
|
30
|
+
if (value === undefined) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
if (value === null) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'chainName': ChainEnum.ChainEnumToJSON(value.chainName),
|
|
38
|
+
'chainId': value.chainId,
|
|
39
|
+
'evmTransaction': SwapEvmTransactionData.SwapEvmTransactionDataToJSON(value.evmTransaction),
|
|
40
|
+
'evmApproval': SwapEvmApprovalData.SwapEvmApprovalDataToJSON(value.evmApproval),
|
|
41
|
+
'serializedTransaction': SwapSerializedTransactionData.SwapSerializedTransactionDataToJSON(value.serializedTransaction),
|
|
42
|
+
'psbtTransaction': SwapPsbtTransactionData.SwapPsbtTransactionDataToJSON(value.psbtTransaction),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.SwapSigningPayloadFromJSON = SwapSigningPayloadFromJSON;
|
|
47
|
+
exports.SwapSigningPayloadFromJSONTyped = SwapSigningPayloadFromJSONTyped;
|
|
48
|
+
exports.SwapSigningPayloadToJSON = SwapSigningPayloadToJSON;
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { ChainEnum } from './ChainEnum';
|
|
13
|
+
import { SwapEvmApprovalData } from './SwapEvmApprovalData';
|
|
14
|
+
import { SwapEvmTransactionData } from './SwapEvmTransactionData';
|
|
15
|
+
import { SwapPsbtTransactionData } from './SwapPsbtTransactionData';
|
|
16
|
+
import { SwapSerializedTransactionData } from './SwapSerializedTransactionData';
|
|
17
|
+
/**
|
|
18
|
+
* Chain-aware signing payload. Which fields are populated depends on chainName: EVM uses evmTransaction + optional evmApproval. SOL and SUI use serializedTransaction. BTC uses psbtTransaction.
|
|
19
|
+
* @export
|
|
20
|
+
* @interface SwapSigningPayload
|
|
21
|
+
*/
|
|
22
|
+
export interface SwapSigningPayload {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {ChainEnum}
|
|
26
|
+
* @memberof SwapSigningPayload
|
|
27
|
+
*/
|
|
28
|
+
chainName: ChainEnum;
|
|
29
|
+
/**
|
|
30
|
+
* Source chain identifier
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof SwapSigningPayload
|
|
33
|
+
*/
|
|
34
|
+
chainId: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {SwapEvmTransactionData}
|
|
38
|
+
* @memberof SwapSigningPayload
|
|
39
|
+
*/
|
|
40
|
+
evmTransaction?: SwapEvmTransactionData;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {SwapEvmApprovalData}
|
|
44
|
+
* @memberof SwapSigningPayload
|
|
45
|
+
*/
|
|
46
|
+
evmApproval?: SwapEvmApprovalData;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {SwapSerializedTransactionData}
|
|
50
|
+
* @memberof SwapSigningPayload
|
|
51
|
+
*/
|
|
52
|
+
serializedTransaction?: SwapSerializedTransactionData;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {SwapPsbtTransactionData}
|
|
56
|
+
* @memberof SwapSigningPayload
|
|
57
|
+
*/
|
|
58
|
+
psbtTransaction?: SwapPsbtTransactionData;
|
|
59
|
+
}
|
|
60
|
+
export declare function SwapSigningPayloadFromJSON(json: any): SwapSigningPayload;
|
|
61
|
+
export declare function SwapSigningPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapSigningPayload;
|
|
62
|
+
export declare function SwapSigningPayloadToJSON(value?: SwapSigningPayload | null): any;
|