@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
|
@@ -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 SwapEvmApprovalDataFromJSON(json) {
|
|
15
|
+
return SwapEvmApprovalDataFromJSONTyped(json);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function SwapEvmApprovalDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
18
|
if ((json === undefined) || (json === null)) {
|
|
19
19
|
return json;
|
|
20
20
|
}
|
|
@@ -24,7 +24,7 @@ function CheckoutEvmApprovalDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
24
|
'amount': json['amount'],
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function SwapEvmApprovalDataToJSON(value) {
|
|
28
28
|
if (value === undefined) {
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
@@ -38,4 +38,4 @@ function CheckoutEvmApprovalDataToJSON(value) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { SwapEvmApprovalDataFromJSON, SwapEvmApprovalDataFromJSONTyped, SwapEvmApprovalDataToJSON };
|
|
@@ -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 SwapEvmTransactionDataFromJSON(json) {
|
|
9
|
+
return SwapEvmTransactionDataFromJSONTyped(json);
|
|
10
|
+
}
|
|
11
|
+
function SwapEvmTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
12
|
+
if ((json === undefined) || (json === null)) {
|
|
13
|
+
return json;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
'to': json['to'],
|
|
17
|
+
'data': json['data'],
|
|
18
|
+
'value': json['value'],
|
|
19
|
+
'gasLimit': !runtime.exists(json, 'gasLimit') ? undefined : json['gasLimit'],
|
|
20
|
+
'gasPrice': !runtime.exists(json, 'gasPrice') ? undefined : json['gasPrice'],
|
|
21
|
+
'maxFeePerGas': !runtime.exists(json, 'maxFeePerGas') ? undefined : json['maxFeePerGas'],
|
|
22
|
+
'maxPriorityFeePerGas': !runtime.exists(json, 'maxPriorityFeePerGas') ? undefined : json['maxPriorityFeePerGas'],
|
|
23
|
+
'nonce': !runtime.exists(json, 'nonce') ? undefined : json['nonce'],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function SwapEvmTransactionDataToJSON(value) {
|
|
27
|
+
if (value === undefined) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
if (value === null) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'to': value.to,
|
|
35
|
+
'data': value.data,
|
|
36
|
+
'value': value.value,
|
|
37
|
+
'gasLimit': value.gasLimit,
|
|
38
|
+
'gasPrice': value.gasPrice,
|
|
39
|
+
'maxFeePerGas': value.maxFeePerGas,
|
|
40
|
+
'maxPriorityFeePerGas': value.maxPriorityFeePerGas,
|
|
41
|
+
'nonce': value.nonce,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.SwapEvmTransactionDataFromJSON = SwapEvmTransactionDataFromJSON;
|
|
46
|
+
exports.SwapEvmTransactionDataFromJSONTyped = SwapEvmTransactionDataFromJSONTyped;
|
|
47
|
+
exports.SwapEvmTransactionDataToJSON = SwapEvmTransactionDataToJSON;
|
|
@@ -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 SwapEvmTransactionData
|
|
16
|
+
*/
|
|
17
|
+
export interface SwapEvmTransactionData {
|
|
18
|
+
/**
|
|
19
|
+
* Contract address to call
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SwapEvmTransactionData
|
|
22
|
+
*/
|
|
23
|
+
to: string;
|
|
24
|
+
/**
|
|
25
|
+
* Encoded calldata (hex)
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SwapEvmTransactionData
|
|
28
|
+
*/
|
|
29
|
+
data: string;
|
|
30
|
+
/**
|
|
31
|
+
* Native asset amount in wei (hex string, "0x0" if token-only)
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SwapEvmTransactionData
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
36
|
+
/**
|
|
37
|
+
* Suggested gas limit (hex string)
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SwapEvmTransactionData
|
|
40
|
+
*/
|
|
41
|
+
gasLimit?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Gas price in wei (hex string, legacy transactions)
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof SwapEvmTransactionData
|
|
46
|
+
*/
|
|
47
|
+
gasPrice?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Max fee per gas (EIP-1559)
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof SwapEvmTransactionData
|
|
52
|
+
*/
|
|
53
|
+
maxFeePerGas?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Max priority fee per gas (EIP-1559)
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof SwapEvmTransactionData
|
|
58
|
+
*/
|
|
59
|
+
maxPriorityFeePerGas?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Transaction nonce
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof SwapEvmTransactionData
|
|
64
|
+
*/
|
|
65
|
+
nonce?: number;
|
|
66
|
+
}
|
|
67
|
+
export declare function SwapEvmTransactionDataFromJSON(json: any): SwapEvmTransactionData;
|
|
68
|
+
export declare function SwapEvmTransactionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapEvmTransactionData;
|
|
69
|
+
export declare function SwapEvmTransactionDataToJSON(value?: SwapEvmTransactionData | null): any;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
function SwapEvmTransactionDataFromJSON(json) {
|
|
5
|
+
return SwapEvmTransactionDataFromJSONTyped(json);
|
|
6
|
+
}
|
|
7
|
+
function SwapEvmTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
8
|
+
if ((json === undefined) || (json === null)) {
|
|
9
|
+
return json;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
'to': json['to'],
|
|
13
|
+
'data': json['data'],
|
|
14
|
+
'value': json['value'],
|
|
15
|
+
'gasLimit': !exists(json, 'gasLimit') ? undefined : json['gasLimit'],
|
|
16
|
+
'gasPrice': !exists(json, 'gasPrice') ? undefined : json['gasPrice'],
|
|
17
|
+
'maxFeePerGas': !exists(json, 'maxFeePerGas') ? undefined : json['maxFeePerGas'],
|
|
18
|
+
'maxPriorityFeePerGas': !exists(json, 'maxPriorityFeePerGas') ? undefined : json['maxPriorityFeePerGas'],
|
|
19
|
+
'nonce': !exists(json, 'nonce') ? undefined : json['nonce'],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function SwapEvmTransactionDataToJSON(value) {
|
|
23
|
+
if (value === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (value === null) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'to': value.to,
|
|
31
|
+
'data': value.data,
|
|
32
|
+
'value': value.value,
|
|
33
|
+
'gasLimit': value.gasLimit,
|
|
34
|
+
'gasPrice': value.gasPrice,
|
|
35
|
+
'maxFeePerGas': value.maxFeePerGas,
|
|
36
|
+
'maxPriorityFeePerGas': value.maxPriorityFeePerGas,
|
|
37
|
+
'nonce': value.nonce,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { SwapEvmTransactionDataFromJSON, SwapEvmTransactionDataFromJSONTyped, SwapEvmTransactionDataToJSON };
|
|
@@ -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 SwapFeeFromJSON(json) {
|
|
10
|
+
return SwapFeeFromJSONTyped(json);
|
|
11
|
+
}
|
|
12
|
+
function SwapFeeFromJSONTyped(json, ignoreDiscriminator) {
|
|
13
|
+
if ((json === undefined) || (json === null)) {
|
|
14
|
+
return json;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
'amount': json['amount'],
|
|
18
|
+
'amountUSD': !runtime.exists(json, 'amountUSD') ? undefined : json['amountUSD'],
|
|
19
|
+
'included': json['included'],
|
|
20
|
+
'name': json['name'],
|
|
21
|
+
'token': SwapToken.SwapTokenFromJSON(json['token']),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function SwapFeeToJSON(value) {
|
|
25
|
+
if (value === undefined) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
if (value === null) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'amount': value.amount,
|
|
33
|
+
'amountUSD': value.amountUSD,
|
|
34
|
+
'included': value.included,
|
|
35
|
+
'name': value.name,
|
|
36
|
+
'token': SwapToken.SwapTokenToJSON(value.token),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.SwapFeeFromJSON = SwapFeeFromJSON;
|
|
41
|
+
exports.SwapFeeFromJSONTyped = SwapFeeFromJSONTyped;
|
|
42
|
+
exports.SwapFeeToJSON = SwapFeeToJSON;
|
|
@@ -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 SwapFee
|
|
17
|
+
*/
|
|
18
|
+
export interface SwapFee {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SwapFee
|
|
23
|
+
*/
|
|
24
|
+
amount: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SwapFee
|
|
29
|
+
*/
|
|
30
|
+
amountUSD?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof SwapFee
|
|
35
|
+
*/
|
|
36
|
+
included: boolean;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SwapFee
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {SwapToken}
|
|
46
|
+
* @memberof SwapFee
|
|
47
|
+
*/
|
|
48
|
+
token: SwapToken;
|
|
49
|
+
}
|
|
50
|
+
export declare function SwapFeeFromJSON(json: any): SwapFee;
|
|
51
|
+
export declare function SwapFeeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapFee;
|
|
52
|
+
export declare function SwapFeeToJSON(value?: SwapFee | 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 SwapFeeFromJSON(json) {
|
|
6
|
+
return SwapFeeFromJSONTyped(json);
|
|
7
|
+
}
|
|
8
|
+
function SwapFeeFromJSONTyped(json, ignoreDiscriminator) {
|
|
9
|
+
if ((json === undefined) || (json === null)) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
'amount': json['amount'],
|
|
14
|
+
'amountUSD': !exists(json, 'amountUSD') ? undefined : json['amountUSD'],
|
|
15
|
+
'included': json['included'],
|
|
16
|
+
'name': json['name'],
|
|
17
|
+
'token': SwapTokenFromJSON(json['token']),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function SwapFeeToJSON(value) {
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
if (value === null) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'amount': value.amount,
|
|
29
|
+
'amountUSD': value.amountUSD,
|
|
30
|
+
'included': value.included,
|
|
31
|
+
'name': value.name,
|
|
32
|
+
'token': SwapTokenToJSON(value.token),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { SwapFeeFromJSON, SwapFeeFromJSONTyped, SwapFeeToJSON };
|
|
@@ -0,0 +1,38 @@
|
|
|
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 SwapGasCostFromJSON(json) {
|
|
10
|
+
return SwapGasCostFromJSONTyped(json);
|
|
11
|
+
}
|
|
12
|
+
function SwapGasCostFromJSONTyped(json, ignoreDiscriminator) {
|
|
13
|
+
if ((json === undefined) || (json === null)) {
|
|
14
|
+
return json;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
'amount': json['amount'],
|
|
18
|
+
'amountUSD': !runtime.exists(json, 'amountUSD') ? undefined : json['amountUSD'],
|
|
19
|
+
'token': SwapToken.SwapTokenFromJSON(json['token']),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function SwapGasCostToJSON(value) {
|
|
23
|
+
if (value === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (value === null) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'amount': value.amount,
|
|
31
|
+
'amountUSD': value.amountUSD,
|
|
32
|
+
'token': SwapToken.SwapTokenToJSON(value.token),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
exports.SwapGasCostFromJSON = SwapGasCostFromJSON;
|
|
37
|
+
exports.SwapGasCostFromJSONTyped = SwapGasCostFromJSONTyped;
|
|
38
|
+
exports.SwapGasCostToJSON = SwapGasCostToJSON;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 SwapGasCost
|
|
17
|
+
*/
|
|
18
|
+
export interface SwapGasCost {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SwapGasCost
|
|
23
|
+
*/
|
|
24
|
+
amount: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SwapGasCost
|
|
29
|
+
*/
|
|
30
|
+
amountUSD?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {SwapToken}
|
|
34
|
+
* @memberof SwapGasCost
|
|
35
|
+
*/
|
|
36
|
+
token: SwapToken;
|
|
37
|
+
}
|
|
38
|
+
export declare function SwapGasCostFromJSON(json: any): SwapGasCost;
|
|
39
|
+
export declare function SwapGasCostFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapGasCost;
|
|
40
|
+
export declare function SwapGasCostToJSON(value?: SwapGasCost | null): any;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
import { SwapTokenFromJSON, SwapTokenToJSON } from './SwapToken.js';
|
|
3
|
+
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
function SwapGasCostFromJSON(json) {
|
|
6
|
+
return SwapGasCostFromJSONTyped(json);
|
|
7
|
+
}
|
|
8
|
+
function SwapGasCostFromJSONTyped(json, ignoreDiscriminator) {
|
|
9
|
+
if ((json === undefined) || (json === null)) {
|
|
10
|
+
return json;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
'amount': json['amount'],
|
|
14
|
+
'amountUSD': !exists(json, 'amountUSD') ? undefined : json['amountUSD'],
|
|
15
|
+
'token': SwapTokenFromJSON(json['token']),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function SwapGasCostToJSON(value) {
|
|
19
|
+
if (value === undefined) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
if (value === null) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
'amount': value.amount,
|
|
27
|
+
'amountUSD': value.amountUSD,
|
|
28
|
+
'token': SwapTokenToJSON(value.token),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { SwapGasCostFromJSON, SwapGasCostFromJSONTyped, SwapGasCostToJSON };
|
|
@@ -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 SwapPsbtTransactionDataFromJSON(json) {
|
|
19
|
+
return SwapPsbtTransactionDataFromJSONTyped(json);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function SwapPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
22
|
if ((json === undefined) || (json === null)) {
|
|
23
23
|
return json;
|
|
24
24
|
}
|
|
@@ -26,7 +26,7 @@ function CheckoutPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
26
|
'psbt': json['psbt'],
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function SwapPsbtTransactionDataToJSON(value) {
|
|
30
30
|
if (value === undefined) {
|
|
31
31
|
return undefined;
|
|
32
32
|
}
|
|
@@ -38,6 +38,6 @@ function CheckoutPsbtTransactionDataToJSON(value) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
41
|
+
exports.SwapPsbtTransactionDataFromJSON = SwapPsbtTransactionDataFromJSON;
|
|
42
|
+
exports.SwapPsbtTransactionDataFromJSONTyped = SwapPsbtTransactionDataFromJSONTyped;
|
|
43
|
+
exports.SwapPsbtTransactionDataToJSON = SwapPsbtTransactionDataToJSON;
|
|
@@ -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 SwapPsbtTransactionData
|
|
16
|
+
*/
|
|
17
|
+
export interface SwapPsbtTransactionData {
|
|
18
|
+
/**
|
|
19
|
+
* Base64-encoded unsigned PSBT
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SwapPsbtTransactionData
|
|
22
|
+
*/
|
|
23
|
+
psbt: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function SwapPsbtTransactionDataFromJSON(json: any): SwapPsbtTransactionData;
|
|
26
|
+
export declare function SwapPsbtTransactionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapPsbtTransactionData;
|
|
27
|
+
export declare function SwapPsbtTransactionDataToJSON(value?: SwapPsbtTransactionData | null): any;
|
|
@@ -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 SwapPsbtTransactionDataFromJSON(json) {
|
|
15
|
+
return SwapPsbtTransactionDataFromJSONTyped(json);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function SwapPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
18
|
if ((json === undefined) || (json === null)) {
|
|
19
19
|
return json;
|
|
20
20
|
}
|
|
@@ -22,7 +22,7 @@ function CheckoutPsbtTransactionDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
22
22
|
'psbt': json['psbt'],
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function SwapPsbtTransactionDataToJSON(value) {
|
|
26
26
|
if (value === undefined) {
|
|
27
27
|
return undefined;
|
|
28
28
|
}
|
|
@@ -34,4 +34,4 @@ function CheckoutPsbtTransactionDataToJSON(value) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export {
|
|
37
|
+
export { SwapPsbtTransactionDataFromJSON, SwapPsbtTransactionDataFromJSONTyped, SwapPsbtTransactionDataToJSON };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
6
|
+
var SwapQuoteRequestSide = require('./SwapQuoteRequestSide.cjs');
|
|
7
|
+
|
|
8
|
+
/* tslint:disable */
|
|
9
|
+
/**
|
|
10
|
+
* @export
|
|
11
|
+
* @enum {string}
|
|
12
|
+
*/
|
|
13
|
+
exports.SwapQuoteRequestOrderEnum = void 0;
|
|
14
|
+
(function (SwapQuoteRequestOrderEnum) {
|
|
15
|
+
SwapQuoteRequestOrderEnum["Cheapest"] = "CHEAPEST";
|
|
16
|
+
SwapQuoteRequestOrderEnum["Fastest"] = "FASTEST";
|
|
17
|
+
})(exports.SwapQuoteRequestOrderEnum || (exports.SwapQuoteRequestOrderEnum = {}));
|
|
18
|
+
function SwapQuoteRequestFromJSON(json) {
|
|
19
|
+
return SwapQuoteRequestFromJSONTyped(json);
|
|
20
|
+
}
|
|
21
|
+
function SwapQuoteRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
|
+
if ((json === undefined) || (json === null)) {
|
|
23
|
+
return json;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
'from': SwapQuoteRequestSide.SwapQuoteRequestSideFromJSON(json['from']),
|
|
27
|
+
'maxPriceImpact': !runtime.exists(json, 'maxPriceImpact') ? undefined : json['maxPriceImpact'],
|
|
28
|
+
'order': !runtime.exists(json, 'order') ? undefined : json['order'],
|
|
29
|
+
'slippage': !runtime.exists(json, 'slippage') ? undefined : json['slippage'],
|
|
30
|
+
'to': SwapQuoteRequestSide.SwapQuoteRequestSideFromJSON(json['to']),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function SwapQuoteRequestToJSON(value) {
|
|
34
|
+
if (value === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (value === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'from': SwapQuoteRequestSide.SwapQuoteRequestSideToJSON(value.from),
|
|
42
|
+
'maxPriceImpact': value.maxPriceImpact,
|
|
43
|
+
'order': value.order,
|
|
44
|
+
'slippage': value.slippage,
|
|
45
|
+
'to': SwapQuoteRequestSide.SwapQuoteRequestSideToJSON(value.to),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
exports.SwapQuoteRequestFromJSON = SwapQuoteRequestFromJSON;
|
|
50
|
+
exports.SwapQuoteRequestFromJSONTyped = SwapQuoteRequestFromJSONTyped;
|
|
51
|
+
exports.SwapQuoteRequestToJSON = SwapQuoteRequestToJSON;
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { SwapQuoteRequestSide } from './SwapQuoteRequestSide';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SwapQuoteRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface SwapQuoteRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {SwapQuoteRequestSide}
|
|
22
|
+
* @memberof SwapQuoteRequest
|
|
23
|
+
*/
|
|
24
|
+
from: SwapQuoteRequestSide;
|
|
25
|
+
/**
|
|
26
|
+
* The price impact threshold above which routes are hidden. As an example, one should specify 0.15 (15%) to hide routes with more than 15% price impact. The default is 10%.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof SwapQuoteRequest
|
|
29
|
+
*/
|
|
30
|
+
maxPriceImpact?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Route optimization preference.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SwapQuoteRequest
|
|
35
|
+
*/
|
|
36
|
+
order?: SwapQuoteRequestOrderEnum;
|
|
37
|
+
/**
|
|
38
|
+
* Slippage tolerance (e.g. 0.005 for 0.5%)
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof SwapQuoteRequest
|
|
41
|
+
*/
|
|
42
|
+
slippage?: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {SwapQuoteRequestSide}
|
|
46
|
+
* @memberof SwapQuoteRequest
|
|
47
|
+
*/
|
|
48
|
+
to: SwapQuoteRequestSide;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
* @enum {string}
|
|
53
|
+
*/
|
|
54
|
+
export declare enum SwapQuoteRequestOrderEnum {
|
|
55
|
+
Cheapest = "CHEAPEST",
|
|
56
|
+
Fastest = "FASTEST"
|
|
57
|
+
}
|
|
58
|
+
export declare function SwapQuoteRequestFromJSON(json: any): SwapQuoteRequest;
|
|
59
|
+
export declare function SwapQuoteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapQuoteRequest;
|
|
60
|
+
export declare function SwapQuoteRequestToJSON(value?: SwapQuoteRequest | null): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
2
|
+
import { SwapQuoteRequestSideFromJSON, SwapQuoteRequestSideToJSON } from './SwapQuoteRequestSide.js';
|
|
3
|
+
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
/**
|
|
6
|
+
* @export
|
|
7
|
+
* @enum {string}
|
|
8
|
+
*/
|
|
9
|
+
var SwapQuoteRequestOrderEnum;
|
|
10
|
+
(function (SwapQuoteRequestOrderEnum) {
|
|
11
|
+
SwapQuoteRequestOrderEnum["Cheapest"] = "CHEAPEST";
|
|
12
|
+
SwapQuoteRequestOrderEnum["Fastest"] = "FASTEST";
|
|
13
|
+
})(SwapQuoteRequestOrderEnum || (SwapQuoteRequestOrderEnum = {}));
|
|
14
|
+
function SwapQuoteRequestFromJSON(json) {
|
|
15
|
+
return SwapQuoteRequestFromJSONTyped(json);
|
|
16
|
+
}
|
|
17
|
+
function SwapQuoteRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
|
+
if ((json === undefined) || (json === null)) {
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
'from': SwapQuoteRequestSideFromJSON(json['from']),
|
|
23
|
+
'maxPriceImpact': !exists(json, 'maxPriceImpact') ? undefined : json['maxPriceImpact'],
|
|
24
|
+
'order': !exists(json, 'order') ? undefined : json['order'],
|
|
25
|
+
'slippage': !exists(json, 'slippage') ? undefined : json['slippage'],
|
|
26
|
+
'to': SwapQuoteRequestSideFromJSON(json['to']),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function SwapQuoteRequestToJSON(value) {
|
|
30
|
+
if (value === undefined) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
if (value === null) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'from': SwapQuoteRequestSideToJSON(value.from),
|
|
38
|
+
'maxPriceImpact': value.maxPriceImpact,
|
|
39
|
+
'order': value.order,
|
|
40
|
+
'slippage': value.slippage,
|
|
41
|
+
'to': SwapQuoteRequestSideToJSON(value.to),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { SwapQuoteRequestFromJSON, SwapQuoteRequestFromJSONTyped, SwapQuoteRequestOrderEnum, SwapQuoteRequestToJSON };
|