@xchainjs/xchain-thornode 0.1.1 → 0.1.2

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.
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 1.98.0
5
+ * The version of the OpenAPI document: 1.99.0
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -37,44 +37,6 @@ export interface BanResponse {
37
37
  */
38
38
  'signers'?: Array<string>;
39
39
  }
40
- /**
41
- *
42
- * @export
43
- * @interface Bucket
44
- */
45
- export interface Bucket {
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof Bucket
50
- */
51
- 'balance_asset': string;
52
- /**
53
- *
54
- * @type {string}
55
- * @memberof Bucket
56
- */
57
- 'asset': string;
58
- /**
59
- * the total pool liquidity provider units
60
- * @type {string}
61
- * @memberof Bucket
62
- */
63
- 'LP_units': string;
64
- /**
65
- *
66
- * @type {string}
67
- * @memberof Bucket
68
- */
69
- 'status': string;
70
- }
71
- /**
72
- *
73
- * @export
74
- * @interface BucketsResponse
75
- */
76
- export interface BucketsResponse extends Array<Bucket> {
77
- }
78
40
  /**
79
41
  *
80
42
  * @export
@@ -228,6 +190,12 @@ export interface InboundAddress {
228
190
  * @memberof InboundAddress
229
191
  */
230
192
  'outbound_fee'?: string;
193
+ /**
194
+ * Defines the minimum transaction size for the chain in base units (sats, wei, uatom). Transctions with asset amounts lower than the dust_thresold are ignored.
195
+ * @type {string}
196
+ * @memberof InboundAddress
197
+ */
198
+ 'dust_threshold'?: string;
231
199
  }
232
200
  /**
233
201
  *
@@ -1020,11 +988,23 @@ export interface Pool {
1020
988
  */
1021
989
  'pending_inbound_asset': string;
1022
990
  /**
1023
- * Returns true if pool is a Savers pool. Savers pools are used for single-sided yield deposits.
991
+ * the balance of L1 asset deposited into the Savers Vault
992
+ * @type {string}
993
+ * @memberof Pool
994
+ */
995
+ 'savers_depth': string;
996
+ /**
997
+ * the number of units owned by Savers
998
+ * @type {string}
999
+ * @memberof Pool
1000
+ */
1001
+ 'savers_units': string;
1002
+ /**
1003
+ * whether additional synths cannot be minted
1024
1004
  * @type {boolean}
1025
1005
  * @memberof Pool
1026
1006
  */
1027
- 'is_savers_pool': boolean;
1007
+ 'synth_mint_paused': boolean;
1028
1008
  }
1029
1009
  /**
1030
1010
  *
@@ -1064,6 +1044,196 @@ export interface QueueResponse {
1064
1044
  */
1065
1045
  'scheduled_outbound_value': string;
1066
1046
  }
