@xchainjs/xchain-thornode 1.0.5 → 1.1.0
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/lib/generated/thornodeApi/api.d.ts +1219 -617
- package/lib/generated/thornodeApi/base.d.ts +1 -1
- package/lib/generated/thornodeApi/common.d.ts +1 -1
- package/lib/generated/thornodeApi/configuration.d.ts +1 -1
- package/lib/generated/thornodeApi/index.d.ts +1 -1
- package/lib/index.esm.js +994 -528
- package/lib/index.js +1013 -531
- package/package.json +3 -3
package/lib/index.esm.js
CHANGED
|
@@ -38,7 +38,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
38
38
|
* Thornode API
|
|
39
39
|
* Thornode REST API.
|
|
40
40
|
*
|
|
41
|
-
* The version of the OpenAPI document: 3.
|
|
41
|
+
* The version of the OpenAPI document: 3.15.0
|
|
42
42
|
* Contact: devs@thorchain.org
|
|
43
43
|
*
|
|
44
44
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -83,7 +83,7 @@ class RequiredError extends Error {
|
|
|
83
83
|
* Thornode API
|
|
84
84
|
* Thornode REST API.
|
|
85
85
|
*
|
|
86
|
-
* The version of the OpenAPI document: 3.
|
|
86
|
+
* The version of the OpenAPI document: 3.15.0
|
|
87
87
|
* Contact: devs@thorchain.org
|
|
88
88
|
*
|
|
89
89
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -156,7 +156,7 @@ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, confi
|
|
|
156
156
|
* Thornode API
|
|
157
157
|
* Thornode REST API.
|
|
158
158
|
*
|
|
159
|
-
* The version of the OpenAPI document: 3.
|
|
159
|
+
* The version of the OpenAPI document: 3.15.0
|
|
160
160
|
* Contact: devs@thorchain.org
|
|
161
161
|
*
|
|
162
162
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -479,26 +479,22 @@ class BlockApi extends BaseAPI {
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
/**
|
|
482
|
-
*
|
|
482
|
+
* CloutApi - axios parameter creator
|
|
483
483
|
* @export
|
|
484
484
|
*/
|
|
485
|
-
const
|
|
485
|
+
const CloutApiAxiosParamCreator = function (configuration) {
|
|
486
486
|
return {
|
|
487
487
|
/**
|
|
488
|
-
* Returns the
|
|
489
|
-
* @param {string} asset
|
|
488
|
+
* Returns the clout score of an address
|
|
490
489
|
* @param {string} address
|
|
491
490
|
* @param {number} [height] optional block height, defaults to current tip
|
|
492
491
|
* @param {*} [options] Override http request option.
|
|
493
492
|
* @throws {RequiredError}
|
|
494
493
|
*/
|
|
495
|
-
|
|
496
|
-
// verify required parameter 'asset' is not null or undefined
|
|
497
|
-
assertParamExists('borrower', 'asset', asset);
|
|
494
|
+
swapperClout: (address_1, height_1, ...args_1) => __awaiter(this, [address_1, height_1, ...args_1], void 0, function* (address, height, options = {}) {
|
|
498
495
|
// verify required parameter 'address' is not null or undefined
|
|
499
|
-
assertParamExists('
|
|
500
|
-
const localVarPath = `/thorchain/
|
|
501
|
-
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
496
|
+
assertParamExists('swapperClout', 'address', address);
|
|
497
|
+
const localVarPath = `/thorchain/clout/swap/{address}`
|
|
502
498
|
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
503
499
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
504
500
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -520,155 +516,82 @@ const BorrowersApiAxiosParamCreator = function (configuration) {
|
|
|
520
516
|
options: localVarRequestOptions,
|
|
521
517
|
};
|
|
522
518
|
}),
|
|
523
|
-
/**
|
|
524
|
-
* Returns all borrowers for the given pool.
|
|
525
|
-
* @param {string} asset
|
|
526
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
527
|
-
* @param {*} [options] Override http request option.
|
|
528
|
-
* @throws {RequiredError}
|
|
529
|
-
*/
|
|
530
|
-
borrowers: (asset_1, height_1, ...args_1) => __awaiter(this, [asset_1, height_1, ...args_1], void 0, function* (asset, height, options = {}) {
|
|
531
|
-
// verify required parameter 'asset' is not null or undefined
|
|
532
|
-
assertParamExists('borrowers', 'asset', asset);
|
|
533
|
-
const localVarPath = `/thorchain/pool/{asset}/borrowers`
|
|
534
|
-
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
535
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
536
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
537
|
-
let baseOptions;
|
|
538
|
-
if (configuration) {
|
|
539
|
-
baseOptions = configuration.baseOptions;
|
|
540
|
-
}
|
|
541
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
542
|
-
const localVarHeaderParameter = {};
|
|
543
|
-
const localVarQueryParameter = {};
|
|
544
|
-
if (height !== undefined) {
|
|
545
|
-
localVarQueryParameter['height'] = height;
|
|
546
|
-
}
|
|
547
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
548
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
549
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
550
|
-
return {
|
|
551
|
-
url: toPathString(localVarUrlObj),
|
|
552
|
-
options: localVarRequestOptions,
|
|
553
|
-
};
|
|
554
|
-
}),
|
|
555
519
|
};
|
|
556
520
|
};
|
|
557
521
|
/**
|
|
558
|
-
*
|
|
522
|
+
* CloutApi - functional programming interface
|
|
559
523
|
* @export
|
|
560
524
|
*/
|
|
561
|
-
const
|
|
562
|
-
const localVarAxiosParamCreator =
|
|
525
|
+
const CloutApiFp = function (configuration) {
|
|
526
|
+
const localVarAxiosParamCreator = CloutApiAxiosParamCreator(configuration);
|
|
563
527
|
return {
|
|
564
528
|
/**
|
|
565
|
-
* Returns the
|
|
566
|
-
* @param {string} asset
|
|
529
|
+
* Returns the clout score of an address
|
|
567
530
|
* @param {string} address
|
|
568
531
|
* @param {number} [height] optional block height, defaults to current tip
|
|
569
532
|
* @param {*} [options] Override http request option.
|
|
570
533
|
* @throws {RequiredError}
|
|
571
534
|
*/
|
|
572
|
-
|
|
573
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
574
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.borrower(asset, address, height, options);
|
|
575
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
576
|
-
});
|
|
577
|
-
},
|
|
578
|
-
/**
|
|
579
|
-
* Returns all borrowers for the given pool.
|
|
580
|
-
* @param {string} asset
|
|
581
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
582
|
-
* @param {*} [options] Override http request option.
|
|
583
|
-
* @throws {RequiredError}
|
|
584
|
-
*/
|
|
585
|
-
borrowers(asset, height, options) {
|
|
535
|
+
swapperClout(address, height, options) {
|
|
586
536
|
return __awaiter(this, void 0, void 0, function* () {
|
|
587
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
537
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.swapperClout(address, height, options);
|
|
588
538
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
589
539
|
});
|
|
590
540
|
},
|
|
591
541
|
};
|
|
592
542
|
};
|
|
593
543
|
/**
|
|
594
|
-
*
|
|
544
|
+
* CloutApi - factory interface
|
|
595
545
|
* @export
|
|
596
546
|
*/
|
|
597
|
-
const
|
|
598
|
-
const localVarFp =
|
|
547
|
+
const CloutApiFactory = function (configuration, basePath, axios) {
|
|
548
|
+
const localVarFp = CloutApiFp(configuration);
|
|
599
549
|
return {
|
|
600
550
|
/**
|
|
601
|
-
* Returns the
|
|
602
|
-
* @param {string} asset
|
|
551
|
+
* Returns the clout score of an address
|
|
603
552
|
* @param {string} address
|
|
604
553
|
* @param {number} [height] optional block height, defaults to current tip
|
|
605
554
|
* @param {*} [options] Override http request option.
|
|
606
555
|
* @throws {RequiredError}
|
|
607
556
|
*/
|
|
608
|
-
|
|
609
|
-
return localVarFp.
|
|
610
|
-
},
|
|
611
|
-
/**
|
|
612
|
-
* Returns all borrowers for the given pool.
|
|
613
|
-
* @param {string} asset
|
|
614
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
615
|
-
* @param {*} [options] Override http request option.
|
|
616
|
-
* @throws {RequiredError}
|
|
617
|
-
*/
|
|
618
|
-
borrowers(asset, height, options) {
|
|
619
|
-
return localVarFp.borrowers(asset, height, options).then((request) => request(axios, basePath));
|
|
557
|
+
swapperClout(address, height, options) {
|
|
558
|
+
return localVarFp.swapperClout(address, height, options).then((request) => request(axios, basePath));
|
|
620
559
|
},
|
|
621
560
|
};
|
|
622
561
|
};
|
|
623
562
|
/**
|
|
624
|
-
*
|
|
563
|
+
* CloutApi - object-oriented interface
|
|
625
564
|
* @export
|
|
626
|
-
* @class
|
|
565
|
+
* @class CloutApi
|
|
627
566
|
* @extends {BaseAPI}
|
|
628
567
|
*/
|
|
629
|
-
class
|
|
568
|
+
class CloutApi extends BaseAPI {
|
|
630
569
|
/**
|
|
631
|
-
* Returns the
|
|
632
|
-
* @param {string} asset
|
|
570
|
+
* Returns the clout score of an address
|
|
633
571
|
* @param {string} address
|
|
634
572
|
* @param {number} [height] optional block height, defaults to current tip
|
|
635
573
|
* @param {*} [options] Override http request option.
|
|
636
574
|
* @throws {RequiredError}
|
|
637
|
-
* @memberof
|
|
638
|
-
*/
|
|
639
|
-
borrower(asset, address, height, options) {
|
|
640
|
-
return BorrowersApiFp(this.configuration).borrower(asset, address, height, options).then((request) => request(this.axios, this.basePath));
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Returns all borrowers for the given pool.
|
|
644
|
-
* @param {string} asset
|
|
645
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
646
|
-
* @param {*} [options] Override http request option.
|
|
647
|
-
* @throws {RequiredError}
|
|
648
|
-
* @memberof BorrowersApi
|
|
575
|
+
* @memberof CloutApi
|
|
649
576
|
*/
|
|
650
|
-
|
|
651
|
-
return
|
|
577
|
+
swapperClout(address, height, options) {
|
|
578
|
+
return CloutApiFp(this.configuration).swapperClout(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
652
579
|
}
|
|
653
580
|
}
|
|
654
581
|
/**
|
|
655
|
-
*
|
|
582
|
+
* CodesApi - axios parameter creator
|
|
656
583
|
* @export
|
|
657
584
|
*/
|
|
658
|
-
const
|
|
585
|
+
const CodesApiAxiosParamCreator = function (configuration) {
|
|
659
586
|
return {
|
|
660
587
|
/**
|
|
661
|
-
* Returns
|
|
662
|
-
* @param {string} address
|
|
588
|
+
* Returns all whitelisted contract codes
|
|
663
589
|
* @param {number} [height] optional block height, defaults to current tip
|
|
664
590
|
* @param {*} [options] Override http request option.
|
|
665
591
|
* @throws {RequiredError}
|
|
666
592
|
*/
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
assertParamExists('swapperClout', 'address', address);
|
|
670
|
-
const localVarPath = `/thorchain/clout/swap/{address}`
|
|
671
|
-
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
593
|
+
codes: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
|
|
594
|
+
const localVarPath = `/thorchain/codes`;
|
|
672
595
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
673
596
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
674
597
|
let baseOptions;
|
|
@@ -692,63 +615,60 @@ const CloutApiAxiosParamCreator = function (configuration) {
|
|
|
692
615
|
};
|
|
693
616
|
};
|
|
694
617
|
/**
|
|
695
|
-
*
|
|
618
|
+
* CodesApi - functional programming interface
|
|
696
619
|
* @export
|
|
697
620
|
*/
|
|
698
|
-
const
|
|
699
|
-
const localVarAxiosParamCreator =
|
|
621
|
+
const CodesApiFp = function (configuration) {
|
|
622
|
+
const localVarAxiosParamCreator = CodesApiAxiosParamCreator(configuration);
|
|
700
623
|
return {
|
|
701
624
|
/**
|
|
702
|
-
* Returns
|
|
703
|
-
* @param {string} address
|
|
625
|
+
* Returns all whitelisted contract codes
|
|
704
626
|
* @param {number} [height] optional block height, defaults to current tip
|
|
705
627
|
* @param {*} [options] Override http request option.
|
|
706
628
|
* @throws {RequiredError}
|
|
707
629
|
*/
|
|
708
|
-
|
|
630
|
+
codes(height, options) {
|
|
709
631
|
return __awaiter(this, void 0, void 0, function* () {
|
|
710
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
632
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.codes(height, options);
|
|
711
633
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
712
634
|
});
|
|
713
635
|
},
|
|
714
636
|
};
|
|
715
637
|
};
|
|
716
638
|
/**
|
|
717
|
-
*
|
|
639
|
+
* CodesApi - factory interface
|
|
718
640
|
* @export
|
|
719
641
|
*/
|
|
720
|
-
const
|
|
721
|
-
const localVarFp =
|
|
642
|
+
const CodesApiFactory = function (configuration, basePath, axios) {
|
|
643
|
+
const localVarFp = CodesApiFp(configuration);
|
|
722
644
|
return {
|
|
723
645
|
/**
|
|
724
|
-
* Returns
|
|
725
|
-
* @param {string} address
|
|
646
|
+
* Returns all whitelisted contract codes
|
|
726
647
|
* @param {number} [height] optional block height, defaults to current tip
|
|
727
648
|
* @param {*} [options] Override http request option.
|
|
728
649
|
* @throws {RequiredError}
|
|
729
650
|
*/
|
|
730
|
-
|
|
731
|
-
return localVarFp.
|
|
651
|
+
codes(height, options) {
|
|
652
|
+
return localVarFp.codes(height, options).then((request) => request(axios, basePath));
|
|
732
653
|
},
|
|
733
654
|
};
|
|
734
655
|
};
|
|
735
656
|
/**
|
|
736
|
-
*
|
|
657
|
+
* CodesApi - object-oriented interface
|
|
737
658
|
* @export
|
|
738
|
-
* @class
|
|
659
|
+
* @class CodesApi
|
|
739
660
|
* @extends {BaseAPI}
|
|
740
661
|
*/
|
|
741
|
-
class
|
|
662
|
+
class CodesApi extends BaseAPI {
|
|
742
663
|
/**
|
|
743
|
-
* Returns
|
|
744
|
-
* @param {string} address
|
|
664
|
+
* Returns all whitelisted contract codes
|
|
745
665
|
* @param {number} [height] optional block height, defaults to current tip
|
|
746
666
|
* @param {*} [options] Override http request option.
|
|
747
667
|
* @throws {RequiredError}
|
|
748
|
-
* @memberof
|
|
668
|
+
* @memberof CodesApi
|
|
749
669
|
*/
|
|
750
|
-
|
|
751
|
-
return
|
|
670
|
+
codes(height, options) {
|
|
671
|
+
return CodesApiFp(this.configuration).codes(height, options).then((request) => request(this.axios, this.basePath));
|
|
752
672
|
}
|
|
753
673
|
}
|
|
754
674
|
/**
|
|
@@ -1082,6 +1002,162 @@ class InvariantsApi extends BaseAPI {
|
|
|
1082
1002
|
return InvariantsApiFp(this.configuration).invariants(height, options).then((request) => request(this.axios, this.basePath));
|
|
1083
1003
|
}
|
|
1084
1004
|
}
|
|
1005
|
+
/**
|
|
1006
|
+
* LimitOrderApi - axios parameter creator
|
|
1007
|
+
* @export
|
|
1008
|
+
*/
|
|
1009
|
+
const LimitOrderApiAxiosParamCreator = function (configuration) {
|
|
1010
|
+
return {
|
|
1011
|
+
/**
|
|
1012
|
+
* Provide a limit order quote and memo for the provided limit order
|
|
1013
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1014
|
+
* @param {string} [fromAsset] the source asset
|
|
1015
|
+
* @param {string} [toAsset] the target asset
|
|
1016
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
1017
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
1018
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
1019
|
+
* @param {number} [customTtl] the custom TTL in blocks for limit orders
|
|
1020
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
1021
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
1022
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
1023
|
+
* @param {*} [options] Override http request option.
|
|
1024
|
+
* @throws {RequiredError}
|
|
1025
|
+
*/
|
|
1026
|
+
quotelimit: (height_1, fromAsset_1, toAsset_1, amount_1, destination_1, refundAddress_1, customTtl_1, streamingQuantity_1, affiliateBps_1, affiliate_1, ...args_1) => __awaiter(this, [height_1, fromAsset_1, toAsset_1, amount_1, destination_1, refundAddress_1, customTtl_1, streamingQuantity_1, affiliateBps_1, affiliate_1, ...args_1], void 0, function* (height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options = {}) {
|
|
1027
|
+
const localVarPath = `/thorchain/quote/limit`;
|
|
1028
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1029
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1030
|
+
let baseOptions;
|
|
1031
|
+
if (configuration) {
|
|
1032
|
+
baseOptions = configuration.baseOptions;
|
|
1033
|
+
}
|
|
1034
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1035
|
+
const localVarHeaderParameter = {};
|
|
1036
|
+
const localVarQueryParameter = {};
|
|
1037
|
+
if (height !== undefined) {
|
|
1038
|
+
localVarQueryParameter['height'] = height;
|
|
1039
|
+
}
|
|
1040
|
+
if (fromAsset !== undefined) {
|
|
1041
|
+
localVarQueryParameter['from_asset'] = fromAsset;
|
|
1042
|
+
}
|
|
1043
|
+
if (toAsset !== undefined) {
|
|
1044
|
+
localVarQueryParameter['to_asset'] = toAsset;
|
|
1045
|
+
}
|
|
1046
|
+
if (amount !== undefined) {
|
|
1047
|
+
localVarQueryParameter['amount'] = amount;
|
|
1048
|
+
}
|
|
1049
|
+
if (destination !== undefined) {
|
|
1050
|
+
localVarQueryParameter['destination'] = destination;
|
|
1051
|
+
}
|
|
1052
|
+
if (refundAddress !== undefined) {
|
|
1053
|
+
localVarQueryParameter['refund_address'] = refundAddress;
|
|
1054
|
+
}
|
|
1055
|
+
if (customTtl !== undefined) {
|
|
1056
|
+
localVarQueryParameter['custom_ttl'] = customTtl;
|
|
1057
|
+
}
|
|
1058
|
+
if (streamingQuantity !== undefined) {
|
|
1059
|
+
localVarQueryParameter['streaming_quantity'] = streamingQuantity;
|
|
1060
|
+
}
|
|
1061
|
+
if (affiliateBps !== undefined) {
|
|
1062
|
+
localVarQueryParameter['affiliate_bps'] = affiliateBps;
|
|
1063
|
+
}
|
|
1064
|
+
if (affiliate !== undefined) {
|
|
1065
|
+
localVarQueryParameter['affiliate'] = affiliate;
|
|
1066
|
+
}
|
|
1067
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1068
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1069
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1070
|
+
return {
|
|
1071
|
+
url: toPathString(localVarUrlObj),
|
|
1072
|
+
options: localVarRequestOptions,
|
|
1073
|
+
};
|
|
1074
|
+
}),
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1077
|
+
/**
|
|
1078
|
+
* LimitOrderApi - functional programming interface
|
|
1079
|
+
* @export
|
|
1080
|
+
*/
|
|
1081
|
+
const LimitOrderApiFp = function (configuration) {
|
|
1082
|
+
const localVarAxiosParamCreator = LimitOrderApiAxiosParamCreator(configuration);
|
|
1083
|
+
return {
|
|
1084
|
+
/**
|
|
1085
|
+
* Provide a limit order quote and memo for the provided limit order
|
|
1086
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1087
|
+
* @param {string} [fromAsset] the source asset
|
|
1088
|
+
* @param {string} [toAsset] the target asset
|
|
1089
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
1090
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
1091
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
1092
|
+
* @param {number} [customTtl] the custom TTL in blocks for limit orders
|
|
1093
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
1094
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
1095
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
1096
|
+
* @param {*} [options] Override http request option.
|
|
1097
|
+
* @throws {RequiredError}
|
|
1098
|
+
*/
|
|
1099
|
+
quotelimit(height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options) {
|
|
1100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1101
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quotelimit(height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options);
|
|
1102
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1103
|
+
});
|
|
1104
|
+
},
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
/**
|
|
1108
|
+
* LimitOrderApi - factory interface
|
|
1109
|
+
* @export
|
|
1110
|
+
*/
|
|
1111
|
+
const LimitOrderApiFactory = function (configuration, basePath, axios) {
|
|
1112
|
+
const localVarFp = LimitOrderApiFp(configuration);
|
|
1113
|
+
return {
|
|
1114
|
+
/**
|
|
1115
|
+
* Provide a limit order quote and memo for the provided limit order
|
|
1116
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1117
|
+
* @param {string} [fromAsset] the source asset
|
|
1118
|
+
* @param {string} [toAsset] the target asset
|
|
1119
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
1120
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
1121
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
1122
|
+
* @param {number} [customTtl] the custom TTL in blocks for limit orders
|
|
1123
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
1124
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
1125
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
1126
|
+
* @param {*} [options] Override http request option.
|
|
1127
|
+
* @throws {RequiredError}
|
|
1128
|
+
*/
|
|
1129
|
+
quotelimit(height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options) {
|
|
1130
|
+
return localVarFp.quotelimit(height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
|
|
1131
|
+
},
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
/**
|
|
1135
|
+
* LimitOrderApi - object-oriented interface
|
|
1136
|
+
* @export
|
|
1137
|
+
* @class LimitOrderApi
|
|
1138
|
+
* @extends {BaseAPI}
|
|
1139
|
+
*/
|
|
1140
|
+
class LimitOrderApi extends BaseAPI {
|
|
1141
|
+
/**
|
|
1142
|
+
* Provide a limit order quote and memo for the provided limit order
|
|
1143
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1144
|
+
* @param {string} [fromAsset] the source asset
|
|
1145
|
+
* @param {string} [toAsset] the target asset
|
|
1146
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
1147
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
1148
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
1149
|
+
* @param {number} [customTtl] the custom TTL in blocks for limit orders
|
|
1150
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
1151
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
1152
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
1153
|
+
* @param {*} [options] Override http request option.
|
|
1154
|
+
* @throws {RequiredError}
|
|
1155
|
+
* @memberof LimitOrderApi
|
|
1156
|
+
*/
|
|
1157
|
+
quotelimit(height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options) {
|
|
1158
|
+
return LimitOrderApiFp(this.configuration).quotelimit(height, fromAsset, toAsset, amount, destination, refundAddress, customTtl, streamingQuantity, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1085
1161
|
/**
|
|
1086
1162
|
* LiquidityProvidersApi - axios parameter creator
|
|
1087
1163
|
* @export
|
|
@@ -2594,23 +2670,23 @@ class NodesApi extends BaseAPI {
|
|
|
2594
2670
|
}
|
|
2595
2671
|
}
|
|
2596
2672
|
/**
|
|
2597
|
-
*
|
|
2673
|
+
* OracleApi - axios parameter creator
|
|
2598
2674
|
* @export
|
|
2599
2675
|
*/
|
|
2600
|
-
const
|
|
2676
|
+
const OracleApiAxiosParamCreator = function (configuration) {
|
|
2601
2677
|
return {
|
|
2602
2678
|
/**
|
|
2603
|
-
* Returns
|
|
2604
|
-
* @param {string}
|
|
2679
|
+
* Returns oracle price for a symbol.
|
|
2680
|
+
* @param {string} symbol
|
|
2605
2681
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2606
2682
|
* @param {*} [options] Override http request option.
|
|
2607
2683
|
* @throws {RequiredError}
|
|
2608
2684
|
*/
|
|
2609
|
-
|
|
2610
|
-
// verify required parameter '
|
|
2611
|
-
assertParamExists('
|
|
2612
|
-
const localVarPath = `/thorchain/
|
|
2613
|
-
.replace(`{${"
|
|
2685
|
+
oraclePrice: (symbol_1, height_1, ...args_1) => __awaiter(this, [symbol_1, height_1, ...args_1], void 0, function* (symbol, height, options = {}) {
|
|
2686
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
2687
|
+
assertParamExists('oraclePrice', 'symbol', symbol);
|
|
2688
|
+
const localVarPath = `/thorchain/oracle/price/{symbol}`
|
|
2689
|
+
.replace(`{${"symbol"}}`, encodeURIComponent(String(symbol)));
|
|
2614
2690
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2615
2691
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2616
2692
|
let baseOptions;
|
|
@@ -2632,13 +2708,13 @@ const PoolSlipApiAxiosParamCreator = function (configuration) {
|
|
|
2632
2708
|
};
|
|
2633
2709
|
}),
|
|
2634
2710
|
/**
|
|
2635
|
-
* Returns
|
|
2711
|
+
* Returns all available oracle prices.
|
|
2636
2712
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2637
2713
|
* @param {*} [options] Override http request option.
|
|
2638
2714
|
* @throws {RequiredError}
|
|
2639
2715
|
*/
|
|
2640
|
-
|
|
2641
|
-
const localVarPath = `/thorchain/
|
|
2716
|
+
oraclePrices: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
|
|
2717
|
+
const localVarPath = `/thorchain/oracle/prices`;
|
|
2642
2718
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2643
2719
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2644
2720
|
let baseOptions;
|
|
@@ -2662,14 +2738,173 @@ const PoolSlipApiAxiosParamCreator = function (configuration) {
|
|
|
2662
2738
|
};
|
|
2663
2739
|
};
|
|
2664
2740
|
/**
|
|
2665
|
-
*
|
|
2741
|
+
* OracleApi - functional programming interface
|
|
2666
2742
|
* @export
|
|
2667
2743
|
*/
|
|
2668
|
-
const
|
|
2669
|
-
const localVarAxiosParamCreator =
|
|
2744
|
+
const OracleApiFp = function (configuration) {
|
|
2745
|
+
const localVarAxiosParamCreator = OracleApiAxiosParamCreator(configuration);
|
|
2670
2746
|
return {
|
|
2671
2747
|
/**
|
|
2672
|
-
* Returns
|
|
2748
|
+
* Returns oracle price for a symbol.
|
|
2749
|
+
* @param {string} symbol
|
|
2750
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2751
|
+
* @param {*} [options] Override http request option.
|
|
2752
|
+
* @throws {RequiredError}
|
|
2753
|
+
*/
|
|
2754
|
+
oraclePrice(symbol, height, options) {
|
|
2755
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2756
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.oraclePrice(symbol, height, options);
|
|
2757
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2758
|
+
});
|
|
2759
|
+
},
|
|
2760
|
+
/**
|
|
2761
|
+
* Returns all available oracle prices.
|
|
2762
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2763
|
+
* @param {*} [options] Override http request option.
|
|
2764
|
+
* @throws {RequiredError}
|
|
2765
|
+
*/
|
|
2766
|
+
oraclePrices(height, options) {
|
|
2767
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2768
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.oraclePrices(height, options);
|
|
2769
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2770
|
+
});
|
|
2771
|
+
},
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
/**
|
|
2775
|
+
* OracleApi - factory interface
|
|
2776
|
+
* @export
|
|
2777
|
+
*/
|
|
2778
|
+
const OracleApiFactory = function (configuration, basePath, axios) {
|
|
2779
|
+
const localVarFp = OracleApiFp(configuration);
|
|
2780
|
+
return {
|
|
2781
|
+
/**
|
|
2782
|
+
* Returns oracle price for a symbol.
|
|
2783
|
+
* @param {string} symbol
|
|
2784
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2785
|
+
* @param {*} [options] Override http request option.
|
|
2786
|
+
* @throws {RequiredError}
|
|
2787
|
+
*/
|
|
2788
|
+
oraclePrice(symbol, height, options) {
|
|
2789
|
+
return localVarFp.oraclePrice(symbol, height, options).then((request) => request(axios, basePath));
|
|
2790
|
+
},
|
|
2791
|
+
/**
|
|
2792
|
+
* Returns all available oracle prices.
|
|
2793
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2794
|
+
* @param {*} [options] Override http request option.
|
|
2795
|
+
* @throws {RequiredError}
|
|
2796
|
+
*/
|
|
2797
|
+
oraclePrices(height, options) {
|
|
2798
|
+
return localVarFp.oraclePrices(height, options).then((request) => request(axios, basePath));
|
|
2799
|
+
},
|
|
2800
|
+
};
|
|
2801
|
+
};
|
|
2802
|
+
/**
|
|
2803
|
+
* OracleApi - object-oriented interface
|
|
2804
|
+
* @export
|
|
2805
|
+
* @class OracleApi
|
|
2806
|
+
* @extends {BaseAPI}
|
|
2807
|
+
*/
|
|
2808
|
+
class OracleApi extends BaseAPI {
|
|
2809
|
+
/**
|
|
2810
|
+
* Returns oracle price for a symbol.
|
|
2811
|
+
* @param {string} symbol
|
|
2812
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2813
|
+
* @param {*} [options] Override http request option.
|
|
2814
|
+
* @throws {RequiredError}
|
|
2815
|
+
* @memberof OracleApi
|
|
2816
|
+
*/
|
|
2817
|
+
oraclePrice(symbol, height, options) {
|
|
2818
|
+
return OracleApiFp(this.configuration).oraclePrice(symbol, height, options).then((request) => request(this.axios, this.basePath));
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Returns all available oracle prices.
|
|
2822
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2823
|
+
* @param {*} [options] Override http request option.
|
|
2824
|
+
* @throws {RequiredError}
|
|
2825
|
+
* @memberof OracleApi
|
|
2826
|
+
*/
|
|
2827
|
+
oraclePrices(height, options) {
|
|
2828
|
+
return OracleApiFp(this.configuration).oraclePrices(height, options).then((request) => request(this.axios, this.basePath));
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* PoolSlipApi - axios parameter creator
|
|
2833
|
+
* @export
|
|
2834
|
+
*/
|
|
2835
|
+
const PoolSlipApiAxiosParamCreator = function (configuration) {
|
|
2836
|
+
return {
|
|
2837
|
+
/**
|
|
2838
|
+
* Returns the pool slip information for the provided asset.
|
|
2839
|
+
* @param {string} asset
|
|
2840
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2841
|
+
* @param {*} [options] Override http request option.
|
|
2842
|
+
* @throws {RequiredError}
|
|
2843
|
+
*/
|
|
2844
|
+
poolslip: (asset_1, height_1, ...args_1) => __awaiter(this, [asset_1, height_1, ...args_1], void 0, function* (asset, height, options = {}) {
|
|
2845
|
+
// verify required parameter 'asset' is not null or undefined
|
|
2846
|
+
assertParamExists('poolslip', 'asset', asset);
|
|
2847
|
+
const localVarPath = `/thorchain/slip/{asset}`
|
|
2848
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
2849
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2850
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2851
|
+
let baseOptions;
|
|
2852
|
+
if (configuration) {
|
|
2853
|
+
baseOptions = configuration.baseOptions;
|
|
2854
|
+
}
|
|
2855
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2856
|
+
const localVarHeaderParameter = {};
|
|
2857
|
+
const localVarQueryParameter = {};
|
|
2858
|
+
if (height !== undefined) {
|
|
2859
|
+
localVarQueryParameter['height'] = height;
|
|
2860
|
+
}
|
|
2861
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2862
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2863
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2864
|
+
return {
|
|
2865
|
+
url: toPathString(localVarUrlObj),
|
|
2866
|
+
options: localVarRequestOptions,
|
|
2867
|
+
};
|
|
2868
|
+
}),
|
|
2869
|
+
/**
|
|
2870
|
+
* Returns the pool slip information for all Available Layer 1 pool assets.
|
|
2871
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2872
|
+
* @param {*} [options] Override http request option.
|
|
2873
|
+
* @throws {RequiredError}
|
|
2874
|
+
*/
|
|
2875
|
+
poolslips: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
|
|
2876
|
+
const localVarPath = `/thorchain/slips`;
|
|
2877
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2878
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2879
|
+
let baseOptions;
|
|
2880
|
+
if (configuration) {
|
|
2881
|
+
baseOptions = configuration.baseOptions;
|
|
2882
|
+
}
|
|
2883
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2884
|
+
const localVarHeaderParameter = {};
|
|
2885
|
+
const localVarQueryParameter = {};
|
|
2886
|
+
if (height !== undefined) {
|
|
2887
|
+
localVarQueryParameter['height'] = height;
|
|
2888
|
+
}
|
|
2889
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2890
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2891
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2892
|
+
return {
|
|
2893
|
+
url: toPathString(localVarUrlObj),
|
|
2894
|
+
options: localVarRequestOptions,
|
|
2895
|
+
};
|
|
2896
|
+
}),
|
|
2897
|
+
};
|
|
2898
|
+
};
|
|
2899
|
+
/**
|
|
2900
|
+
* PoolSlipApi - functional programming interface
|
|
2901
|
+
* @export
|
|
2902
|
+
*/
|
|
2903
|
+
const PoolSlipApiFp = function (configuration) {
|
|
2904
|
+
const localVarAxiosParamCreator = PoolSlipApiAxiosParamCreator(configuration);
|
|
2905
|
+
return {
|
|
2906
|
+
/**
|
|
2907
|
+
* Returns the pool slip information for the provided asset.
|
|
2673
2908
|
* @param {string} asset
|
|
2674
2909
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2675
2910
|
* @param {*} [options] Override http request option.
|
|
@@ -3042,6 +3277,98 @@ class PoolsApi extends BaseAPI {
|
|
|
3042
3277
|
*/
|
|
3043
3278
|
const QueueApiAxiosParamCreator = function (configuration) {
|
|
3044
3279
|
return {
|
|
3280
|
+
/**
|
|
3281
|
+
* Returns limit swaps with pagination and filtering.
|
|
3282
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3283
|
+
* @param {number} [offset] Number of items to skip
|
|
3284
|
+
* @param {number} [limit] Number of items to return
|
|
3285
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3286
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3287
|
+
* @param {string} [sender] Filter by sender address
|
|
3288
|
+
* @param {'ratio' | 'age' | 'amount' | 'created_height'} [sortBy] Sort by field
|
|
3289
|
+
* @param {'asc' | 'desc'} [sortOrder] Sort order
|
|
3290
|
+
* @param {*} [options] Override http request option.
|
|
3291
|
+
* @throws {RequiredError}
|
|
3292
|
+
*/
|
|
3293
|
+
limitSwaps: (height_1, offset_1, limit_1, sourceAsset_1, targetAsset_1, sender_1, sortBy_1, sortOrder_1, ...args_1) => __awaiter(this, [height_1, offset_1, limit_1, sourceAsset_1, targetAsset_1, sender_1, sortBy_1, sortOrder_1, ...args_1], void 0, function* (height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options = {}) {
|
|
3294
|
+
const localVarPath = `/thorchain/queue/limit_swaps`;
|
|
3295
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3296
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3297
|
+
let baseOptions;
|
|
3298
|
+
if (configuration) {
|
|
3299
|
+
baseOptions = configuration.baseOptions;
|
|
3300
|
+
}
|
|
3301
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3302
|
+
const localVarHeaderParameter = {};
|
|
3303
|
+
const localVarQueryParameter = {};
|
|
3304
|
+
if (height !== undefined) {
|
|
3305
|
+
localVarQueryParameter['height'] = height;
|
|
3306
|
+
}
|
|
3307
|
+
if (offset !== undefined) {
|
|
3308
|
+
localVarQueryParameter['offset'] = offset;
|
|
3309
|
+
}
|
|
3310
|
+
if (limit !== undefined) {
|
|
3311
|
+
localVarQueryParameter['limit'] = limit;
|
|
3312
|
+
}
|
|
3313
|
+
if (sourceAsset !== undefined) {
|
|
3314
|
+
localVarQueryParameter['source_asset'] = sourceAsset;
|
|
3315
|
+
}
|
|
3316
|
+
if (targetAsset !== undefined) {
|
|
3317
|
+
localVarQueryParameter['target_asset'] = targetAsset;
|
|
3318
|
+
}
|
|
3319
|
+
if (sender !== undefined) {
|
|
3320
|
+
localVarQueryParameter['sender'] = sender;
|
|
3321
|
+
}
|
|
3322
|
+
if (sortBy !== undefined) {
|
|
3323
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
3324
|
+
}
|
|
3325
|
+
if (sortOrder !== undefined) {
|
|
3326
|
+
localVarQueryParameter['sort_order'] = sortOrder;
|
|
3327
|
+
}
|
|
3328
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3329
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3330
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3331
|
+
return {
|
|
3332
|
+
url: toPathString(localVarUrlObj),
|
|
3333
|
+
options: localVarRequestOptions,
|
|
3334
|
+
};
|
|
3335
|
+
}),
|
|
3336
|
+
/**
|
|
3337
|
+
* Returns limit swaps summary statistics.
|
|
3338
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3339
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3340
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3341
|
+
* @param {*} [options] Override http request option.
|
|
3342
|
+
* @throws {RequiredError}
|
|
3343
|
+
*/
|
|
3344
|
+
limitSwapsSummary: (height_1, sourceAsset_1, targetAsset_1, ...args_1) => __awaiter(this, [height_1, sourceAsset_1, targetAsset_1, ...args_1], void 0, function* (height, sourceAsset, targetAsset, options = {}) {
|
|
3345
|
+
const localVarPath = `/thorchain/queue/limit_swaps/summary`;
|
|
3346
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3347
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3348
|
+
let baseOptions;
|
|
3349
|
+
if (configuration) {
|
|
3350
|
+
baseOptions = configuration.baseOptions;
|
|
3351
|
+
}
|
|
3352
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3353
|
+
const localVarHeaderParameter = {};
|
|
3354
|
+
const localVarQueryParameter = {};
|
|
3355
|
+
if (height !== undefined) {
|
|
3356
|
+
localVarQueryParameter['height'] = height;
|
|
3357
|
+
}
|
|
3358
|
+
if (sourceAsset !== undefined) {
|
|
3359
|
+
localVarQueryParameter['source_asset'] = sourceAsset;
|
|
3360
|
+
}
|
|
3361
|
+
if (targetAsset !== undefined) {
|
|
3362
|
+
localVarQueryParameter['target_asset'] = targetAsset;
|
|
3363
|
+
}
|
|
3364
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3365
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3366
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3367
|
+
return {
|
|
3368
|
+
url: toPathString(localVarUrlObj),
|
|
3369
|
+
options: localVarRequestOptions,
|
|
3370
|
+
};
|
|
3371
|
+
}),
|
|
3045
3372
|
/**
|
|
3046
3373
|
* Returns queue statistics.
|
|
3047
3374
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -3163,6 +3490,39 @@ const QueueApiAxiosParamCreator = function (configuration) {
|
|
|
3163
3490
|
const QueueApiFp = function (configuration) {
|
|
3164
3491
|
const localVarAxiosParamCreator = QueueApiAxiosParamCreator(configuration);
|
|
3165
3492
|
return {
|
|
3493
|
+
/**
|
|
3494
|
+
* Returns limit swaps with pagination and filtering.
|
|
3495
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3496
|
+
* @param {number} [offset] Number of items to skip
|
|
3497
|
+
* @param {number} [limit] Number of items to return
|
|
3498
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3499
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3500
|
+
* @param {string} [sender] Filter by sender address
|
|
3501
|
+
* @param {'ratio' | 'age' | 'amount' | 'created_height'} [sortBy] Sort by field
|
|
3502
|
+
* @param {'asc' | 'desc'} [sortOrder] Sort order
|
|
3503
|
+
* @param {*} [options] Override http request option.
|
|
3504
|
+
* @throws {RequiredError}
|
|
3505
|
+
*/
|
|
3506
|
+
limitSwaps(height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options) {
|
|
3507
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3508
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.limitSwaps(height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options);
|
|
3509
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3510
|
+
});
|
|
3511
|
+
},
|
|
3512
|
+
/**
|
|
3513
|
+
* Returns limit swaps summary statistics.
|
|
3514
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3515
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3516
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3517
|
+
* @param {*} [options] Override http request option.
|
|
3518
|
+
* @throws {RequiredError}
|
|
3519
|
+
*/
|
|
3520
|
+
limitSwapsSummary(height, sourceAsset, targetAsset, options) {
|
|
3521
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3522
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.limitSwapsSummary(height, sourceAsset, targetAsset, options);
|
|
3523
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3524
|
+
});
|
|
3525
|
+
},
|
|
3166
3526
|
/**
|
|
3167
3527
|
* Returns queue statistics.
|
|
3168
3528
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -3220,6 +3580,33 @@ const QueueApiFp = function (configuration) {
|
|
|
3220
3580
|
const QueueApiFactory = function (configuration, basePath, axios) {
|
|
3221
3581
|
const localVarFp = QueueApiFp(configuration);
|
|
3222
3582
|
return {
|
|
3583
|
+
/**
|
|
3584
|
+
* Returns limit swaps with pagination and filtering.
|
|
3585
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3586
|
+
* @param {number} [offset] Number of items to skip
|
|
3587
|
+
* @param {number} [limit] Number of items to return
|
|
3588
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3589
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3590
|
+
* @param {string} [sender] Filter by sender address
|
|
3591
|
+
* @param {'ratio' | 'age' | 'amount' | 'created_height'} [sortBy] Sort by field
|
|
3592
|
+
* @param {'asc' | 'desc'} [sortOrder] Sort order
|
|
3593
|
+
* @param {*} [options] Override http request option.
|
|
3594
|
+
* @throws {RequiredError}
|
|
3595
|
+
*/
|
|
3596
|
+
limitSwaps(height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options) {
|
|
3597
|
+
return localVarFp.limitSwaps(height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options).then((request) => request(axios, basePath));
|
|
3598
|
+
},
|
|
3599
|
+
/**
|
|
3600
|
+
* Returns limit swaps summary statistics.
|
|
3601
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3602
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3603
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3604
|
+
* @param {*} [options] Override http request option.
|
|
3605
|
+
* @throws {RequiredError}
|
|
3606
|
+
*/
|
|
3607
|
+
limitSwapsSummary(height, sourceAsset, targetAsset, options) {
|
|
3608
|
+
return localVarFp.limitSwapsSummary(height, sourceAsset, targetAsset, options).then((request) => request(axios, basePath));
|
|
3609
|
+
},
|
|
3223
3610
|
/**
|
|
3224
3611
|
* Returns queue statistics.
|
|
3225
3612
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -3265,6 +3652,35 @@ const QueueApiFactory = function (configuration, basePath, axios) {
|
|
|
3265
3652
|
* @extends {BaseAPI}
|
|
3266
3653
|
*/
|
|
3267
3654
|
class QueueApi extends BaseAPI {
|
|
3655
|
+
/**
|
|
3656
|
+
* Returns limit swaps with pagination and filtering.
|
|
3657
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3658
|
+
* @param {number} [offset] Number of items to skip
|
|
3659
|
+
* @param {number} [limit] Number of items to return
|
|
3660
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3661
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3662
|
+
* @param {string} [sender] Filter by sender address
|
|
3663
|
+
* @param {'ratio' | 'age' | 'amount' | 'created_height'} [sortBy] Sort by field
|
|
3664
|
+
* @param {'asc' | 'desc'} [sortOrder] Sort order
|
|
3665
|
+
* @param {*} [options] Override http request option.
|
|
3666
|
+
* @throws {RequiredError}
|
|
3667
|
+
* @memberof QueueApi
|
|
3668
|
+
*/
|
|
3669
|
+
limitSwaps(height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options) {
|
|
3670
|
+
return QueueApiFp(this.configuration).limitSwaps(height, offset, limit, sourceAsset, targetAsset, sender, sortBy, sortOrder, options).then((request) => request(this.axios, this.basePath));
|
|
3671
|
+
}
|
|
3672
|
+
/**
|
|
3673
|
+
* Returns limit swaps summary statistics.
|
|
3674
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3675
|
+
* @param {string} [sourceAsset] Filter by source asset (e.g., \"BTC.BTC\")
|
|
3676
|
+
* @param {string} [targetAsset] Filter by target asset (e.g., \"ETH.ETH\")
|
|
3677
|
+
* @param {*} [options] Override http request option.
|
|
3678
|
+
* @throws {RequiredError}
|
|
3679
|
+
* @memberof QueueApi
|
|
3680
|
+
*/
|
|
3681
|
+
limitSwapsSummary(height, sourceAsset, targetAsset, options) {
|
|
3682
|
+
return QueueApiFp(this.configuration).limitSwapsSummary(height, sourceAsset, targetAsset, options).then((request) => request(this.axios, this.basePath));
|
|
3683
|
+
}
|
|
3268
3684
|
/**
|
|
3269
3685
|
* Returns queue statistics.
|
|
3270
3686
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -3313,18 +3729,24 @@ class QueueApi extends BaseAPI {
|
|
|
3313
3729
|
const QuoteApiAxiosParamCreator = function (configuration) {
|
|
3314
3730
|
return {
|
|
3315
3731
|
/**
|
|
3316
|
-
* Provide a quote estimate for the provided
|
|
3732
|
+
* Provide a quote estimate for the provided swap.
|
|
3317
3733
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3318
|
-
* @param {string} [fromAsset] the asset
|
|
3319
|
-
* @param {
|
|
3320
|
-
* @param {
|
|
3321
|
-
* @param {string} [
|
|
3322
|
-
* @param {string} [
|
|
3734
|
+
* @param {string} [fromAsset] the source asset
|
|
3735
|
+
* @param {string} [toAsset] the target asset
|
|
3736
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3737
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
3738
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3739
|
+
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3740
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3741
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3742
|
+
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3743
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3744
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3323
3745
|
* @param {*} [options] Override http request option.
|
|
3324
3746
|
* @throws {RequiredError}
|
|
3325
3747
|
*/
|
|
3326
|
-
|
|
3327
|
-
const localVarPath = `/thorchain/quote/
|
|
3748
|
+
quoteswap: (height_1, fromAsset_1, toAsset_1, amount_1, destination_1, refundAddress_1, streamingInterval_1, streamingQuantity_1, toleranceBps_1, liquidityToleranceBps_1, affiliateBps_1, affiliate_1, ...args_1) => __awaiter(this, [height_1, fromAsset_1, toAsset_1, amount_1, destination_1, refundAddress_1, streamingInterval_1, streamingQuantity_1, toleranceBps_1, liquidityToleranceBps_1, affiliateBps_1, affiliate_1, ...args_1], void 0, function* (height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options = {}) {
|
|
3749
|
+
const localVarPath = `/thorchain/quote/swap`;
|
|
3328
3750
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3329
3751
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3330
3752
|
let baseOptions;
|
|
@@ -3340,67 +3762,29 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3340
3762
|
if (fromAsset !== undefined) {
|
|
3341
3763
|
localVarQueryParameter['from_asset'] = fromAsset;
|
|
3342
3764
|
}
|
|
3343
|
-
if (repayBps !== undefined) {
|
|
3344
|
-
localVarQueryParameter['repay_bps'] = repayBps;
|
|
3345
|
-
}
|
|
3346
3765
|
if (toAsset !== undefined) {
|
|
3347
3766
|
localVarQueryParameter['to_asset'] = toAsset;
|
|
3348
3767
|
}
|
|
3349
|
-
if (
|
|
3350
|
-
localVarQueryParameter['
|
|
3768
|
+
if (amount !== undefined) {
|
|
3769
|
+
localVarQueryParameter['amount'] = amount;
|
|
3351
3770
|
}
|
|
3352
|
-
if (
|
|
3353
|
-
localVarQueryParameter['
|
|
3771
|
+
if (destination !== undefined) {
|
|
3772
|
+
localVarQueryParameter['destination'] = destination;
|
|
3354
3773
|
}
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3358
|
-
return {
|
|
3359
|
-
url: toPathString(localVarUrlObj),
|
|
3360
|
-
options: localVarRequestOptions,
|
|
3361
|
-
};
|
|
3362
|
-
}),
|
|
3363
|
-
/**
|
|
3364
|
-
* Provide a quote estimate for the provided loan open.
|
|
3365
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3366
|
-
* @param {string} [fromAsset] the collateral asset
|
|
3367
|
-
* @param {number} [amount] the collateral asset amount in 1e8 decimals
|
|
3368
|
-
* @param {string} [toAsset] the target asset to receive (loan denominated in TOR regardless)
|
|
3369
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3370
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3371
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3372
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3373
|
-
* @param {*} [options] Override http request option.
|
|
3374
|
-
* @throws {RequiredError}
|
|
3375
|
-
*/
|
|
3376
|
-
quoteloanopen: (height_1, fromAsset_1, amount_1, toAsset_1, destination_1, minOut_1, affiliateBps_1, affiliate_1, ...args_1) => __awaiter(this, [height_1, fromAsset_1, amount_1, toAsset_1, destination_1, minOut_1, affiliateBps_1, affiliate_1, ...args_1], void 0, function* (height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options = {}) {
|
|
3377
|
-
const localVarPath = `/thorchain/quote/loan/open`;
|
|
3378
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3379
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3380
|
-
let baseOptions;
|
|
3381
|
-
if (configuration) {
|
|
3382
|
-
baseOptions = configuration.baseOptions;
|
|
3383
|
-
}
|
|
3384
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3385
|
-
const localVarHeaderParameter = {};
|
|
3386
|
-
const localVarQueryParameter = {};
|
|
3387
|
-
if (height !== undefined) {
|
|
3388
|
-
localVarQueryParameter['height'] = height;
|
|
3389
|
-
}
|
|
3390
|
-
if (fromAsset !== undefined) {
|
|
3391
|
-
localVarQueryParameter['from_asset'] = fromAsset;
|
|
3774
|
+
if (refundAddress !== undefined) {
|
|
3775
|
+
localVarQueryParameter['refund_address'] = refundAddress;
|
|
3392
3776
|
}
|
|
3393
|
-
if (
|
|
3394
|
-
localVarQueryParameter['
|
|
3777
|
+
if (streamingInterval !== undefined) {
|
|
3778
|
+
localVarQueryParameter['streaming_interval'] = streamingInterval;
|
|
3395
3779
|
}
|
|
3396
|
-
if (
|
|
3397
|
-
localVarQueryParameter['
|
|
3780
|
+
if (streamingQuantity !== undefined) {
|
|
3781
|
+
localVarQueryParameter['streaming_quantity'] = streamingQuantity;
|
|
3398
3782
|
}
|
|
3399
|
-
if (
|
|
3400
|
-
localVarQueryParameter['
|
|
3783
|
+
if (toleranceBps !== undefined) {
|
|
3784
|
+
localVarQueryParameter['tolerance_bps'] = toleranceBps;
|
|
3401
3785
|
}
|
|
3402
|
-
if (
|
|
3403
|
-
localVarQueryParameter['
|
|
3786
|
+
if (liquidityToleranceBps !== undefined) {
|
|
3787
|
+
localVarQueryParameter['liquidity_tolerance_bps'] = liquidityToleranceBps;
|
|
3404
3788
|
}
|
|
3405
3789
|
if (affiliateBps !== undefined) {
|
|
3406
3790
|
localVarQueryParameter['affiliate_bps'] = affiliateBps;
|
|
@@ -3416,16 +3800,112 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3416
3800
|
options: localVarRequestOptions,
|
|
3417
3801
|
};
|
|
3418
3802
|
}),
|
|
3803
|
+
};
|
|
3804
|
+
};
|
|
3805
|
+
/**
|
|
3806
|
+
* QuoteApi - functional programming interface
|
|
3807
|
+
* @export
|
|
3808
|
+
*/
|
|
3809
|
+
const QuoteApiFp = function (configuration) {
|
|
3810
|
+
const localVarAxiosParamCreator = QuoteApiAxiosParamCreator(configuration);
|
|
3811
|
+
return {
|
|
3419
3812
|
/**
|
|
3420
|
-
* Provide a quote estimate for the provided
|
|
3813
|
+
* Provide a quote estimate for the provided swap.
|
|
3421
3814
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3422
|
-
* @param {string} [
|
|
3815
|
+
* @param {string} [fromAsset] the source asset
|
|
3816
|
+
* @param {string} [toAsset] the target asset
|
|
3423
3817
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3818
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
3819
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3820
|
+
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3821
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3822
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3823
|
+
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3824
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3825
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3424
3826
|
* @param {*} [options] Override http request option.
|
|
3425
3827
|
* @throws {RequiredError}
|
|
3426
3828
|
*/
|
|
3427
|
-
|
|
3428
|
-
|
|
3829
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options) {
|
|
3830
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3831
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options);
|
|
3832
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3833
|
+
});
|
|
3834
|
+
},
|
|
3835
|
+
};
|
|
3836
|
+
};
|
|
3837
|
+
/**
|
|
3838
|
+
* QuoteApi - factory interface
|
|
3839
|
+
* @export
|
|
3840
|
+
*/
|
|
3841
|
+
const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
3842
|
+
const localVarFp = QuoteApiFp(configuration);
|
|
3843
|
+
return {
|
|
3844
|
+
/**
|
|
3845
|
+
* Provide a quote estimate for the provided swap.
|
|
3846
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3847
|
+
* @param {string} [fromAsset] the source asset
|
|
3848
|
+
* @param {string} [toAsset] the target asset
|
|
3849
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3850
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
3851
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3852
|
+
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3853
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3854
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3855
|
+
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3856
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3857
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3858
|
+
* @param {*} [options] Override http request option.
|
|
3859
|
+
* @throws {RequiredError}
|
|
3860
|
+
*/
|
|
3861
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options) {
|
|
3862
|
+
return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
|
|
3863
|
+
},
|
|
3864
|
+
};
|
|
3865
|
+
};
|
|
3866
|
+
/**
|
|
3867
|
+
* QuoteApi - object-oriented interface
|
|
3868
|
+
* @export
|
|
3869
|
+
* @class QuoteApi
|
|
3870
|
+
* @extends {BaseAPI}
|
|
3871
|
+
*/
|
|
3872
|
+
class QuoteApi extends BaseAPI {
|
|
3873
|
+
/**
|
|
3874
|
+
* Provide a quote estimate for the provided swap.
|
|
3875
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3876
|
+
* @param {string} [fromAsset] the source asset
|
|
3877
|
+
* @param {string} [toAsset] the target asset
|
|
3878
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3879
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
3880
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3881
|
+
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3882
|
+
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3883
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3884
|
+
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3885
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3886
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3887
|
+
* @param {*} [options] Override http request option.
|
|
3888
|
+
* @throws {RequiredError}
|
|
3889
|
+
* @memberof QuoteApi
|
|
3890
|
+
*/
|
|
3891
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options) {
|
|
3892
|
+
return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, liquidityToleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
/**
|
|
3896
|
+
* RUNEPoolApi - axios parameter creator
|
|
3897
|
+
* @export
|
|
3898
|
+
*/
|
|
3899
|
+
const RUNEPoolApiAxiosParamCreator = function (configuration) {
|
|
3900
|
+
return {
|
|
3901
|
+
/**
|
|
3902
|
+
* Returns the pool information for the RUNE pool.
|
|
3903
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3904
|
+
* @param {*} [options] Override http request option.
|
|
3905
|
+
* @throws {RequiredError}
|
|
3906
|
+
*/
|
|
3907
|
+
runePool: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
|
|
3908
|
+
const localVarPath = `/thorchain/runepool`;
|
|
3429
3909
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3430
3910
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3431
3911
|
let baseOptions;
|
|
@@ -3438,12 +3918,6 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3438
3918
|
if (height !== undefined) {
|
|
3439
3919
|
localVarQueryParameter['height'] = height;
|
|
3440
3920
|
}
|
|
3441
|
-
if (asset !== undefined) {
|
|
3442
|
-
localVarQueryParameter['asset'] = asset;
|
|
3443
|
-
}
|
|
3444
|
-
if (amount !== undefined) {
|
|
3445
|
-
localVarQueryParameter['amount'] = amount;
|
|
3446
|
-
}
|
|
3447
3921
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3448
3922
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3449
3923
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -3453,16 +3927,17 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3453
3927
|
};
|
|
3454
3928
|
}),
|
|
3455
3929
|
/**
|
|
3456
|
-
*
|
|
3930
|
+
* Returns the RUNE Provider information for an address.
|
|
3931
|
+
* @param {string} address
|
|
3457
3932
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3458
|
-
* @param {string} [asset] the asset to withdraw
|
|
3459
|
-
* @param {string} [address] the address for the position
|
|
3460
|
-
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
3461
3933
|
* @param {*} [options] Override http request option.
|
|
3462
3934
|
* @throws {RequiredError}
|
|
3463
3935
|
*/
|
|
3464
|
-
|
|
3465
|
-
|
|
3936
|
+
runeProvider: (address_1, height_1, ...args_1) => __awaiter(this, [address_1, height_1, ...args_1], void 0, function* (address, height, options = {}) {
|
|
3937
|
+
// verify required parameter 'address' is not null or undefined
|
|
3938
|
+
assertParamExists('runeProvider', 'address', address);
|
|
3939
|
+
const localVarPath = `/thorchain/rune_provider/{address}`
|
|
3940
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
3466
3941
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3467
3942
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3468
3943
|
let baseOptions;
|
|
@@ -3475,15 +3950,6 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3475
3950
|
if (height !== undefined) {
|
|
3476
3951
|
localVarQueryParameter['height'] = height;
|
|
3477
3952
|
}
|
|
3478
|
-
if (asset !== undefined) {
|
|
3479
|
-
localVarQueryParameter['asset'] = asset;
|
|
3480
|
-
}
|
|
3481
|
-
if (address !== undefined) {
|
|
3482
|
-
localVarQueryParameter['address'] = address;
|
|
3483
|
-
}
|
|
3484
|
-
if (withdrawBps !== undefined) {
|
|
3485
|
-
localVarQueryParameter['withdraw_bps'] = withdrawBps;
|
|
3486
|
-
}
|
|
3487
3953
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3488
3954
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3489
3955
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -3493,24 +3959,13 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3493
3959
|
};
|
|
3494
3960
|
}),
|
|
3495
3961
|
/**
|
|
3496
|
-
*
|
|
3962
|
+
* Returns all RUNE Providers.
|
|
3497
3963
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3498
|
-
* @param {string} [fromAsset] the source asset
|
|
3499
|
-
* @param {string} [toAsset] the target asset
|
|
3500
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3501
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3502
|
-
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3503
|
-
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3504
|
-
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3505
|
-
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3506
|
-
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3507
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3508
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3509
3964
|
* @param {*} [options] Override http request option.
|
|
3510
3965
|
* @throws {RequiredError}
|
|
3511
3966
|
*/
|
|
3512
|
-
|
|
3513
|
-
const localVarPath = `/thorchain/
|
|
3967
|
+
runeProviders: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
|
|
3968
|
+
const localVarPath = `/thorchain/rune_providers`;
|
|
3514
3969
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3515
3970
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3516
3971
|
let baseOptions;
|
|
@@ -3523,39 +3978,6 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3523
3978
|
if (height !== undefined) {
|
|
3524
3979
|
localVarQueryParameter['height'] = height;
|
|
3525
3980
|
}
|
|
3526
|
-
if (fromAsset !== undefined) {
|
|
3527
|
-
localVarQueryParameter['from_asset'] = fromAsset;
|
|
3528
|
-
}
|
|
3529
|
-
if (toAsset !== undefined) {
|
|
3530
|
-
localVarQueryParameter['to_asset'] = toAsset;
|
|
3531
|
-
}
|
|
3532
|
-
if (amount !== undefined) {
|
|
3533
|
-
localVarQueryParameter['amount'] = amount;
|
|
3534
|
-
}
|
|
3535
|
-
if (destination !== undefined) {
|
|
3536
|
-
localVarQueryParameter['destination'] = destination;
|
|
3537
|
-
}
|
|
3538
|
-
if (refundAddress !== undefined) {
|
|
3539
|
-
localVarQueryParameter['refund_address'] = refundAddress;
|
|
3540
|
-
}
|
|
3541
|
-
if (streamingInterval !== undefined) {
|
|
3542
|
-
localVarQueryParameter['streaming_interval'] = streamingInterval;
|
|
3543
|
-
}
|
|
3544
|
-
if (streamingQuantity !== undefined) {
|
|
3545
|
-
localVarQueryParameter['streaming_quantity'] = streamingQuantity;
|
|
3546
|
-
}
|
|
3547
|
-
if (toleranceBps !== undefined) {
|
|
3548
|
-
localVarQueryParameter['tolerance_bps'] = toleranceBps;
|
|
3549
|
-
}
|
|
3550
|
-
if (liquidityToleranceBps !== undefined) {
|
|
3551
|
-
localVarQueryParameter['liquidity_tolerance_bps'] = liquidityToleranceBps;
|
|
3552
|
-
}
|
|
3553
|
-
if (affiliateBps !== undefined) {
|
|
3554
|
-
localVarQueryParameter['affiliate_bps'] = affiliateBps;
|
|
3555
|
-
}
|
|
3556
|
-
if (affiliate !== undefined) {
|
|
3557
|
-
localVarQueryParameter['affiliate'] = affiliate;
|
|
3558
|
-
}
|
|
3559
3981
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3560
3982
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3561
3983
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -3567,284 +3989,149 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
3567
3989
|
};
|
|
3568
3990
|
};
|
|
3569
3991
|
/**
|
|
3570
|
-
*
|
|
3992
|
+
* RUNEPoolApi - functional programming interface
|
|
3571
3993
|
* @export
|
|
3572
3994
|
*/
|
|
3573
|
-
const
|
|
3574
|
-
const localVarAxiosParamCreator =
|
|
3995
|
+
const RUNEPoolApiFp = function (configuration) {
|
|
3996
|
+
const localVarAxiosParamCreator = RUNEPoolApiAxiosParamCreator(configuration);
|
|
3575
3997
|
return {
|
|
3576
3998
|
/**
|
|
3577
|
-
*
|
|
3578
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3579
|
-
* @param {string} [fromAsset] the asset used to repay the loan
|
|
3580
|
-
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
3581
|
-
* @param {string} [toAsset] the collateral asset of the loan
|
|
3582
|
-
* @param {string} [loanOwner] the owner of the loan collateral
|
|
3583
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3584
|
-
* @param {*} [options] Override http request option.
|
|
3585
|
-
* @throws {RequiredError}
|
|
3586
|
-
*/
|
|
3587
|
-
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3588
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
3589
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options);
|
|
3590
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3591
|
-
});
|
|
3592
|
-
},
|
|
3593
|
-
/**
|
|
3594
|
-
* Provide a quote estimate for the provided loan open.
|
|
3595
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3596
|
-
* @param {string} [fromAsset] the collateral asset
|
|
3597
|
-
* @param {number} [amount] the collateral asset amount in 1e8 decimals
|
|
3598
|
-
* @param {string} [toAsset] the target asset to receive (loan denominated in TOR regardless)
|
|
3599
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3600
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3601
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3602
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3603
|
-
* @param {*} [options] Override http request option.
|
|
3604
|
-
* @throws {RequiredError}
|
|
3605
|
-
*/
|
|
3606
|
-
quoteloanopen(height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options) {
|
|
3607
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
3608
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanopen(height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options);
|
|
3609
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3610
|
-
});
|
|
3611
|
-
},
|
|
3612
|
-
/**
|
|
3613
|
-
* Provide a quote estimate for the provided saver deposit.
|
|
3999
|
+
* Returns the pool information for the RUNE pool.
|
|
3614
4000
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3615
|
-
* @param {string} [asset] the asset to deposit
|
|
3616
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3617
4001
|
* @param {*} [options] Override http request option.
|
|
3618
4002
|
* @throws {RequiredError}
|
|
3619
4003
|
*/
|
|
3620
|
-
|
|
4004
|
+
runePool(height, options) {
|
|
3621
4005
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3622
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4006
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.runePool(height, options);
|
|
3623
4007
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3624
4008
|
});
|
|
3625
4009
|
},
|
|
3626
4010
|
/**
|
|
3627
|
-
*
|
|
4011
|
+
* Returns the RUNE Provider information for an address.
|
|
4012
|
+
* @param {string} address
|
|
3628
4013
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3629
|
-
* @param {string} [asset] the asset to withdraw
|
|
3630
|
-
* @param {string} [address] the address for the position
|
|
3631
|
-
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
3632
4014
|
* @param {*} [options] Override http request option.
|
|
3633
4015
|
* @throws {RequiredError}
|
|
3634
4016
|
*/
|
|
3635
|
-
|
|
4017
|
+
runeProvider(address, height, options) {
|
|
3636
4018
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3637
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4019
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.runeProvider(address, height, options);
|
|
3638
4020
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3639
4021
|
});
|
|
3640
4022
|
},
|
|
3641
4023
|
/**
|
|
3642
|
-
*
|
|
4024
|
+
* Returns all RUNE Providers.
|
|
3643
4025
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3644
|
-
* @param {string} [fromAsset] the source asset
|
|
3645
|
-
* @param {string} [toAsset] the target asset
|
|
3646
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3647
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3648
|
-
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3649
|
-
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3650
|
-
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3651
|
-
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3652
|
-
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3653
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3654
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3655
4026
|
* @param {*} [options] Override http request option.
|
|
3656
4027
|
* @throws {RequiredError}
|
|
3657
4028
|
*/
|
|
3658
|
-
|
|
4029
|
+
runeProviders(height, options) {
|
|
3659
4030
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3660
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4031
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.runeProviders(height, options);
|
|
3661
4032
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3662
4033
|
});
|
|
3663
4034
|
},
|
|
3664
4035
|
};
|
|
3665
4036
|
};
|
|
3666
4037
|
/**
|
|
3667
|
-
*
|
|
4038
|
+
* RUNEPoolApi - factory interface
|
|
3668
4039
|
* @export
|
|
3669
4040
|
*/
|
|
3670
|
-
const
|
|
3671
|
-
const localVarFp =
|
|
4041
|
+
const RUNEPoolApiFactory = function (configuration, basePath, axios) {
|
|
4042
|
+
const localVarFp = RUNEPoolApiFp(configuration);
|
|
3672
4043
|
return {
|
|
3673
4044
|
/**
|
|
3674
|
-
*
|
|
3675
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3676
|
-
* @param {string} [fromAsset] the asset used to repay the loan
|
|
3677
|
-
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
3678
|
-
* @param {string} [toAsset] the collateral asset of the loan
|
|
3679
|
-
* @param {string} [loanOwner] the owner of the loan collateral
|
|
3680
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3681
|
-
* @param {*} [options] Override http request option.
|
|
3682
|
-
* @throws {RequiredError}
|
|
3683
|
-
*/
|
|
3684
|
-
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3685
|
-
return localVarFp.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
|
|
3686
|
-
},
|
|
3687
|
-
/**
|
|
3688
|
-
* Provide a quote estimate for the provided loan open.
|
|
3689
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3690
|
-
* @param {string} [fromAsset] the collateral asset
|
|
3691
|
-
* @param {number} [amount] the collateral asset amount in 1e8 decimals
|
|
3692
|
-
* @param {string} [toAsset] the target asset to receive (loan denominated in TOR regardless)
|
|
3693
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3694
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3695
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3696
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3697
|
-
* @param {*} [options] Override http request option.
|
|
3698
|
-
* @throws {RequiredError}
|
|
3699
|
-
*/
|
|
3700
|
-
quoteloanopen(height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options) {
|
|
3701
|
-
return localVarFp.quoteloanopen(height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
|
|
3702
|
-
},
|
|
3703
|
-
/**
|
|
3704
|
-
* Provide a quote estimate for the provided saver deposit.
|
|
4045
|
+
* Returns the pool information for the RUNE pool.
|
|
3705
4046
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3706
|
-
* @param {string} [asset] the asset to deposit
|
|
3707
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3708
4047
|
* @param {*} [options] Override http request option.
|
|
3709
4048
|
* @throws {RequiredError}
|
|
3710
4049
|
*/
|
|
3711
|
-
|
|
3712
|
-
return localVarFp.
|
|
4050
|
+
runePool(height, options) {
|
|
4051
|
+
return localVarFp.runePool(height, options).then((request) => request(axios, basePath));
|
|
3713
4052
|
},
|
|
3714
4053
|
/**
|
|
3715
|
-
*
|
|
4054
|
+
* Returns the RUNE Provider information for an address.
|
|
4055
|
+
* @param {string} address
|
|
3716
4056
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3717
|
-
* @param {string} [asset] the asset to withdraw
|
|
3718
|
-
* @param {string} [address] the address for the position
|
|
3719
|
-
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
3720
4057
|
* @param {*} [options] Override http request option.
|
|
3721
4058
|
* @throws {RequiredError}
|
|
3722
|
-
*/
|
|
3723
|
-
|
|
3724
|
-
return localVarFp.
|
|
3725
|
-
},
|
|
3726
|
-
/**
|
|
3727
|
-
*
|
|
3728
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3729
|
-
* @param {string} [fromAsset] the source asset
|
|
3730
|
-
* @param {string} [toAsset] the target asset
|
|
3731
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3732
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3733
|
-
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3734
|
-
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3735
|
-
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3736
|
-
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3737
|
-
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3738
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3739
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
4059
|
+
*/
|
|
4060
|
+
runeProvider(address, height, options) {
|
|
4061
|
+
return localVarFp.runeProvider(address, height, options).then((request) => request(axios, basePath));
|
|
4062
|
+
},
|
|
4063
|
+
/**
|
|
4064
|
+
* Returns all RUNE Providers.
|
|
4065
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3740
4066
|
* @param {*} [options] Override http request option.
|
|
3741
4067
|
* @throws {RequiredError}
|
|
3742
4068
|
*/
|
|
3743
|
-
|
|
3744
|
-
return localVarFp.
|
|
4069
|
+
runeProviders(height, options) {
|
|
4070
|
+
return localVarFp.runeProviders(height, options).then((request) => request(axios, basePath));
|
|
3745
4071
|
},
|
|
3746
4072
|
};
|
|
3747
4073
|
};
|
|
3748
4074
|
/**
|
|
3749
|
-
*
|
|
4075
|
+
* RUNEPoolApi - object-oriented interface
|
|
3750
4076
|
* @export
|
|
3751
|
-
* @class
|
|
4077
|
+
* @class RUNEPoolApi
|
|
3752
4078
|
* @extends {BaseAPI}
|
|
3753
4079
|
*/
|
|
3754
|
-
class
|
|
3755
|
-
/**
|
|
3756
|
-
* Provide a quote estimate for the provided loan close.
|
|
3757
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3758
|
-
* @param {string} [fromAsset] the asset used to repay the loan
|
|
3759
|
-
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
3760
|
-
* @param {string} [toAsset] the collateral asset of the loan
|
|
3761
|
-
* @param {string} [loanOwner] the owner of the loan collateral
|
|
3762
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3763
|
-
* @param {*} [options] Override http request option.
|
|
3764
|
-
* @throws {RequiredError}
|
|
3765
|
-
* @memberof QuoteApi
|
|
3766
|
-
*/
|
|
3767
|
-
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3768
|
-
return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
|
|
3769
|
-
}
|
|
3770
|
-
/**
|
|
3771
|
-
* Provide a quote estimate for the provided loan open.
|
|
3772
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
3773
|
-
* @param {string} [fromAsset] the collateral asset
|
|
3774
|
-
* @param {number} [amount] the collateral asset amount in 1e8 decimals
|
|
3775
|
-
* @param {string} [toAsset] the target asset to receive (loan denominated in TOR regardless)
|
|
3776
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3777
|
-
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
3778
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3779
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3780
|
-
* @param {*} [options] Override http request option.
|
|
3781
|
-
* @throws {RequiredError}
|
|
3782
|
-
* @memberof QuoteApi
|
|
3783
|
-
*/
|
|
3784
|
-
quoteloanopen(height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options) {
|
|
3785
|
-
return QuoteApiFp(this.configuration).quoteloanopen(height, fromAsset, amount, toAsset, destination, minOut, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
|
|
3786
|
-
}
|
|
4080
|
+
class RUNEPoolApi extends BaseAPI {
|
|
3787
4081
|
/**
|
|
3788
|
-
*
|
|
4082
|
+
* Returns the pool information for the RUNE pool.
|
|
3789
4083
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3790
|
-
* @param {string} [asset] the asset to deposit
|
|
3791
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3792
4084
|
* @param {*} [options] Override http request option.
|
|
3793
4085
|
* @throws {RequiredError}
|
|
3794
|
-
* @memberof
|
|
4086
|
+
* @memberof RUNEPoolApi
|
|
3795
4087
|
*/
|
|
3796
|
-
|
|
3797
|
-
return
|
|
4088
|
+
runePool(height, options) {
|
|
4089
|
+
return RUNEPoolApiFp(this.configuration).runePool(height, options).then((request) => request(this.axios, this.basePath));
|
|
3798
4090
|
}
|
|
3799
4091
|
/**
|
|
3800
|
-
*
|
|
4092
|
+
* Returns the RUNE Provider information for an address.
|
|
4093
|
+
* @param {string} address
|
|
3801
4094
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3802
|
-
* @param {string} [asset] the asset to withdraw
|
|
3803
|
-
* @param {string} [address] the address for the position
|
|
3804
|
-
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
3805
4095
|
* @param {*} [options] Override http request option.
|
|
3806
4096
|
* @throws {RequiredError}
|
|
3807
|
-
* @memberof
|
|
4097
|
+
* @memberof RUNEPoolApi
|
|
3808
4098
|
*/
|
|
3809
|
-
|
|
3810
|
-
return
|
|
4099
|
+
runeProvider(address, height, options) {
|
|
4100
|
+
return RUNEPoolApiFp(this.configuration).runeProvider(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
3811
4101
|
}
|
|
3812
4102
|
/**
|
|
3813
|
-
*
|
|
4103
|
+
* Returns all RUNE Providers.
|
|
3814
4104
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3815
|
-
* @param {string} [fromAsset] the source asset
|
|
3816
|
-
* @param {string} [toAsset] the target asset
|
|
3817
|
-
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3818
|
-
* @param {string} [destination] the destination address, required to generate memo
|
|
3819
|
-
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3820
|
-
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3821
|
-
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3822
|
-
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3823
|
-
* @param {number} [liquidityToleranceBps] the maximum basis points of tolerance for pool price movements to set the limit in the generated memo
|
|
3824
|
-
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3825
|
-
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
3826
4105
|
* @param {*} [options] Override http request option.
|
|
3827
4106
|
* @throws {RequiredError}
|
|
3828
|
-
* @memberof
|
|
4107
|
+
* @memberof RUNEPoolApi
|
|
3829
4108
|
*/
|
|
3830
|
-
|
|
3831
|
-
return
|
|
4109
|
+
runeProviders(height, options) {
|
|
4110
|
+
return RUNEPoolApiFp(this.configuration).runeProviders(height, options).then((request) => request(this.axios, this.basePath));
|
|
3832
4111
|
}
|
|
3833
4112
|
}
|
|
3834
4113
|
/**
|
|
3835
|
-
*
|
|
4114
|
+
* ReferenceMemosApi - axios parameter creator
|
|
3836
4115
|
* @export
|
|
3837
4116
|
*/
|
|
3838
|
-
const
|
|
4117
|
+
const ReferenceMemosApiAxiosParamCreator = function (configuration) {
|
|
3839
4118
|
return {
|
|
3840
4119
|
/**
|
|
3841
|
-
* Returns the
|
|
4120
|
+
* Returns the memoless transaction memo for the provided asset and reference number.
|
|
4121
|
+
* @param {string} asset
|
|
4122
|
+
* @param {string} reference the reference number to lookup
|
|
3842
4123
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3843
4124
|
* @param {*} [options] Override http request option.
|
|
3844
4125
|
* @throws {RequiredError}
|
|
3845
4126
|
*/
|
|
3846
|
-
|
|
3847
|
-
|
|
4127
|
+
referenceMemo: (asset_1, reference_1, height_1, ...args_1) => __awaiter(this, [asset_1, reference_1, height_1, ...args_1], void 0, function* (asset, reference, height, options = {}) {
|
|
4128
|
+
// verify required parameter 'asset' is not null or undefined
|
|
4129
|
+
assertParamExists('referenceMemo', 'asset', asset);
|
|
4130
|
+
// verify required parameter 'reference' is not null or undefined
|
|
4131
|
+
assertParamExists('referenceMemo', 'reference', reference);
|
|
4132
|
+
const localVarPath = `/thorchain/memo/{asset}/{reference}`
|
|
4133
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
4134
|
+
.replace(`{${"reference"}}`, encodeURIComponent(String(reference)));
|
|
3848
4135
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3849
4136
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3850
4137
|
let baseOptions;
|
|
@@ -3866,17 +4153,17 @@ const RUNEPoolApiAxiosParamCreator = function (configuration) {
|
|
|
3866
4153
|
};
|
|
3867
4154
|
}),
|
|
3868
4155
|
/**
|
|
3869
|
-
* Returns the
|
|
3870
|
-
* @param {string}
|
|
4156
|
+
* Returns the memoless transaction memo for the provided reference hash.
|
|
4157
|
+
* @param {string} hash
|
|
3871
4158
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3872
4159
|
* @param {*} [options] Override http request option.
|
|
3873
4160
|
* @throws {RequiredError}
|
|
3874
4161
|
*/
|
|
3875
|
-
|
|
3876
|
-
// verify required parameter '
|
|
3877
|
-
assertParamExists('
|
|
3878
|
-
const localVarPath = `/thorchain/
|
|
3879
|
-
.replace(`{${"
|
|
4162
|
+
referenceMemoByHash: (hash_1, height_1, ...args_1) => __awaiter(this, [hash_1, height_1, ...args_1], void 0, function* (hash, height, options = {}) {
|
|
4163
|
+
// verify required parameter 'hash' is not null or undefined
|
|
4164
|
+
assertParamExists('referenceMemoByHash', 'hash', hash);
|
|
4165
|
+
const localVarPath = `/thorchain/memo/{hash}`
|
|
4166
|
+
.replace(`{${"hash"}}`, encodeURIComponent(String(hash)));
|
|
3880
4167
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3881
4168
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3882
4169
|
let baseOptions;
|
|
@@ -3898,13 +4185,21 @@ const RUNEPoolApiAxiosParamCreator = function (configuration) {
|
|
|
3898
4185
|
};
|
|
3899
4186
|
}),
|
|
3900
4187
|
/**
|
|
3901
|
-
* Returns
|
|
4188
|
+
* Pre-flight check for memoless transactions. Returns what reference would be extracted from the amount and whether it\'s available for registration.
|
|
4189
|
+
* @param {string} asset
|
|
4190
|
+
* @param {string} amount the transaction amount in base units to check
|
|
3902
4191
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3903
4192
|
* @param {*} [options] Override http request option.
|
|
3904
4193
|
* @throws {RequiredError}
|
|
3905
4194
|
*/
|
|
3906
|
-
|
|
3907
|
-
|
|
4195
|
+
referenceMemoCheck: (asset_1, amount_1, height_1, ...args_1) => __awaiter(this, [asset_1, amount_1, height_1, ...args_1], void 0, function* (asset, amount, height, options = {}) {
|
|
4196
|
+
// verify required parameter 'asset' is not null or undefined
|
|
4197
|
+
assertParamExists('referenceMemoCheck', 'asset', asset);
|
|
4198
|
+
// verify required parameter 'amount' is not null or undefined
|
|
4199
|
+
assertParamExists('referenceMemoCheck', 'amount', amount);
|
|
4200
|
+
const localVarPath = `/thorchain/memo/check/{asset}/{amount}`
|
|
4201
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
4202
|
+
.replace(`{${"amount"}}`, encodeURIComponent(String(amount)));
|
|
3908
4203
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3909
4204
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3910
4205
|
let baseOptions;
|
|
@@ -3928,125 +4223,137 @@ const RUNEPoolApiAxiosParamCreator = function (configuration) {
|
|
|
3928
4223
|
};
|
|
3929
4224
|
};
|
|
3930
4225
|
/**
|
|
3931
|
-
*
|
|
4226
|
+
* ReferenceMemosApi - functional programming interface
|
|
3932
4227
|
* @export
|
|
3933
4228
|
*/
|
|
3934
|
-
const
|
|
3935
|
-
const localVarAxiosParamCreator =
|
|
4229
|
+
const ReferenceMemosApiFp = function (configuration) {
|
|
4230
|
+
const localVarAxiosParamCreator = ReferenceMemosApiAxiosParamCreator(configuration);
|
|
3936
4231
|
return {
|
|
3937
4232
|
/**
|
|
3938
|
-
* Returns the
|
|
4233
|
+
* Returns the memoless transaction memo for the provided asset and reference number.
|
|
4234
|
+
* @param {string} asset
|
|
4235
|
+
* @param {string} reference the reference number to lookup
|
|
3939
4236
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3940
4237
|
* @param {*} [options] Override http request option.
|
|
3941
4238
|
* @throws {RequiredError}
|
|
3942
4239
|
*/
|
|
3943
|
-
|
|
4240
|
+
referenceMemo(asset, reference, height, options) {
|
|
3944
4241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3945
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4242
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.referenceMemo(asset, reference, height, options);
|
|
3946
4243
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3947
4244
|
});
|
|
3948
4245
|
},
|
|
3949
4246
|
/**
|
|
3950
|
-
* Returns the
|
|
3951
|
-
* @param {string}
|
|
4247
|
+
* Returns the memoless transaction memo for the provided reference hash.
|
|
4248
|
+
* @param {string} hash
|
|
3952
4249
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3953
4250
|
* @param {*} [options] Override http request option.
|
|
3954
4251
|
* @throws {RequiredError}
|
|
3955
4252
|
*/
|
|
3956
|
-
|
|
4253
|
+
referenceMemoByHash(hash, height, options) {
|
|
3957
4254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3958
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4255
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.referenceMemoByHash(hash, height, options);
|
|
3959
4256
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3960
4257
|
});
|
|
3961
4258
|
},
|
|
3962
4259
|
/**
|
|
3963
|
-
* Returns
|
|
4260
|
+
* Pre-flight check for memoless transactions. Returns what reference would be extracted from the amount and whether it\'s available for registration.
|
|
4261
|
+
* @param {string} asset
|
|
4262
|
+
* @param {string} amount the transaction amount in base units to check
|
|
3964
4263
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3965
4264
|
* @param {*} [options] Override http request option.
|
|
3966
4265
|
* @throws {RequiredError}
|
|
3967
4266
|
*/
|
|
3968
|
-
|
|
4267
|
+
referenceMemoCheck(asset, amount, height, options) {
|
|
3969
4268
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3970
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4269
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.referenceMemoCheck(asset, amount, height, options);
|
|
3971
4270
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3972
4271
|
});
|
|
3973
4272
|
},
|
|
3974
4273
|
};
|
|
3975
4274
|
};
|
|
3976
4275
|
/**
|
|
3977
|
-
*
|
|
4276
|
+
* ReferenceMemosApi - factory interface
|
|
3978
4277
|
* @export
|
|
3979
4278
|
*/
|
|
3980
|
-
const
|
|
3981
|
-
const localVarFp =
|
|
4279
|
+
const ReferenceMemosApiFactory = function (configuration, basePath, axios) {
|
|
4280
|
+
const localVarFp = ReferenceMemosApiFp(configuration);
|
|
3982
4281
|
return {
|
|
3983
4282
|
/**
|
|
3984
|
-
* Returns the
|
|
4283
|
+
* Returns the memoless transaction memo for the provided asset and reference number.
|
|
4284
|
+
* @param {string} asset
|
|
4285
|
+
* @param {string} reference the reference number to lookup
|
|
3985
4286
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3986
4287
|
* @param {*} [options] Override http request option.
|
|
3987
4288
|
* @throws {RequiredError}
|
|
3988
4289
|
*/
|
|
3989
|
-
|
|
3990
|
-
return localVarFp.
|
|
4290
|
+
referenceMemo(asset, reference, height, options) {
|
|
4291
|
+
return localVarFp.referenceMemo(asset, reference, height, options).then((request) => request(axios, basePath));
|
|
3991
4292
|
},
|
|
3992
4293
|
/**
|
|
3993
|
-
* Returns the
|
|
3994
|
-
* @param {string}
|
|
4294
|
+
* Returns the memoless transaction memo for the provided reference hash.
|
|
4295
|
+
* @param {string} hash
|
|
3995
4296
|
* @param {number} [height] optional block height, defaults to current tip
|
|
3996
4297
|
* @param {*} [options] Override http request option.
|
|
3997
4298
|
* @throws {RequiredError}
|
|
3998
4299
|
*/
|
|
3999
|
-
|
|
4000
|
-
return localVarFp.
|
|
4300
|
+
referenceMemoByHash(hash, height, options) {
|
|
4301
|
+
return localVarFp.referenceMemoByHash(hash, height, options).then((request) => request(axios, basePath));
|
|
4001
4302
|
},
|
|
4002
4303
|
/**
|
|
4003
|
-
* Returns
|
|
4304
|
+
* Pre-flight check for memoless transactions. Returns what reference would be extracted from the amount and whether it\'s available for registration.
|
|
4305
|
+
* @param {string} asset
|
|
4306
|
+
* @param {string} amount the transaction amount in base units to check
|
|
4004
4307
|
* @param {number} [height] optional block height, defaults to current tip
|
|
4005
4308
|
* @param {*} [options] Override http request option.
|
|
4006
4309
|
* @throws {RequiredError}
|
|
4007
4310
|
*/
|
|
4008
|
-
|
|
4009
|
-
return localVarFp.
|
|
4311
|
+
referenceMemoCheck(asset, amount, height, options) {
|
|
4312
|
+
return localVarFp.referenceMemoCheck(asset, amount, height, options).then((request) => request(axios, basePath));
|
|
4010
4313
|
},
|
|
4011
4314
|
};
|
|
4012
4315
|
};
|
|
4013
4316
|
/**
|
|
4014
|
-
*
|
|
4317
|
+
* ReferenceMemosApi - object-oriented interface
|
|
4015
4318
|
* @export
|
|
4016
|
-
* @class
|
|
4319
|
+
* @class ReferenceMemosApi
|
|
4017
4320
|
* @extends {BaseAPI}
|
|
4018
4321
|
*/
|
|
4019
|
-
class
|
|
4322
|
+
class ReferenceMemosApi extends BaseAPI {
|
|
4020
4323
|
/**
|
|
4021
|
-
* Returns the
|
|
4324
|
+
* Returns the memoless transaction memo for the provided asset and reference number.
|
|
4325
|
+
* @param {string} asset
|
|
4326
|
+
* @param {string} reference the reference number to lookup
|
|
4022
4327
|
* @param {number} [height] optional block height, defaults to current tip
|
|
4023
4328
|
* @param {*} [options] Override http request option.
|
|
4024
4329
|
* @throws {RequiredError}
|
|
4025
|
-
* @memberof
|
|
4330
|
+
* @memberof ReferenceMemosApi
|
|
4026
4331
|
*/
|
|
4027
|
-
|
|
4028
|
-
return
|
|
4332
|
+
referenceMemo(asset, reference, height, options) {
|
|
4333
|
+
return ReferenceMemosApiFp(this.configuration).referenceMemo(asset, reference, height, options).then((request) => request(this.axios, this.basePath));
|
|
4029
4334
|
}
|
|
4030
4335
|
/**
|
|
4031
|
-
* Returns the
|
|
4032
|
-
* @param {string}
|
|
4336
|
+
* Returns the memoless transaction memo for the provided reference hash.
|
|
4337
|
+
* @param {string} hash
|
|
4033
4338
|
* @param {number} [height] optional block height, defaults to current tip
|
|
4034
4339
|
* @param {*} [options] Override http request option.
|
|
4035
4340
|
* @throws {RequiredError}
|
|
4036
|
-
* @memberof
|
|
4341
|
+
* @memberof ReferenceMemosApi
|
|
4037
4342
|
*/
|
|
4038
|
-
|
|
4039
|
-
return
|
|
4343
|
+
referenceMemoByHash(hash, height, options) {
|
|
4344
|
+
return ReferenceMemosApiFp(this.configuration).referenceMemoByHash(hash, height, options).then((request) => request(this.axios, this.basePath));
|
|
4040
4345
|
}
|
|
4041
4346
|
/**
|
|
4042
|
-
* Returns
|
|
4347
|
+
* Pre-flight check for memoless transactions. Returns what reference would be extracted from the amount and whether it\'s available for registration.
|
|
4348
|
+
* @param {string} asset
|
|
4349
|
+
* @param {string} amount the transaction amount in base units to check
|
|
4043
4350
|
* @param {number} [height] optional block height, defaults to current tip
|
|
4044
4351
|
* @param {*} [options] Override http request option.
|
|
4045
4352
|
* @throws {RequiredError}
|
|
4046
|
-
* @memberof
|
|
4353
|
+
* @memberof ReferenceMemosApi
|
|
4047
4354
|
*/
|
|
4048
|
-
|
|
4049
|
-
return
|
|
4355
|
+
referenceMemoCheck(asset, amount, height, options) {
|
|
4356
|
+
return ReferenceMemosApiFp(this.configuration).referenceMemoCheck(asset, amount, height, options).then((request) => request(this.axios, this.basePath));
|
|
4050
4357
|
}
|
|
4051
4358
|
}
|
|
4052
4359
|
/**
|
|
@@ -4574,6 +4881,106 @@ class StreamingSwapApi extends BaseAPI {
|
|
|
4574
4881
|
return StreamingSwapApiFp(this.configuration).streamSwaps(height, options).then((request) => request(this.axios, this.basePath));
|
|
4575
4882
|
}
|
|
4576
4883
|
}
|
|
4884
|
+
/**
|
|
4885
|
+
* SwapApi - axios parameter creator
|
|
4886
|
+
* @export
|
|
4887
|
+
*/
|
|
4888
|
+
const SwapApiAxiosParamCreator = function (configuration) {
|
|
4889
|
+
return {
|
|
4890
|
+
/**
|
|
4891
|
+
* Returns detailed information about a specific swap including its state.
|
|
4892
|
+
* @param {string} txId Transaction ID of the swap
|
|
4893
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4894
|
+
* @param {*} [options] Override http request option.
|
|
4895
|
+
* @throws {RequiredError}
|
|
4896
|
+
*/
|
|
4897
|
+
swapDetails: (txId_1, height_1, ...args_1) => __awaiter(this, [txId_1, height_1, ...args_1], void 0, function* (txId, height, options = {}) {
|
|
4898
|
+
// verify required parameter 'txId' is not null or undefined
|
|
4899
|
+
assertParamExists('swapDetails', 'txId', txId);
|
|
4900
|
+
const localVarPath = `/thorchain/queue/swap/details/{tx_id}`
|
|
4901
|
+
.replace(`{${"tx_id"}}`, encodeURIComponent(String(txId)));
|
|
4902
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4903
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4904
|
+
let baseOptions;
|
|
4905
|
+
if (configuration) {
|
|
4906
|
+
baseOptions = configuration.baseOptions;
|
|
4907
|
+
}
|
|
4908
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4909
|
+
const localVarHeaderParameter = {};
|
|
4910
|
+
const localVarQueryParameter = {};
|
|
4911
|
+
if (height !== undefined) {
|
|
4912
|
+
localVarQueryParameter['height'] = height;
|
|
4913
|
+
}
|
|
4914
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4915
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4916
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4917
|
+
return {
|
|
4918
|
+
url: toPathString(localVarUrlObj),
|
|
4919
|
+
options: localVarRequestOptions,
|
|
4920
|
+
};
|
|
4921
|
+
}),
|
|
4922
|
+
};
|
|
4923
|
+
};
|
|
4924
|
+
/**
|
|
4925
|
+
* SwapApi - functional programming interface
|
|
4926
|
+
* @export
|
|
4927
|
+
*/
|
|
4928
|
+
const SwapApiFp = function (configuration) {
|
|
4929
|
+
const localVarAxiosParamCreator = SwapApiAxiosParamCreator(configuration);
|
|
4930
|
+
return {
|
|
4931
|
+
/**
|
|
4932
|
+
* Returns detailed information about a specific swap including its state.
|
|
4933
|
+
* @param {string} txId Transaction ID of the swap
|
|
4934
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4935
|
+
* @param {*} [options] Override http request option.
|
|
4936
|
+
* @throws {RequiredError}
|
|
4937
|
+
*/
|
|
4938
|
+
swapDetails(txId, height, options) {
|
|
4939
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4940
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.swapDetails(txId, height, options);
|
|
4941
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4942
|
+
});
|
|
4943
|
+
},
|
|
4944
|
+
};
|
|
4945
|
+
};
|
|
4946
|
+
/**
|
|
4947
|
+
* SwapApi - factory interface
|
|
4948
|
+
* @export
|
|
4949
|
+
*/
|
|
4950
|
+
const SwapApiFactory = function (configuration, basePath, axios) {
|
|
4951
|
+
const localVarFp = SwapApiFp(configuration);
|
|
4952
|
+
return {
|
|
4953
|
+
/**
|
|
4954
|
+
* Returns detailed information about a specific swap including its state.
|
|
4955
|
+
* @param {string} txId Transaction ID of the swap
|
|
4956
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4957
|
+
* @param {*} [options] Override http request option.
|
|
4958
|
+
* @throws {RequiredError}
|
|
4959
|
+
*/
|
|
4960
|
+
swapDetails(txId, height, options) {
|
|
4961
|
+
return localVarFp.swapDetails(txId, height, options).then((request) => request(axios, basePath));
|
|
4962
|
+
},
|
|
4963
|
+
};
|
|
4964
|
+
};
|
|
4965
|
+
/**
|
|
4966
|
+
* SwapApi - object-oriented interface
|
|
4967
|
+
* @export
|
|
4968
|
+
* @class SwapApi
|
|
4969
|
+
* @extends {BaseAPI}
|
|
4970
|
+
*/
|
|
4971
|
+
class SwapApi extends BaseAPI {
|
|
4972
|
+
/**
|
|
4973
|
+
* Returns detailed information about a specific swap including its state.
|
|
4974
|
+
* @param {string} txId Transaction ID of the swap
|
|
4975
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4976
|
+
* @param {*} [options] Override http request option.
|
|
4977
|
+
* @throws {RequiredError}
|
|
4978
|
+
* @memberof SwapApi
|
|
4979
|
+
*/
|
|
4980
|
+
swapDetails(txId, height, options) {
|
|
4981
|
+
return SwapApiFp(this.configuration).swapDetails(txId, height, options).then((request) => request(this.axios, this.basePath));
|
|
4982
|
+
}
|
|
4983
|
+
}
|
|
4577
4984
|
/**
|
|
4578
4985
|
* TCYClaimersApi - axios parameter creator
|
|
4579
4986
|
* @export
|
|
@@ -6193,6 +6600,34 @@ const VaultsApiAxiosParamCreator = function (configuration) {
|
|
|
6193
6600
|
options: localVarRequestOptions,
|
|
6194
6601
|
};
|
|
6195
6602
|
}),
|
|
6603
|
+
/**
|
|
6604
|
+
* Returns aggregate vault solvency showing over-solvent or under-solvent amounts per asset.
|
|
6605
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
6606
|
+
* @param {*} [options] Override http request option.
|
|
6607
|
+
* @throws {RequiredError}
|
|
6608
|
+
*/
|
|
6609
|
+
vaultSolvency: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
|
|
6610
|
+
const localVarPath = `/thorchain/vaults/solvency`;
|
|
6611
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6612
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6613
|
+
let baseOptions;
|
|
6614
|
+
if (configuration) {
|
|
6615
|
+
baseOptions = configuration.baseOptions;
|
|
6616
|
+
}
|
|
6617
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
6618
|
+
const localVarHeaderParameter = {};
|
|
6619
|
+
const localVarQueryParameter = {};
|
|
6620
|
+
if (height !== undefined) {
|
|
6621
|
+
localVarQueryParameter['height'] = height;
|
|
6622
|
+
}
|
|
6623
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6624
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6625
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
6626
|
+
return {
|
|
6627
|
+
url: toPathString(localVarUrlObj),
|
|
6628
|
+
options: localVarRequestOptions,
|
|
6629
|
+
};
|
|
6630
|
+
}),
|
|
6196
6631
|
/**
|
|
6197
6632
|
* Returns current yggdrasil vaults.
|
|
6198
6633
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -6267,6 +6702,18 @@ const VaultsApiFp = function (configuration) {
|
|
|
6267
6702
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6268
6703
|
});
|
|
6269
6704
|
},
|
|
6705
|
+
/**
|
|
6706
|
+
* Returns aggregate vault solvency showing over-solvent or under-solvent amounts per asset.
|
|
6707
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
6708
|
+
* @param {*} [options] Override http request option.
|
|
6709
|
+
* @throws {RequiredError}
|
|
6710
|
+
*/
|
|
6711
|
+
vaultSolvency(height, options) {
|
|
6712
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6713
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.vaultSolvency(height, options);
|
|
6714
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
6715
|
+
});
|
|
6716
|
+
},
|
|
6270
6717
|
/**
|
|
6271
6718
|
* Returns current yggdrasil vaults.
|
|
6272
6719
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -6316,6 +6763,15 @@ const VaultsApiFactory = function (configuration, basePath, axios) {
|
|
|
6316
6763
|
vaultPubkeys(height, options) {
|
|
6317
6764
|
return localVarFp.vaultPubkeys(height, options).then((request) => request(axios, basePath));
|
|
6318
6765
|
},
|
|
6766
|
+
/**
|
|
6767
|
+
* Returns aggregate vault solvency showing over-solvent or under-solvent amounts per asset.
|
|
6768
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
6769
|
+
* @param {*} [options] Override http request option.
|
|
6770
|
+
* @throws {RequiredError}
|
|
6771
|
+
*/
|
|
6772
|
+
vaultSolvency(height, options) {
|
|
6773
|
+
return localVarFp.vaultSolvency(height, options).then((request) => request(axios, basePath));
|
|
6774
|
+
},
|
|
6319
6775
|
/**
|
|
6320
6776
|
* Returns current yggdrasil vaults.
|
|
6321
6777
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -6365,6 +6821,16 @@ class VaultsApi extends BaseAPI {
|
|
|
6365
6821
|
vaultPubkeys(height, options) {
|
|
6366
6822
|
return VaultsApiFp(this.configuration).vaultPubkeys(height, options).then((request) => request(this.axios, this.basePath));
|
|
6367
6823
|
}
|
|
6824
|
+
/**
|
|
6825
|
+
* Returns aggregate vault solvency showing over-solvent or under-solvent amounts per asset.
|
|
6826
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
6827
|
+
* @param {*} [options] Override http request option.
|
|
6828
|
+
* @throws {RequiredError}
|
|
6829
|
+
* @memberof VaultsApi
|
|
6830
|
+
*/
|
|
6831
|
+
vaultSolvency(height, options) {
|
|
6832
|
+
return VaultsApiFp(this.configuration).vaultSolvency(height, options).then((request) => request(this.axios, this.basePath));
|
|
6833
|
+
}
|
|
6368
6834
|
/**
|
|
6369
6835
|
* Returns current yggdrasil vaults.
|
|
6370
6836
|
* @param {number} [height] optional block height, defaults to current tip
|
|
@@ -6383,7 +6849,7 @@ class VaultsApi extends BaseAPI {
|
|
|
6383
6849
|
* Thornode API
|
|
6384
6850
|
* Thornode REST API.
|
|
6385
6851
|
*
|
|
6386
|
-
* The version of the OpenAPI document: 3.
|
|
6852
|
+
* The version of the OpenAPI document: 3.15.0
|
|
6387
6853
|
* Contact: devs@thorchain.org
|
|
6388
6854
|
*
|
|
6389
6855
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -6421,4 +6887,4 @@ class Configuration {
|
|
|
6421
6887
|
*/
|
|
6422
6888
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
6423
6889
|
|
|
6424
|
-
export { AuthApi, AuthApiAxiosParamCreator, AuthApiFactory, AuthApiFp, BankApi, BankApiAxiosParamCreator, BankApiFactory, BankApiFp, BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp,
|
|
6890
|
+
export { AuthApi, AuthApiAxiosParamCreator, AuthApiFactory, AuthApiFp, BankApi, BankApiAxiosParamCreator, BankApiFactory, BankApiFp, BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp, CloutApi, CloutApiAxiosParamCreator, CloutApiFactory, CloutApiFp, CodesApi, CodesApiAxiosParamCreator, CodesApiFactory, CodesApiFp, Configuration, ExportApi, ExportApiAxiosParamCreator, ExportApiFactory, ExportApiFp, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, LimitOrderApi, LimitOrderApiAxiosParamCreator, LimitOrderApiFactory, LimitOrderApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, OracleApi, OracleApiAxiosParamCreator, OracleApiFactory, OracleApiFp, PoolSlipApi, PoolSlipApiAxiosParamCreator, PoolSlipApiFactory, PoolSlipApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, RUNEPoolApi, RUNEPoolApiAxiosParamCreator, RUNEPoolApiFactory, RUNEPoolApiFp, ReferenceMemosApi, ReferenceMemosApiAxiosParamCreator, ReferenceMemosApiFactory, ReferenceMemosApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, SecuredAssetApi, SecuredAssetApiAxiosParamCreator, SecuredAssetApiFactory, SecuredAssetApiFp, SecuredAssetsApi, SecuredAssetsApiAxiosParamCreator, SecuredAssetsApiFactory, SecuredAssetsApiFp, StreamingSwapApi, StreamingSwapApiAxiosParamCreator, StreamingSwapApiFactory, StreamingSwapApiFp, SwapApi, SwapApiAxiosParamCreator, SwapApiFactory, SwapApiFp, TCYClaimersApi, TCYClaimersApiAxiosParamCreator, TCYClaimersApiFactory, TCYClaimersApiFp, TCYStakersApi, TCYStakersApiAxiosParamCreator, TCYStakersApiFactory, TCYStakersApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TradeAccountApi, TradeAccountApiAxiosParamCreator, TradeAccountApiFactory, TradeAccountApiFp, TradeAccountsApi, TradeAccountsApiAxiosParamCreator, TradeAccountsApiFactory, TradeAccountsApiFp, TradeUnitApi, TradeUnitApiAxiosParamCreator, TradeUnitApiFactory, TradeUnitApiFp, TradeUnitsApi, TradeUnitsApiAxiosParamCreator, TradeUnitsApiFactory, TradeUnitsApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, UpgradeVoteVoteEnum, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp, YggdrasilVaultTypeEnum };
|