mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
add get atomic fee method
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.23.0-rc2",
|
||||
"version": "0.23.0-rc3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.23.0-rc2",
|
||||
"version": "0.23.0-rc3",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.23.0-rc2",
|
||||
"version": "0.23.0-rc3",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -71,6 +71,7 @@ class Aggregator {
|
||||
this.getTradeProfits = this.getTradeProfits.bind(this);
|
||||
this.getStableCoins = this.getStableCoins.bind(this);
|
||||
this.placeAtomicSwap = this.placeAtomicSwap.bind(this);
|
||||
this.getAtomicSwapFee = this.getAtomicSwapFee.bind(this);
|
||||
this.placeOrder = this.placeOrder.bind(this);
|
||||
this.placeLockOrder = this.placeLockOrder.bind(this);
|
||||
this.cancelOrder = this.cancelOrder.bind(this);
|
||||
@@ -444,6 +445,17 @@ class Aggregator {
|
||||
errorSchema,
|
||||
);
|
||||
|
||||
/**
|
||||
* Get atomic swap fee in current chain
|
||||
* @returns Fee in percents
|
||||
*/
|
||||
getAtomicSwapFee = () => fetchWithValidation(
|
||||
`${this.apiUrl}/api/v1/atomic/swap-fee`,
|
||||
z.string(),
|
||||
{ headers: this.basicAuthHeaders },
|
||||
errorSchema,
|
||||
);
|
||||
|
||||
/**
|
||||
* Get placed atomic swaps. Each atomic swap received from this list has a target chain corresponding to this Aggregator
|
||||
* @param sender Sender address
|
||||
|
||||
Reference in New Issue
Block a user