1047
+ /**
1048
+ *
1049
+ * @export
1050
+ * @interface QuoteFees
1051
+ */
1052
+ export interface QuoteFees {
1053
+ /**
1054
+ *
1055
+ * @type {string}
1056
+ * @memberof QuoteFees
1057
+ */
1058
+ 'asset': string;
1059
+ /**
1060
+ *
1061
+ * @type {string}
1062
+ * @memberof QuoteFees
1063
+ */
1064
+ 'affiliate': string;
1065
+ /**
1066
+ *
1067
+ * @type {string}
1068
+ * @memberof QuoteFees
1069
+ */
1070
+ 'outbound': string;
1071
+ }
1072
+ /**
1073
+ *
1074
+ * @export
1075
+ * @interface QuoteSaverDepositResponse
1076
+ */
1077
+ export interface QuoteSaverDepositResponse {
1078
+ /**
1079
+ * the inbound address for the transaction on the source chain
1080
+ * @type {string}
1081
+ * @memberof QuoteSaverDepositResponse
1082
+ */
1083
+ 'inbound_address': string;
1084
+ /**
1085
+ * generated memo for the deposit
1086
+ * @type {string}
1087
+ * @memberof QuoteSaverDepositResponse
1088
+ */
1089
+ 'memo': string;
1090
+ /**
1091
+ * the minimum amount of the target asset the user can expect to deposit after fees
1092
+ * @type {string}
1093
+ * @memberof QuoteSaverDepositResponse
1094
+ */
1095
+ 'expected_amount_out': string;
1096
+ /**
1097
+ * the approximate number of source chain blocks required before processing
1098
+ * @type {number}
1099
+ * @memberof QuoteSaverDepositResponse
1100
+ */
1101
+ 'inbound_confirmation_blocks'?: number;
1102
+ /**
1103
+ * the approximate seconds for block confirmations required before processing
1104
+ * @type {number}
1105
+ * @memberof QuoteSaverDepositResponse
1106
+ */
1107
+ 'inbound_confirmation_seconds'?: number;
1108
+ /**
1109
+ *
1110
+ * @type {QuoteFees}
1111
+ * @memberof QuoteSaverDepositResponse
1112
+ */
1113
+ 'fees': QuoteFees;
1114
+ /**
1115
+ * the swap slippage in basis points
1116
+ * @type {number}
1117
+ * @memberof QuoteSaverDepositResponse
1118
+ */
1119
+ 'slippage_bps': number;
1120
+ }
1121
+ /**
1122
+ *
1123
+ * @export
1124
+ * @interface QuoteSaverWithdrawResponse
1125
+ */
1126
+ export interface QuoteSaverWithdrawResponse {
1127
+ /**
1128
+ * the inbound address for the transaction on the source chain
1129
+ * @type {string}
1130
+ * @memberof QuoteSaverWithdrawResponse
1131
+ */
1132
+ 'inbound_address': string;
1133
+ /**
1134
+ * generated memo for the withdraw, the client can use this OR send the dust amount
1135
+ * @type {string}
1136
+ * @memberof QuoteSaverWithdrawResponse
1137
+ */
1138
+ 'memo': string;
1139
+ /**
1140
+ * the dust amount of the target asset the user should send to initialize the withdraw, the client can send this OR provide the memo
1141
+ * @type {string}
1142
+ * @memberof QuoteSaverWithdrawResponse
1143
+ */
1144
+ 'dust_amount': string;
1145
+ /**
1146
+ * the minimum amount of the target asset the user can expect to withdraw after fees in 1e8 decimals
1147
+ * @type {string}
1148
+ * @memberof QuoteSaverWithdrawResponse
1149
+ */
1150
+ 'expected_amount_out': string;
1151
+ /**
1152
+ * the number of thorchain blocks the outbound will be delayed
1153
+ * @type {number}
1154
+ * @memberof QuoteSaverWithdrawResponse
1155
+ */
1156
+ 'outbound_delay_blocks': number;
1157
+ /**
1158
+ * the approximate seconds for the outbound delay before it will be sent
1159
+ * @type {number}
1160
+ * @memberof QuoteSaverWithdrawResponse
1161
+ */
1162
+ 'outbound_delay_seconds': number;
1163
+ /**
1164
+ *
1165
+ * @type {QuoteFees}
1166
+ * @memberof QuoteSaverWithdrawResponse
1167
+ */
1168
+ 'fees': QuoteFees;
1169
+ /**
1170
+ * the swap slippage in basis points
1171
+ * @type {number}
1172
+ * @memberof QuoteSaverWithdrawResponse
1173
+ */
1174
+ 'slippage_bps': number;
1175
+ }
1176
+ /**
1177
+ *
1178
+ * @export
1179
+ * @interface QuoteSwapResponse
1180
+ */
1181
+ export interface QuoteSwapResponse {
1182
+ /**
1183
+ * the inbound address for the transaction on the source chain
1184
+ * @type {string}
1185
+ * @memberof QuoteSwapResponse
1186
+ */
1187
+ 'inbound_address': string;
1188
+ /**
1189
+ * generated memo for the swap
1190
+ * @type {string}
1191
+ * @memberof QuoteSwapResponse
1192
+ */
1193
+ 'memo'?: string;
1194
+ /**
1195
+ * the minimum amount of the target asset the user can expect to receive after fees
1196
+ * @type {string}
1197
+ * @memberof QuoteSwapResponse
1198
+ */
1199
+ 'expected_amount_out': string;
1200
+ /**
1201
+ * the approximate number of source chain blocks required before processing
1202
+ * @type {number}
1203
+ * @memberof QuoteSwapResponse
1204
+ */
1205
+ 'inbound_confirmation_blocks'?: number;
1206
+ /**
1207
+ * the approximate seconds for block confirmations required before processing
1208
+ * @type {number}
1209
+ * @memberof QuoteSwapResponse
1210
+ */
1211
+ 'inbound_confirmation_seconds'?: number;
1212
+ /**
1213
+ * the number of thorchain blocks the outbound will be delayed
1214
+ * @type {number}
1215
+ * @memberof QuoteSwapResponse
1216
+ */
1217
+ 'outbound_delay_blocks': number;
1218
+ /**
1219
+ * the approximate seconds for the outbound delay before it will be sent
1220
+ * @type {number}
1221
+ * @memberof QuoteSwapResponse
1222
+ */
1223
+ 'outbound_delay_seconds': number;
1224
+ /**
1225
+ *
1226
+ * @type {QuoteFees}
1227
+ * @memberof QuoteSwapResponse
1228
+ */
1229
+ 'fees': QuoteFees;
1230
+ /**
1231
+ * the swap slippage in basis points
1232
+ * @type {number}
1233
+ * @memberof QuoteSwapResponse
1234
+ */
1235
+ 'slippage_bps': number;
1236
+ }
1067
1237
  /**
1068
1238
  *
1069
1239
  * @export
@@ -1083,24 +1253,49 @@ export interface Thorname {
1083
1253
  * @memberof Thorname
1084
1254
  */
1085
1255
  'name'?: string;
1256
+ /**
1257
+ *
1258
+ * @type {number}
1259
+ * @memberof Thorname
1260
+ */
1261
+ 'expire_block_height'?: number;
1086
1262
  /**
1087
1263
  *
1088
1264
  * @type {string}
1089
1265
  * @memberof Thorname
1090
1266
  */
1091
- 'chain'?: string;
1267
+ 'owner'?: string;
1092
1268
  /**
1093
1269
  *
1094
1270
  * @type {string}
1095
1271
  * @memberof Thorname
1096
1272
  */
1097
- 'address'?: string;
1273
+ 'preferred_asset': string;
1098
1274
  /**
1099
1275
  *
1100
- * @type {number}
1276
+ * @type {Array<ThornameAlias>}
1101
1277
  * @memberof Thorname
1102
1278
  */
1103
- 'expire_block_height'?: number;
1279
+ 'aliases': Array<ThornameAlias>;
1280
+ }
1281
+ /**
1282
+ *
1283
+ * @export
1284
+ * @interface ThornameAlias
1285
+ */
1286
+ export interface ThornameAlias {
1287
+ /**
1288
+ *
1289
+ * @type {string}
1290
+ * @memberof ThornameAlias
1291
+ */
1292
+ 'chain'?: string;
1293
+ /**
1294
+ *
1295
+ * @type {string}
1296
+ * @memberof ThornameAlias
1297
+ */
1298
+ 'address'?: string;
1104
1299
  }
1105
1300
  /**
1106
1301
  *
@@ -2483,6 +2678,167 @@ export declare class QueueApi extends BaseAPI {
2483
2678
  */
2484
2679
  queueScheduled(height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ScheduledResponse, any>>;
2485
2680
  }
