@xchainjs/xchain-thornode 0.1.1 → 0.1.3
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/README.md +17 -0
- package/lib/generated/thornodeApi/api.d.ts +457 -51
- package/lib/generated/thornodeApi/base.d.ts +3 -3
- 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 +307 -4
- package/lib/index.js +310 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -27,6 +27,23 @@ Request data from MimirApi
|
|
|
27
27
|
const mimirResponse = await mimirApi.mimir()
|
|
28
28
|
console.log(mimirResponse.data)
|
|
29
29
|
|
|
30
|
+
```
|
|
31
|
+
## Example - set custom header
|
|
32
|
+
|
|
33
|
+
Request data from MimirApi
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
// THORNODE_API_9R_URL - default exported URL
|
|
37
|
+
// import { MimirApi, THORNODE_API_9R_URL, Configuration } from '@xchainjs/xchain-thornode'
|
|
38
|
+
|
|
39
|
+
const baseUrl = THORNODE_API_9R_URL
|
|
40
|
+
const headers = {"x-client-id": "my-custom-val"}
|
|
41
|
+
const baseOptions = { headers }
|
|
42
|
+
const apiconfig = new Configuration({ basePath: baseUrl , baseOptions })
|
|
43
|
+
const mimirApi = new MimirApi(apiconfig)
|
|
44
|
+
const mimirResponse = await mimirApi.mimir()
|
|
45
|
+
console.log(mimirResponse.data)
|
|
46
|
+
|
|
30
47
|
```
|
|
31
48
|
|
|
32
49
|
## Documentation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.100.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
|
-
*
|
|
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
|
-
'
|
|
1007
|
+
'synth_mint_paused': boolean;
|
|
1028
1008
|
}
|
|
1029
1009
|
/**
|
|
1030
1010
|
*
|
|
@@ -1064,6 +1044,246 @@ 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
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
*
|
|
1239
|
+
* @export
|
|
1240
|
+
* @interface Saver
|
|
1241
|
+
*/
|
|
1242
|
+
export interface Saver {
|
|
1243
|
+
/**
|
|
1244
|
+
*
|
|
1245
|
+
* @type {string}
|
|
1246
|
+
* @memberof Saver
|
|
1247
|
+
*/
|
|
1248
|
+
'asset': string;
|
|
1249
|
+
/**
|
|
1250
|
+
*
|
|
1251
|
+
* @type {string}
|
|
1252
|
+
* @memberof Saver
|
|
1253
|
+
*/
|
|
1254
|
+
'asset_address': string;
|
|
1255
|
+
/**
|
|
1256
|
+
*
|
|
1257
|
+
* @type {number}
|
|
1258
|
+
* @memberof Saver
|
|
1259
|
+
*/
|
|
1260
|
+
'last_add_height'?: number;
|
|
1261
|
+
/**
|
|
1262
|
+
*
|
|
1263
|
+
* @type {number}
|
|
1264
|
+
* @memberof Saver
|
|
1265
|
+
*/
|
|
1266
|
+
'last_withdraw_height'?: number;
|
|
1267
|
+
/**
|
|
1268
|
+
*
|
|
1269
|
+
* @type {string}
|
|
1270
|
+
* @memberof Saver
|
|
1271
|
+
*/
|
|
1272
|
+
'units': string;
|
|
1273
|
+
/**
|
|
1274
|
+
*
|
|
1275
|
+
* @type {string}
|
|
1276
|
+
* @memberof Saver
|
|
1277
|
+
*/
|
|
1278
|
+
'asset_deposit_value': string;
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
*
|
|
1282
|
+
* @export
|
|
1283
|
+
* @interface SaverResponse
|
|
1284
|
+
*/
|
|
1285
|
+
export interface SaverResponse extends Array<LiquidityProvider> {
|
|
1286
|
+
}
|
|
1067
1287
|
/**
|
|
1068
1288
|
*
|
|
1069
1289
|
* @export
|
|
@@ -1083,24 +1303,49 @@ export interface Thorname {
|
|
|
1083
1303
|
* @memberof Thorname
|
|
1084
1304
|
*/
|
|
1085
1305
|
'name'?: string;
|
|
1306
|
+
/**
|
|
1307
|
+
*
|
|
1308
|
+
* @type {number}
|
|
1309
|
+
* @memberof Thorname
|
|
1310
|
+
*/
|
|
1311
|
+
'expire_block_height'?: number;
|
|
1086
1312
|
/**
|
|
1087
1313
|
*
|
|
1088
1314
|
* @type {string}
|
|
1089
1315
|
* @memberof Thorname
|
|
1090
1316
|
*/
|
|
1091
|
-
'
|
|
1317
|
+
'owner'?: string;
|
|
1092
1318
|
/**
|
|
1093
1319
|
*
|
|
1094
1320
|
* @type {string}
|
|
1095
1321
|
* @memberof Thorname
|
|
1096
1322
|
*/
|
|
1097
|
-
'
|
|
1323
|
+
'preferred_asset': string;
|
|
1098
1324
|
/**
|
|
1099
1325
|
*
|
|
1100
|
-
* @type {
|
|
1326
|
+
* @type {Array<ThornameAlias>}
|
|
1101
1327
|
* @memberof Thorname
|
|
1102
1328
|
*/
|
|
1103
|
-
'
|
|
1329
|
+
'aliases': Array<ThornameAlias>;
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
*
|
|
1333
|
+
* @export
|
|
1334
|
+
* @interface ThornameAlias
|
|
1335
|
+
*/
|
|
1336
|
+
export interface ThornameAlias {
|
|
1337
|
+
/**
|
|
1338
|
+
*
|
|
1339
|
+
* @type {string}
|
|
1340
|
+
* @memberof ThornameAlias
|
|
1341
|
+
*/
|
|
1342
|
+
'chain'?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
*
|
|
1345
|
+
* @type {string}
|
|
1346
|
+
* @memberof ThornameAlias
|
|
1347
|
+
*/
|
|
1348
|
+
'address'?: string;
|
|
1104
1349
|
}
|
|
1105
1350
|
/**
|
|
1106
1351
|
*
|
|
@@ -2483,6 +2728,167 @@ export declare class QueueApi extends BaseAPI {
|
|
|
2483
2728
|
*/
|
|
2484
2729
|
queueScheduled(height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ScheduledResponse, any>>;
|
|
2485
2730
|
}
|
|
2731
|
+
/**
|
|
2732
|
+
* QuoteApi - axios parameter creator
|
|
2733
|
+
* @export
|
|
2734
|
+
*/
|
|
2735
|
+
export declare const QuoteApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
|
|
2736
|
+
/**
|
|
2737
|
+
* Provide a quote estimate for the provided saver deposit.
|
|
2738
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2739
|
+
* @param {string} [asset] the asset to deposit
|
|
2740
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2741
|
+
* @param {*} [options] Override http request option.
|
|
2742
|
+
* @throws {RequiredError}
|
|
2743
|
+
*/
|
|
2744
|
+
quotesaverdeposit: (height?: number | undefined, asset?: string | undefined, amount?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
2745
|
+
/**
|
|
2746
|
+
* Provide a quote estimate for the provided saver withdraw.
|
|
2747
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2748
|
+
* @param {string} [asset] the asset to withdraw
|
|
2749
|
+
* @param {string} [address] the address for the position
|
|
2750
|
+
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
2751
|
+
* @param {*} [options] Override http request option.
|
|
2752
|
+
* @throws {RequiredError}
|
|
2753
|
+
*/
|
|
2754
|
+
quotesaverwithdraw: (height?: number | undefined, asset?: string | undefined, address?: string | undefined, withdrawBps?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
2755
|
+
/**
|
|
2756
|
+
* Provide a quote estimate for the provided swap.
|
|
2757
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2758
|
+
* @param {string} [fromAsset] the source asset
|
|
2759
|
+
* @param {string} [toAsset] the target asset
|
|
2760
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2761
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
2762
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2763
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2764
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2765
|
+
* @param {*} [options] Override http request option.
|
|
2766
|
+
* @throws {RequiredError}
|
|
2767
|
+
*/
|
|
2768
|
+
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>;
|
|
2769
|
+
};
|
|
2770
|
+
/**
|
|
2771
|
+
* QuoteApi - functional programming interface
|
|
2772
|
+
* @export
|
|
2773
|
+
*/
|
|
2774
|
+
export declare const QuoteApiFp: (configuration?: Configuration | undefined) => {
|
|
2775
|
+
/**
|
|
2776
|
+
* Provide a quote estimate for the provided saver deposit.
|
|
2777
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2778
|
+
* @param {string} [asset] the asset to deposit
|
|
2779
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2780
|
+
* @param {*} [options] Override http request option.
|
|
2781
|
+
* @throws {RequiredError}
|
|
2782
|
+
*/
|
|
2783
|
+
quotesaverdeposit(height?: number | undefined, asset?: string | undefined, amount?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<QuoteSaverDepositResponse>>;
|
|
2784
|
+
/**
|
|
2785
|
+
* Provide a quote estimate for the provided saver withdraw.
|
|
2786
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2787
|
+
* @param {string} [asset] the asset to withdraw
|
|
2788
|
+
* @param {string} [address] the address for the position
|
|
2789
|
+
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
2790
|
+
* @param {*} [options] Override http request option.
|
|
2791
|
+
* @throws {RequiredError}
|
|
2792
|
+
*/
|
|
2793
|
+
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>>;
|
|
2794
|
+
/**
|
|
2795
|
+
* Provide a quote estimate for the provided swap.
|
|
2796
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2797
|
+
* @param {string} [fromAsset] the source asset
|
|
2798
|
+
* @param {string} [toAsset] the target asset
|
|
2799
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2800
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
2801
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2802
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2803
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2804
|
+
* @param {*} [options] Override http request option.
|
|
2805
|
+
* @throws {RequiredError}
|
|
2806
|
+
*/
|
|
2807
|
+
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>>;
|
|
2808
|
+
};
|
|
2809
|
+
/**
|
|
2810
|
+
* QuoteApi - factory interface
|
|
2811
|
+
* @export
|
|
2812
|
+
*/
|
|
2813
|
+
export declare const QuoteApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
|
|
2814
|
+
/**
|
|
2815
|
+
* Provide a quote estimate for the provided saver deposit.
|
|
2816
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2817
|
+
* @param {string} [asset] the asset to deposit
|
|
2818
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2819
|
+
* @param {*} [options] Override http request option.
|
|
2820
|
+
* @throws {RequiredError}
|
|
2821
|
+
*/
|
|
2822
|
+
quotesaverdeposit(height?: number | undefined, asset?: string | undefined, amount?: number | undefined, options?: any): AxiosPromise<QuoteSaverDepositResponse>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Provide a quote estimate for the provided saver withdraw.
|
|
2825
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2826
|
+
* @param {string} [asset] the asset to withdraw
|
|
2827
|
+
* @param {string} [address] the address for the position
|
|
2828
|
+
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
2829
|
+
* @param {*} [options] Override http request option.
|
|
2830
|
+
* @throws {RequiredError}
|
|
2831
|
+
*/
|
|
2832
|
+
quotesaverwithdraw(height?: number | undefined, asset?: string | undefined, address?: string | undefined, withdrawBps?: number | undefined, options?: any): AxiosPromise<QuoteSaverWithdrawResponse>;
|
|
2833
|
+
/**
|
|
2834
|
+
* Provide a quote estimate for the provided swap.
|
|
2835
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2836
|
+
* @param {string} [fromAsset] the source asset
|
|
2837
|
+
* @param {string} [toAsset] the target asset
|
|
2838
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2839
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
2840
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2841
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2842
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2843
|
+
* @param {*} [options] Override http request option.
|
|
2844
|
+
* @throws {RequiredError}
|
|
2845
|
+
*/
|
|
2846
|
+
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>;
|
|
2847
|
+
};
|
|
2848
|
+
/**
|
|
2849
|
+
* QuoteApi - object-oriented interface
|
|
2850
|
+
* @export
|
|
2851
|
+
* @class QuoteApi
|
|
2852
|
+
* @extends {BaseAPI}
|
|
2853
|
+
*/
|
|
2854
|
+
export declare class QuoteApi extends BaseAPI {
|
|
2855
|
+
/**
|
|
2856
|
+
* Provide a quote estimate for the provided saver deposit.
|
|
2857
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2858
|
+
* @param {string} [asset] the asset to deposit
|
|
2859
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2860
|
+
* @param {*} [options] Override http request option.
|
|
2861
|
+
* @throws {RequiredError}
|
|
2862
|
+
* @memberof QuoteApi
|
|
2863
|
+
*/
|
|
2864
|
+
quotesaverdeposit(height?: number, asset?: string, amount?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QuoteSaverDepositResponse, any>>;
|
|
2865
|
+
/**
|
|
2866
|
+
* Provide a quote estimate for the provided saver withdraw.
|
|
2867
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2868
|
+
* @param {string} [asset] the asset to withdraw
|
|
2869
|
+
* @param {string} [address] the address for the position
|
|
2870
|
+
* @param {number} [withdrawBps] the basis points of the existing position to withdraw
|
|
2871
|
+
* @param {*} [options] Override http request option.
|
|
2872
|
+
* @throws {RequiredError}
|
|
2873
|
+
* @memberof QuoteApi
|
|
2874
|
+
*/
|
|
2875
|
+
quotesaverwithdraw(height?: number, asset?: string, address?: string, withdrawBps?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QuoteSaverWithdrawResponse, any>>;
|
|
2876
|
+
/**
|
|
2877
|
+
* Provide a quote estimate for the provided swap.
|
|
2878
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2879
|
+
* @param {string} [fromAsset] the source asset
|
|
2880
|
+
* @param {string} [toAsset] the target asset
|
|
2881
|
+
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2882
|
+
* @param {string} [destination] the destination address, required to generate memo
|
|
2883
|
+
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2884
|
+
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2885
|
+
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2886
|
+
* @param {*} [options] Override http request option.
|
|
2887
|
+
* @throws {RequiredError}
|
|
2888
|
+
* @memberof QuoteApi
|
|
2889
|
+
*/
|
|
2890
|
+
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>>;
|
|
2891
|
+
}
|
|
2486
2892
|
/**
|
|
2487
2893
|
* SaversApi - axios parameter creator
|
|
2488
2894
|
* @export
|
|
@@ -2519,7 +2925,7 @@ export declare const SaversApiFp: (configuration?: Configuration | undefined) =>
|
|
|
2519
2925
|
* @param {*} [options] Override http request option.
|
|
2520
2926
|
* @throws {RequiredError}
|
|
2521
2927
|
*/
|
|
2522
|
-
saver(asset: string, address: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<
|
|
2928
|
+
saver(asset: string, address: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<SaverResponse>>;
|
|
2523
2929
|
/**
|
|
2524
2930
|
* Returns all savers for the savers pool.
|
|
2525
2931
|
* @param {string} asset
|
|
@@ -2527,7 +2933,7 @@ export declare const SaversApiFp: (configuration?: Configuration | undefined) =>
|
|
|
2527
2933
|
* @param {*} [options] Override http request option.
|
|
2528
2934
|
* @throws {RequiredError}
|
|
2529
2935
|
*/
|
|
2530
|
-
savers(asset: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<
|
|
2936
|
+
savers(asset: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<SaverResponse>>;
|
|
2531
2937
|
};
|
|
2532
2938
|
/**
|
|
2533
2939
|
* SaversApi - factory interface
|
|
@@ -2542,7 +2948,7 @@ export declare const SaversApiFactory: (configuration?: Configuration | undefine
|
|
|
2542
2948
|
* @param {*} [options] Override http request option.
|
|
2543
2949
|
* @throws {RequiredError}
|
|
2544
2950
|
*/
|
|
2545
|
-
saver(asset: string, address: string, height?: number | undefined, options?: any): AxiosPromise<
|
|
2951
|
+
saver(asset: string, address: string, height?: number | undefined, options?: any): AxiosPromise<SaverResponse>;
|
|
2546
2952
|
/**
|
|
2547
2953
|
* Returns all savers for the savers pool.
|
|
2548
2954
|
* @param {string} asset
|
|
@@ -2550,7 +2956,7 @@ export declare const SaversApiFactory: (configuration?: Configuration | undefine
|
|
|
2550
2956
|
* @param {*} [options] Override http request option.
|
|
2551
2957
|
* @throws {RequiredError}
|
|
2552
2958
|
*/
|
|
2553
|
-
savers(asset: string, height?: number | undefined, options?: any): AxiosPromise<
|
|
2959
|
+
savers(asset: string, height?: number | undefined, options?: any): AxiosPromise<SaverResponse>;
|
|
2554
2960
|
};
|
|
2555
2961
|
/**
|
|
2556
2962
|
* SaversApi - object-oriented interface
|
|
@@ -2568,7 +2974,7 @@ export declare class SaversApi extends BaseAPI {
|
|
|
2568
2974
|
* @throws {RequiredError}
|
|
2569
2975
|
* @memberof SaversApi
|
|
2570
2976
|
*/
|
|
2571
|
-
saver(asset: string, address: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
2977
|
+
saver(asset: string, address: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SaverResponse, any>>;
|
|
2572
2978
|
/**
|
|
2573
2979
|
* Returns all savers for the savers pool.
|
|
2574
2980
|
* @param {string} asset
|
|
@@ -2577,7 +2983,7 @@ export declare class SaversApi extends BaseAPI {
|
|
|
2577
2983
|
* @throws {RequiredError}
|
|
2578
2984
|
* @memberof SaversApi
|
|
2579
2985
|
*/
|
|
2580
|
-
savers(asset: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
2986
|
+
savers(asset: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SaverResponse, any>>;
|
|
2581
2987
|
}
|
|
2582
2988
|
/**
|
|
2583
2989
|
* TSSApi - axios parameter creator
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.100.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Configuration } from
|
|
12
|
+
import { Configuration } from './configuration';
|
|
13
13
|
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
export declare const BASE_PATH: string;
|
|
15
15
|
/**
|
|
@@ -50,6 +50,6 @@ export declare class BaseAPI {
|
|
|
50
50
|
*/
|
|
51
51
|
export declare class RequiredError extends Error {
|
|
52
52
|
field: string;
|
|
53
|
-
name:
|
|
53
|
+
name: 'RequiredError';
|
|
54
54
|
constructor(field: string, msg?: string);
|
|
55
55
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.100.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.100.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.100.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|