2681
+ /**
2682
+ * QuoteApi - axios parameter creator
2683
+ * @export
2684
+ */
2685
+ export declare const QuoteApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
2686
+ /**
2687
+ * Provide a quote estimate for the provided saver deposit.
2688
+ * @param {number} [height] optional block height, defaults to current tip
2689
+ * @param {string} [asset] the asset to deposit
2690
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2691
+ * @param {*} [options] Override http request option.
2692
+ * @throws {RequiredError}
2693
+ */
2694
+ quotesaverdeposit: (height?: number | undefined, asset?: string | undefined, amount?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2695
+ /**
2696
+ * Provide a quote estimate for the provided saver withdraw.
2697
+ * @param {number} [height] optional block height, defaults to current tip
2698
+ * @param {string} [asset] the asset to withdraw
2699
+ * @param {string} [address] the address for the position
2700
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2701
+ * @param {*} [options] Override http request option.
2702
+ * @throws {RequiredError}
2703
+ */
2704
+ quotesaverwithdraw: (height?: number | undefined, asset?: string | undefined, address?: string | undefined, withdrawBps?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2705
+ /**
2706
+ * Provide a quote estimate for the provided swap.
2707
+ * @param {number} [height] optional block height, defaults to current tip
2708
+ * @param {string} [fromAsset] the source asset
2709
+ * @param {string} [toAsset] the target asset
2710
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2711
+ * @param {string} [destination] the destination address, required to generate memo
2712
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2713
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2714
+ * @param {string} [affiliate] the affiliate (address or thorname)
2715
+ * @param {*} [options] Override http request option.
2716
+ * @throws {RequiredError}
2717
+ */
2718
+ quoteswap: (height?: number | undefined, fromAsset?: string | undefined, toAsset?: string | undefined, amount?: number | undefined, destination?: string | undefined, toleranceBps?: number | undefined, affiliateBps?: number | undefined, affiliate?: string | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2719
+ };
2720
+ /**
2721
+ * QuoteApi - functional programming interface
2722
+ * @export
2723
+ */
2724
+ export declare const QuoteApiFp: (configuration?: Configuration | undefined) => {
2725
+ /**
2726
+ * Provide a quote estimate for the provided saver deposit.
2727
+ * @param {number} [height] optional block height, defaults to current tip
2728
+ * @param {string} [asset] the asset to deposit
2729
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2730
+ * @param {*} [options] Override http request option.
2731
+ * @throws {RequiredError}
2732
+ */
2733
+ quotesaverdeposit(height?: number | undefined, asset?: string | undefined, amount?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<QuoteSaverDepositResponse>>;
2734
+ /**
2735
+ * Provide a quote estimate for the provided saver withdraw.
2736
+ * @param {number} [height] optional block height, defaults to current tip
2737
+ * @param {string} [asset] the asset to withdraw
2738
+ * @param {string} [address] the address for the position
2739
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2740
+ * @param {*} [options] Override http request option.
2741
+ * @throws {RequiredError}
2742
+ */
2743
+ quotesaverwithdraw(height?: number | undefined, asset?: string | undefined, address?: string | undefined, withdrawBps?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<QuoteSaverWithdrawResponse>>;
2744
+ /**
2745
+ * Provide a quote estimate for the provided swap.
2746
+ * @param {number} [height] optional block height, defaults to current tip
2747
+ * @param {string} [fromAsset] the source asset
2748
+ * @param {string} [toAsset] the target asset
2749
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2750
+ * @param {string} [destination] the destination address, required to generate memo
2751
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2752
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2753
+ * @param {string} [affiliate] the affiliate (address or thorname)
2754
+ * @param {*} [options] Override http request option.
2755
+ * @throws {RequiredError}
2756
+ */
2757
+ quoteswap(height?: number | undefined, fromAsset?: string | undefined, toAsset?: string | undefined, amount?: number | undefined, destination?: string | undefined, toleranceBps?: number | undefined, affiliateBps?: number | undefined, affiliate?: string | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<QuoteSwapResponse>>;
2758
+ };
2759
+ /**
2760
+ * QuoteApi - factory interface
2761
+ * @export
2762
+ */
2763
+ export declare const QuoteApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
2764
+ /**
2765
+ * Provide a quote estimate for the provided saver deposit.
2766
+ * @param {number} [height] optional block height, defaults to current tip
2767
+ * @param {string} [asset] the asset to deposit
2768
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2769
+ * @param {*} [options] Override http request option.
2770
+ * @throws {RequiredError}
2771
+ */
2772
+ quotesaverdeposit(height?: number | undefined, asset?: string | undefined, amount?: number | undefined, options?: any): AxiosPromise<QuoteSaverDepositResponse>;
2773
+ /**
2774
+ * Provide a quote estimate for the provided saver withdraw.
2775
+ * @param {number} [height] optional block height, defaults to current tip
2776
+ * @param {string} [asset] the asset to withdraw
2777
+ * @param {string} [address] the address for the position
2778
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2779
+ * @param {*} [options] Override http request option.
2780
+ * @throws {RequiredError}
2781
+ */
2782
+ quotesaverwithdraw(height?: number | undefined, asset?: string | undefined, address?: string | undefined, withdrawBps?: number | undefined, options?: any): AxiosPromise<QuoteSaverWithdrawResponse>;
2783
+ /**
2784
+ * Provide a quote estimate for the provided swap.
2785
+ * @param {number} [height] optional block height, defaults to current tip
2786
+ * @param {string} [fromAsset] the source asset
2787
+ * @param {string} [toAsset] the target asset
2788
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2789
+ * @param {string} [destination] the destination address, required to generate memo
2790
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2791
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2792
+ * @param {string} [affiliate] the affiliate (address or thorname)
2793
+ * @param {*} [options] Override http request option.
2794
+ * @throws {RequiredError}
2795
+ */
2796
+ quoteswap(height?: number | undefined, fromAsset?: string | undefined, toAsset?: string | undefined, amount?: number | undefined, destination?: string | undefined, toleranceBps?: number | undefined, affiliateBps?: number | undefined, affiliate?: string | undefined, options?: any): AxiosPromise<QuoteSwapResponse>;
2797
+ };
2798
+ /**
2799
+ * QuoteApi - object-oriented interface
2800
+ * @export
2801
+ * @class QuoteApi
2802
+ * @extends {BaseAPI}
2803
+ */
2804
+ export declare class QuoteApi extends BaseAPI {
2805
+ /**
2806
+ * Provide a quote estimate for the provided saver deposit.
2807
+ * @param {number} [height] optional block height, defaults to current tip
2808
+ * @param {string} [asset] the asset to deposit
2809
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2810
+ * @param {*} [options] Override http request option.
2811
+ * @throws {RequiredError}
2812
+ * @memberof QuoteApi
2813
+ */
2814
+ quotesaverdeposit(height?: number, asset?: string, amount?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QuoteSaverDepositResponse, any>>;
2815
+ /**
2816
+ * Provide a quote estimate for the provided saver withdraw.
2817
+ * @param {number} [height] optional block height, defaults to current tip
2818
+ * @param {string} [asset] the asset to withdraw
2819
+ * @param {string} [address] the address for the position
2820
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2821
+ * @param {*} [options] Override http request option.
2822
+ * @throws {RequiredError}
2823
+ * @memberof QuoteApi
2824
+ */
2825
+ quotesaverwithdraw(height?: number, asset?: string, address?: string, withdrawBps?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QuoteSaverWithdrawResponse, any>>;
2826
+ /**
2827
+ * Provide a quote estimate for the provided swap.
2828
+ * @param {number} [height] optional block height, defaults to current tip
2829
+ * @param {string} [fromAsset] the source asset
2830
+ * @param {string} [toAsset] the target asset
2831
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2832
+ * @param {string} [destination] the destination address, required to generate memo
2833
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2834
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2835
+ * @param {string} [affiliate] the affiliate (address or thorname)
2836
+ * @param {*} [options] Override http request option.
2837
+ * @throws {RequiredError}
2838
+ * @memberof QuoteApi
2839
+ */
2840
+ quoteswap(height?: number, fromAsset?: string, toAsset?: string, amount?: number, destination?: string, toleranceBps?: number, affiliateBps?: number, affiliate?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QuoteSwapResponse, any>>;
2841
+ }
2486
2842
  /**
2487
2843
  * SaversApi - axios parameter creator
2488
2844
  * @export
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 1.98.0
5
+ * The version of the OpenAPI document: 1.99.0
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 1.98.0
5
+ * The version of the OpenAPI document: 1.99.0
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 1.98.0
5
+ * The version of the OpenAPI document: 1.99.0
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 1.98.0
5
+ * The version of the OpenAPI document: 1.99.0
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/lib/index.esm.js CHANGED
@@ -1876,6 +1876,301 @@ class QueueApi extends BaseAPI {
1876
1876
  return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
1877
1877
  }
1878
1878
  }
1879
+ /**
1880
+ * QuoteApi - axios parameter creator
1881
+ * @export
1882
+ */
1883
+ const QuoteApiAxiosParamCreator = function (configuration) {
1884
+ return {
1885
+ /**
1886
+ * Provide a quote estimate for the provided saver deposit.
1887
+ * @param {number} [height] optional block height, defaults to current tip
1888
+ * @param {string} [asset] the asset to deposit
1889
+ * @param {number} [amount] the source asset amount in 1e8 decimals
1890
+ * @param {*} [options] Override http request option.
1891
+ * @throws {RequiredError}
1892
+ */
1893
+ quotesaverdeposit: (height, asset, amount, options = {}) => __awaiter(this, void 0, void 0, function* () {
1894
+ const localVarPath = `/thorchain/quote/saver/deposit`;
1895
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1896
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1897
+ let baseOptions;
1898
+ if (configuration) {
1899
+ baseOptions = configuration.baseOptions;
1900
+ }
1901
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1902
+ const localVarHeaderParameter = {};
1903
+ const localVarQueryParameter = {};
1904
+ if (height !== undefined) {
1905
+ localVarQueryParameter['height'] = height;
1906
+ }
1907
+ if (asset !== undefined) {
1908
+ localVarQueryParameter['asset'] = asset;
1909
+ }
1910
+ if (amount !== undefined) {
1911
+ localVarQueryParameter['amount'] = amount;
1912
+ }
1913
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1914
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1915
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1916
+ return {
1917
+ url: toPathString(localVarUrlObj),
1918
+ options: localVarRequestOptions,
1919
+ };
1920
+ }),
1921
+ /**
1922
+ * Provide a quote estimate for the provided saver withdraw.
1923
+ * @param {number} [height] optional block height, defaults to current tip
1924
+ * @param {string} [asset] the asset to withdraw
1925
+ * @param {string} [address] the address for the position
1926
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
1927
+ * @param {*} [options] Override http request option.
1928
+ * @throws {RequiredError}
1929
+ */
1930
+ quotesaverwithdraw: (height, asset, address, withdrawBps, options = {}) => __awaiter(this, void 0, void 0, function* () {
1931
+ const localVarPath = `/thorchain/quote/saver/withdraw`;
1932
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1933
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1934
+ let baseOptions;
1935
+ if (configuration) {
1936
+ baseOptions = configuration.baseOptions;
1937
+ }
1938
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1939
+ const localVarHeaderParameter = {};
1940
+ const localVarQueryParameter = {};
1941
+ if (height !== undefined) {
1942
+ localVarQueryParameter['height'] = height;
1943
+ }
1944
+ if (asset !== undefined) {
1945
+ localVarQueryParameter['asset'] = asset;
1946
+ }
1947
+ if (address !== undefined) {
1948
+ localVarQueryParameter['address'] = address;
1949
+ }
1950
+ if (withdrawBps !== undefined) {
1951
+ localVarQueryParameter['withdraw_bps'] = withdrawBps;
1952
+ }
1953
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1954
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1955
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1956
+ return {
1957
+ url: toPathString(localVarUrlObj),
1958
+ options: localVarRequestOptions,
1959
+ };
1960
+ }),
1961
+ /**
1962
+ * Provide a quote estimate for the provided swap.
1963
+ * @param {number} [height] optional block height, defaults to current tip
1964
+ * @param {string} [fromAsset] the source asset
1965
+ * @param {string} [toAsset] the target asset
1966
+ * @param {number} [amount] the source asset amount in 1e8 decimals
1967
+ * @param {string} [destination] the destination address, required to generate memo
1968
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
1969
+ * @param {number} [affiliateBps] the affiliate fee in basis points
1970
+ * @param {string} [affiliate] the affiliate (address or thorname)
1971
+ * @param {*} [options] Override http request option.
1972
+ * @throws {RequiredError}
1973
+ */
1974
+ quoteswap: (height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
1975
+ const localVarPath = `/thorchain/quote/swap`;
1976
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1977
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1978
+ let baseOptions;
1979
+ if (configuration) {
1980
+ baseOptions = configuration.baseOptions;
1981
+ }
1982
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1983
+ const localVarHeaderParameter = {};
1984
+ const localVarQueryParameter = {};
1985
+ if (height !== undefined) {
1986
+ localVarQueryParameter['height'] = height;
1987
+ }
1988
+ if (fromAsset !== undefined) {
1989
+ localVarQueryParameter['from_asset'] = fromAsset;
1990
+ }
1991
+ if (toAsset !== undefined) {
1992
+ localVarQueryParameter['to_asset'] = toAsset;
1993
+ }
1994
+ if (amount !== undefined) {
1995
+ localVarQueryParameter['amount'] = amount;
1996
+ }
1997
+ if (destination !== undefined) {
1998
+ localVarQueryParameter['destination'] = destination;
1999
+ }
2000
+ if (toleranceBps !== undefined) {
2001
+ localVarQueryParameter['tolerance_bps'] = toleranceBps;
2002
+ }
2003
+ if (affiliateBps !== undefined) {
2004
+ localVarQueryParameter['affiliate_bps'] = affiliateBps;
2005
+ }
2006
+ if (affiliate !== undefined) {
2007
+ localVarQueryParameter['affiliate'] = affiliate;
2008
+ }
2009
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2010
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2011
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2012
+ return {
2013
+ url: toPathString(localVarUrlObj),
2014
+ options: localVarRequestOptions,
2015
+ };
2016
+ }),
2017
+ };
2018
+ };
2019
+ /**
2020
+ * QuoteApi - functional programming interface
2021
+ * @export
2022
+ */
2023
+ const QuoteApiFp = function (configuration) {
2024
+ const localVarAxiosParamCreator = QuoteApiAxiosParamCreator(configuration);
2025
+ return {
2026
+ /**
2027
+ * Provide a quote estimate for the provided saver deposit.
2028
+ * @param {number} [height] optional block height, defaults to current tip
2029
+ * @param {string} [asset] the asset to deposit
2030
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2031
+ * @param {*} [options] Override http request option.
2032
+ * @throws {RequiredError}
2033
+ */
2034
+ quotesaverdeposit(height, asset, amount, options) {
2035
+ return __awaiter(this, void 0, void 0, function* () {
2036
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quotesaverdeposit(height, asset, amount, options);
2037
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2038
+ });
2039
+ },
2040
+ /**
2041
+ * Provide a quote estimate for the provided saver withdraw.
2042
+ * @param {number} [height] optional block height, defaults to current tip
2043
+ * @param {string} [asset] the asset to withdraw
2044
+ * @param {string} [address] the address for the position
2045
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2046
+ * @param {*} [options] Override http request option.
2047
+ * @throws {RequiredError}
2048
+ */
2049
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2050
+ return __awaiter(this, void 0, void 0, function* () {
2051
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quotesaverwithdraw(height, asset, address, withdrawBps, options);
2052
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2053
+ });
2054
+ },
2055
+ /**
2056
+ * Provide a quote estimate for the provided swap.
2057
+ * @param {number} [height] optional block height, defaults to current tip
2058
+ * @param {string} [fromAsset] the source asset
2059
+ * @param {string} [toAsset] the target asset
2060
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2061
+ * @param {string} [destination] the destination address, required to generate memo
2062
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2063
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2064
+ * @param {string} [affiliate] the affiliate (address or thorname)
2065
+ * @param {*} [options] Override http request option.
2066
+ * @throws {RequiredError}
2067
+ */
2068
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2069
+ return __awaiter(this, void 0, void 0, function* () {
2070
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options);
2071
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2072
+ });
2073
+ },
2074
+ };
2075
+ };
2076
+ /**
2077
+ * QuoteApi - factory interface
2078
+ * @export
2079
+ */
2080
+ const QuoteApiFactory = function (configuration, basePath, axios) {
2081
+ const localVarFp = QuoteApiFp(configuration);
2082
+ return {
2083
+ /**
2084
+ * Provide a quote estimate for the provided saver deposit.
2085
+ * @param {number} [height] optional block height, defaults to current tip
2086
+ * @param {string} [asset] the asset to deposit
2087
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2088
+ * @param {*} [options] Override http request option.
2089
+ * @throws {RequiredError}
2090
+ */
2091
+ quotesaverdeposit(height, asset, amount, options) {
2092
+ return localVarFp.quotesaverdeposit(height, asset, amount, options).then((request) => request(axios, basePath));
2093
+ },
2094
+ /**
2095
+ * Provide a quote estimate for the provided saver withdraw.
2096
+ * @param {number} [height] optional block height, defaults to current tip
2097
+ * @param {string} [asset] the asset to withdraw
2098
+ * @param {string} [address] the address for the position
2099
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2100
+ * @param {*} [options] Override http request option.
2101
+ * @throws {RequiredError}
2102
+ */
2103
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2104
+ return localVarFp.quotesaverwithdraw(height, asset, address, withdrawBps, options).then((request) => request(axios, basePath));
2105
+ },
2106
+ /**
2107
+ * Provide a quote estimate for the provided swap.
2108
+ * @param {number} [height] optional block height, defaults to current tip
2109
+ * @param {string} [fromAsset] the source asset
2110
+ * @param {string} [toAsset] the target asset
2111
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2112
+ * @param {string} [destination] the destination address, required to generate memo
2113
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2114
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2115
+ * @param {string} [affiliate] the affiliate (address or thorname)
2116
+ * @param {*} [options] Override http request option.
2117
+ * @throws {RequiredError}
2118
+ */
2119
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2120
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2121
+ },
2122
+ };
2123
+ };
2124
+ /**
2125
+ * QuoteApi - object-oriented interface
2126
+ * @export
2127
+ * @class QuoteApi
2128
+ * @extends {BaseAPI}
2129
+ */
2130
+ class QuoteApi extends BaseAPI {
2131
+ /**
2132
+ * Provide a quote estimate for the provided saver deposit.
2133
+ * @param {number} [height] optional block height, defaults to current tip
2134
+ * @param {string} [asset] the asset to deposit
2135
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2136
+ * @param {*} [options] Override http request option.
2137
+ * @throws {RequiredError}
2138
+ * @memberof QuoteApi
2139
+ */
2140
+ quotesaverdeposit(height, asset, amount, options) {
2141
+ return QuoteApiFp(this.configuration).quotesaverdeposit(height, asset, amount, options).then((request) => request(this.axios, this.basePath));
2142
+ }
2143
+ /**
2144
+ * Provide a quote estimate for the provided saver withdraw.
2145
+ * @param {number} [height] optional block height, defaults to current tip
2146
+ * @param {string} [asset] the asset to withdraw
2147
+ * @param {string} [address] the address for the position
2148
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2149
+ * @param {*} [options] Override http request option.
2150
+ * @throws {RequiredError}
2151
+ * @memberof QuoteApi
2152
+ */
2153
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2154
+ return QuoteApiFp(this.configuration).quotesaverwithdraw(height, asset, address, withdrawBps, options).then((request) => request(this.axios, this.basePath));
2155
+ }
2156
+ /**
2157
+ * Provide a quote estimate for the provided swap.
2158
+ * @param {number} [height] optional block height, defaults to current tip
2159
+ * @param {string} [fromAsset] the source asset
2160
+ * @param {string} [toAsset] the target asset
2161
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2162
+ * @param {string} [destination] the destination address, required to generate memo
2163
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2164
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2165
+ * @param {string} [affiliate] the affiliate (address or thorname)
2166
+ * @param {*} [options] Override http request option.
2167
+ * @throws {RequiredError}
2168
+ * @memberof QuoteApi
2169
+ */
2170
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2171
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
2172
+ }
2173
+ }
1879
2174
  /**
1880
2175
  * SaversApi - axios parameter creator
1881
2176
  * @export
@@ -2883,7 +3178,7 @@ class VaultsApi extends BaseAPI {
2883
3178
  * Thornode API
2884
3179
  * Thornode REST API.
2885
3180
  *
2886
- * The version of the OpenAPI document: 1.98.0
3181
+ * The version of the OpenAPI document: 1.99.0
2887
3182
  * Contact: devs@thorchain.org
2888
3183
  *
2889
3184
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2918,4 +3213,4 @@ class Configuration {
2918
3213
 
2919
3214
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
2920
3215
 
2921
- export { Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
3216
+ export { Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
package/lib/index.js CHANGED
@@ -1884,6 +1884,301 @@ class QueueApi extends BaseAPI {
1884
1884
  return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
1885
1885
  }
1886
1886
  }
1887
+ /**
1888
+ * QuoteApi - axios parameter creator
1889
+ * @export
1890
+ */
1891
+ const QuoteApiAxiosParamCreator = function (configuration) {
1892
+ return {
1893
+ /**
1894
+ * Provide a quote estimate for the provided saver deposit.
1895
+ * @param {number} [height] optional block height, defaults to current tip
1896
+ * @param {string} [asset] the asset to deposit
1897
+ * @param {number} [amount] the source asset amount in 1e8 decimals
1898
+ * @param {*} [options] Override http request option.
1899
+ * @throws {RequiredError}
1900
+ */
1901
+ quotesaverdeposit: (height, asset, amount, options = {}) => __awaiter(this, void 0, void 0, function* () {
1902
+ const localVarPath = `/thorchain/quote/saver/deposit`;
1903
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1904
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1905
+ let baseOptions;
1906
+ if (configuration) {
1907
+ baseOptions = configuration.baseOptions;
1908
+ }
1909
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1910
+ const localVarHeaderParameter = {};
1911
+ const localVarQueryParameter = {};
1912
+ if (height !== undefined) {
1913
+ localVarQueryParameter['height'] = height;
1914
+ }
1915
+ if (asset !== undefined) {
1916
+ localVarQueryParameter['asset'] = asset;
1917
+ }
1918
+ if (amount !== undefined) {
1919
+ localVarQueryParameter['amount'] = amount;
1920
+ }
1921
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1922
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1923
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1924
+ return {
1925
+ url: toPathString(localVarUrlObj),
1926
+ options: localVarRequestOptions,
1927
+ };
1928
+ }),
1929
+ /**
1930
+ * Provide a quote estimate for the provided saver withdraw.
1931
+ * @param {number} [height] optional block height, defaults to current tip
1932
+ * @param {string} [asset] the asset to withdraw
1933
+ * @param {string} [address] the address for the position
1934
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
1935
+ * @param {*} [options] Override http request option.
1936
+ * @throws {RequiredError}
1937
+ */
1938
+ quotesaverwithdraw: (height, asset, address, withdrawBps, options = {}) => __awaiter(this, void 0, void 0, function* () {
1939
+ const localVarPath = `/thorchain/quote/saver/withdraw`;
1940
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1941
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1942
+ let baseOptions;
1943
+ if (configuration) {
1944
+ baseOptions = configuration.baseOptions;
1945
+ }
1946
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1947
+ const localVarHeaderParameter = {};
1948
+ const localVarQueryParameter = {};
1949
+ if (height !== undefined) {
1950
+ localVarQueryParameter['height'] = height;
1951
+ }
1952
+ if (asset !== undefined) {
1953
+ localVarQueryParameter['asset'] = asset;
1954
+ }
1955
+ if (address !== undefined) {
1956
+ localVarQueryParameter['address'] = address;
1957
+ }
1958
+ if (withdrawBps !== undefined) {
1959
+ localVarQueryParameter['withdraw_bps'] = withdrawBps;
1960
+ }
1961
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1962
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1963
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1964
+ return {
1965
+ url: toPathString(localVarUrlObj),
1966
+ options: localVarRequestOptions,
1967
+ };
1968
+ }),
1969
+ /**
1970
+ * Provide a quote estimate for the provided swap.
1971
+ * @param {number} [height] optional block height, defaults to current tip
1972
+ * @param {string} [fromAsset] the source asset
1973
+ * @param {string} [toAsset] the target asset
1974
+ * @param {number} [amount] the source asset amount in 1e8 decimals
1975
+ * @param {string} [destination] the destination address, required to generate memo
1976
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
1977
+ * @param {number} [affiliateBps] the affiliate fee in basis points
1978
+ * @param {string} [affiliate] the affiliate (address or thorname)
1979
+ * @param {*} [options] Override http request option.
1980
+ * @throws {RequiredError}
1981
+ */
1982
+ quoteswap: (height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
1983
+ const localVarPath = `/thorchain/quote/swap`;
1984
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1985
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1986
+ let baseOptions;
1987
+ if (configuration) {
1988
+ baseOptions = configuration.baseOptions;
1989
+ }
1990
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1991
+ const localVarHeaderParameter = {};
1992
+ const localVarQueryParameter = {};
1993
+ if (height !== undefined) {
1994
+ localVarQueryParameter['height'] = height;
1995
+ }
1996
+ if (fromAsset !== undefined) {
1997
+ localVarQueryParameter['from_asset'] = fromAsset;
1998
+ }
1999
+ if (toAsset !== undefined) {
2000
+ localVarQueryParameter['to_asset'] = toAsset;
2001
+ }
2002
+ if (amount !== undefined) {
2003
+ localVarQueryParameter['amount'] = amount;
2004
+ }
2005
+ if (destination !== undefined) {
2006
+ localVarQueryParameter['destination'] = destination;
2007
+ }
2008
+ if (toleranceBps !== undefined) {
2009
+ localVarQueryParameter['tolerance_bps'] = toleranceBps;
2010
+ }
2011
+ if (affiliateBps !== undefined) {
2012
+ localVarQueryParameter['affiliate_bps'] = affiliateBps;
2013
+ }
2014
+ if (affiliate !== undefined) {
2015
+ localVarQueryParameter['affiliate'] = affiliate;
2016
+ }
2017
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2018
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2019
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2020
+ return {
2021
+ url: toPathString(localVarUrlObj),
2022
+ options: localVarRequestOptions,
2023
+ };
2024
+ }),
2025
+ };
2026
+ };
2027
+ /**
2028
+ * QuoteApi - functional programming interface
2029
+ * @export
2030
+ */
2031
+ const QuoteApiFp = function (configuration) {
2032
+ const localVarAxiosParamCreator = QuoteApiAxiosParamCreator(configuration);
2033
+ return {
2034
+ /**
2035
+ * Provide a quote estimate for the provided saver deposit.
2036
+ * @param {number} [height] optional block height, defaults to current tip
2037
+ * @param {string} [asset] the asset to deposit
2038
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2039
+ * @param {*} [options] Override http request option.
2040
+ * @throws {RequiredError}
2041
+ */
2042
+ quotesaverdeposit(height, asset, amount, options) {
2043
+ return __awaiter(this, void 0, void 0, function* () {
2044
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quotesaverdeposit(height, asset, amount, options);
2045
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2046
+ });
2047
+ },
2048
+ /**
2049
+ * Provide a quote estimate for the provided saver withdraw.
2050
+ * @param {number} [height] optional block height, defaults to current tip
2051
+ * @param {string} [asset] the asset to withdraw
2052
+ * @param {string} [address] the address for the position
2053
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2054
+ * @param {*} [options] Override http request option.
2055
+ * @throws {RequiredError}
2056
+ */
2057
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2058
+ return __awaiter(this, void 0, void 0, function* () {
2059
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quotesaverwithdraw(height, asset, address, withdrawBps, options);
2060
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2061
+ });
2062
+ },
2063
+ /**
2064
+ * Provide a quote estimate for the provided swap.
2065
+ * @param {number} [height] optional block height, defaults to current tip
2066
+ * @param {string} [fromAsset] the source asset
2067
+ * @param {string} [toAsset] the target asset
2068
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2069
+ * @param {string} [destination] the destination address, required to generate memo
2070
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2071
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2072
+ * @param {string} [affiliate] the affiliate (address or thorname)
2073
+ * @param {*} [options] Override http request option.
2074
+ * @throws {RequiredError}
2075
+ */
2076
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2077
+ return __awaiter(this, void 0, void 0, function* () {
2078
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options);
2079
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2080
+ });
2081
+ },
2082
+ };
2083
+ };
2084
+ /**
2085
+ * QuoteApi - factory interface
2086
+ * @export
2087
+ */
2088
+ const QuoteApiFactory = function (configuration, basePath, axios) {
2089
+ const localVarFp = QuoteApiFp(configuration);
2090
+ return {
2091
+ /**
2092
+ * Provide a quote estimate for the provided saver deposit.
2093
+ * @param {number} [height] optional block height, defaults to current tip
2094
+ * @param {string} [asset] the asset to deposit
2095
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2096
+ * @param {*} [options] Override http request option.
2097
+ * @throws {RequiredError}
2098
+ */
2099
+ quotesaverdeposit(height, asset, amount, options) {
2100
+ return localVarFp.quotesaverdeposit(height, asset, amount, options).then((request) => request(axios, basePath));
2101
+ },
2102
+ /**
2103
+ * Provide a quote estimate for the provided saver withdraw.
2104
+ * @param {number} [height] optional block height, defaults to current tip
2105
+ * @param {string} [asset] the asset to withdraw
2106
+ * @param {string} [address] the address for the position
2107
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2108
+ * @param {*} [options] Override http request option.
2109
+ * @throws {RequiredError}
2110
+ */
2111
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2112
+ return localVarFp.quotesaverwithdraw(height, asset, address, withdrawBps, options).then((request) => request(axios, basePath));
2113
+ },
2114
+ /**
2115
+ * Provide a quote estimate for the provided swap.
2116
+ * @param {number} [height] optional block height, defaults to current tip
2117
+ * @param {string} [fromAsset] the source asset
2118
+ * @param {string} [toAsset] the target asset
2119
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2120
+ * @param {string} [destination] the destination address, required to generate memo
2121
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2122
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2123
+ * @param {string} [affiliate] the affiliate (address or thorname)
2124
+ * @param {*} [options] Override http request option.
2125
+ * @throws {RequiredError}
2126
+ */
2127
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2128
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2129
+ },
2130
+ };
2131
+ };
2132
+ /**
2133
+ * QuoteApi - object-oriented interface
2134
+ * @export
2135
+ * @class QuoteApi
2136
+ * @extends {BaseAPI}
2137
+ */
2138
+ class QuoteApi extends BaseAPI {
2139
+ /**
2140
+ * Provide a quote estimate for the provided saver deposit.
2141
+ * @param {number} [height] optional block height, defaults to current tip
2142
+ * @param {string} [asset] the asset to deposit
2143
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2144
+ * @param {*} [options] Override http request option.
2145
+ * @throws {RequiredError}
2146
+ * @memberof QuoteApi
2147
+ */
2148
+ quotesaverdeposit(height, asset, amount, options) {
2149
+ return QuoteApiFp(this.configuration).quotesaverdeposit(height, asset, amount, options).then((request) => request(this.axios, this.basePath));
2150
+ }
2151
+ /**
2152
+ * Provide a quote estimate for the provided saver withdraw.
2153
+ * @param {number} [height] optional block height, defaults to current tip
2154
+ * @param {string} [asset] the asset to withdraw
2155
+ * @param {string} [address] the address for the position
2156
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2157
+ * @param {*} [options] Override http request option.
2158
+ * @throws {RequiredError}
2159
+ * @memberof QuoteApi
2160
+ */
2161
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2162
+ return QuoteApiFp(this.configuration).quotesaverwithdraw(height, asset, address, withdrawBps, options).then((request) => request(this.axios, this.basePath));
2163
+ }
2164
+ /**
2165
+ * Provide a quote estimate for the provided swap.
2166
+ * @param {number} [height] optional block height, defaults to current tip
2167
+ * @param {string} [fromAsset] the source asset
2168
+ * @param {string} [toAsset] the target asset
2169
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2170
+ * @param {string} [destination] the destination address, required to generate memo
2171
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2172
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2173
+ * @param {string} [affiliate] the affiliate (address or thorname)
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ * @memberof QuoteApi
2177
+ */
2178
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2179
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
2180
+ }
2181
+ }
1887
2182
  /**
1888
2183
  * SaversApi - axios parameter creator
1889
2184
  * @export
@@ -2891,7 +3186,7 @@ class VaultsApi extends BaseAPI {
2891
3186
  * Thornode API
2892
3187
  * Thornode REST API.
2893
3188
  *
2894
- * The version of the OpenAPI document: 1.98.0
3189
+ * The version of the OpenAPI document: 1.99.0
2895
3190
  * Contact: devs@thorchain.org
2896
3191
  *
2897
3192
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2961,6 +3256,10 @@ exports.QueueApi = QueueApi;
2961
3256
  exports.QueueApiAxiosParamCreator = QueueApiAxiosParamCreator;
2962
3257
  exports.QueueApiFactory = QueueApiFactory;
2963
3258
  exports.QueueApiFp = QueueApiFp;
3259
+ exports.QuoteApi = QuoteApi;
3260
+ exports.QuoteApiAxiosParamCreator = QuoteApiAxiosParamCreator;
3261
+ exports.QuoteApiFactory = QuoteApiFactory;
3262
+ exports.QuoteApiFp = QuoteApiFp;
2964
3263
  exports.SaversApi = SaversApi;
2965
3264
  exports.SaversApiAxiosParamCreator = SaversApiAxiosParamCreator;
2966
3265
  exports.SaversApiFactory = SaversApiFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thornode",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "description": "Thornode module that exposes all thornode functions using openapi-generator-cli",
6
6
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "prepublishOnly": "yarn run build",
31
31
  "test": "jest --passWithNoTests",
32
32
  "generate:types": "yarn clean:types:thornode && yarn generate:types:thornode",
33
- "generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://gitlab.com/thorchain/thornode/-/raw/release-1.98.0/openapi/openapi.yaml -g typescript-axios -o ./src/generated/thornodeApi --skip-validate-spec --generate-alias-as-model",
33
+ "generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://gitlab.com/thorchain/thornode/-/raw/release-1.99.0/openapi/openapi.yaml -g typescript-axios -o ./src/generated/thornodeApi --skip-validate-spec --generate-alias-as-model",
34
34
  "clean:types:thornode": "rimraf ./src/generated/thornodeApi"
35
35
  },
36
36
  "devDependencies": {