@shapeshiftoss/swapper 17.7.1 → 17.7.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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +18 -7
- package/dist/cjs/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
- package/dist/cjs/swappers/AcrossSwapper/utils/getTrade.js +1 -2
- package/dist/cjs/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
- package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeQuote/getTradeQuote.js +2 -2
- package/dist/cjs/swappers/ArbitrumBridgeSwapper/getTradeRate/getTradeRate.js +1 -2
- package/dist/cjs/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
- package/dist/cjs/swappers/AvnuSwapper/endpoints.js +2 -2
- package/dist/cjs/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
- package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeQuote/getBebopSolanaTradeQuote.js +1 -2
- package/dist/cjs/swappers/BebopSwapper/getBebopSolanaTradeRate/getBebopSolanaTradeRate.js +1 -2
- package/dist/cjs/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +2 -3
- package/dist/cjs/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +2 -3
- package/dist/cjs/swappers/BebopSwapper/types.d.ts +1 -1
- package/dist/cjs/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
- package/dist/cjs/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +4 -4
- package/dist/cjs/swappers/BebopSwapper/utils/helpers/helpers.d.ts +2 -1
- package/dist/cjs/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +19 -9
- package/dist/cjs/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
- package/dist/cjs/swappers/ButterSwap/test-data/routeQuote.js +4 -4
- package/dist/cjs/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
- package/dist/cjs/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
- package/dist/cjs/swappers/ButterSwap/xhr.js +4 -4
- package/dist/cjs/swappers/CetusSwapper/utils/constants.d.ts +1 -1
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteBoostQuote.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteEstimatedDurationsSeconds.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuote.js +5 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasQuoteQuoteFee.js +5 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusChunkInfo.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusDca.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusEgress.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasStatusSwap.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/models/ChainflipBaasSwapDepositAddress.js +4 -5
- package/dist/cjs/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
- package/dist/cjs/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +2 -2
- package/dist/cjs/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
- package/dist/cjs/swappers/ChainflipSwapper/utils/helpers.d.ts +3 -2
- package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +2 -3
- package/dist/cjs/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
- package/dist/cjs/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +2 -3
- package/dist/cjs/swappers/CowSwapper/utils/cowService.d.ts +3 -3
- package/dist/cjs/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
- package/dist/cjs/swappers/DebridgeSwapper/utils/getTrade.js +1 -2
- package/dist/cjs/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
- package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeQuote/getPortalsTradeQuote.js +1 -2
- package/dist/cjs/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +3 -4
- package/dist/cjs/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
- package/dist/cjs/swappers/RelaySwapper/constant.d.ts +39 -1
- package/dist/cjs/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
- package/dist/cjs/swappers/RelaySwapper/utils/getRelayPsbtRelayer.js +17 -7
- package/dist/cjs/swappers/RelaySwapper/utils/getTrade.js +1 -2
- package/dist/cjs/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
- package/dist/cjs/swappers/SunioSwapper/utils/getQuoteOrRate.js +1 -2
- package/dist/cjs/swappers/SunioSwapper/utils/helpers/helpers.d.ts +2 -1
- package/dist/cjs/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
- package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +18 -8
- package/dist/cjs/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +18 -8
- package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
- package/dist/cjs/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
- package/dist/cjs/swappers/ThorchainSwapper/utils/longTailHelpers.js +2 -2
- package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.js +1 -2
- package/dist/cjs/swappers/ZrxSwapper/getZrxTradeQuote/getZrxTradeQuote.test.js +17 -7
- package/dist/cjs/swappers/ZrxSwapper/getZrxTradeRate/getZrxTradeRate.js +1 -2
- package/dist/cjs/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
- package/dist/cjs/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +2 -3
- package/dist/cjs/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
- package/dist/cjs/swappers/utils/test-data/cryptoMarketDataById.d.ts +35 -1
- package/dist/cjs/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
- package/dist/cjs/thorchain-utils/getL1RateOrQuote.js +21 -11
- package/dist/cjs/thorchain-utils/index.js +17 -7
- package/dist/cjs/thorchain-utils/parseBuyTxHash.d.ts +1 -1
- package/dist/cjs/thorchain-utils/service.d.ts +3 -3
- package/dist/cjs/tron-utils/getTronTransactionFees.d.ts +1 -1
- package/dist/cjs/utils/tenderly/storageSlots.js +20 -20
- package/dist/cjs/utils.d.ts +4 -4
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/swappers/AcrossSwapper/utils/acrossService.d.ts +3 -3
- package/dist/esm/swappers/ArbitrumBridgeSwapper/endpoints.d.ts +3 -3
- package/dist/esm/swappers/ArbitrumBridgeSwapper/utils/fetchArbitrumBridgeSwap.d.ts +2 -2
- package/dist/esm/swappers/AvnuSwapper/endpoints.js +2 -2
- package/dist/esm/swappers/AvnuSwapper/utils/constants.d.ts +1 -1
- package/dist/esm/swappers/BebopSwapper/getBebopTradeQuote/getBebopTradeQuote.js +1 -1
- package/dist/esm/swappers/BebopSwapper/getBebopTradeRate/getBebopTradeRate.js +1 -1
- package/dist/esm/swappers/BebopSwapper/types.d.ts +1 -1
- package/dist/esm/swappers/BebopSwapper/utils/bebopService.d.ts +1 -1
- package/dist/esm/swappers/BebopSwapper/utils/fetchFromBebop.d.ts +4 -4
- package/dist/esm/swappers/BebopSwapper/utils/helpers/helpers.d.ts +2 -1
- package/dist/esm/swappers/ButterSwap/swapperApi/checkTradeStatus.test.js +2 -2
- package/dist/esm/swappers/ButterSwap/swapperApi/getTradeQuote.js +1 -1
- package/dist/esm/swappers/ButterSwap/test-data/routeQuote.js +4 -4
- package/dist/esm/swappers/ButterSwap/utils/butterSwapHistoryService.d.ts +3 -3
- package/dist/esm/swappers/ButterSwap/utils/butterSwapService.d.ts +3 -3
- package/dist/esm/swappers/CetusSwapper/utils/constants.d.ts +1 -1
- package/dist/esm/swappers/ChainflipSwapper/utils/chainflipService.d.ts +3 -3
- package/dist/esm/swappers/ChainflipSwapper/utils/getQuoteOrRate.js +2 -2
- package/dist/esm/swappers/ChainflipSwapper/utils/getUtxoTxFees.d.ts +1 -1
- package/dist/esm/swappers/ChainflipSwapper/utils/helpers.d.ts +3 -2
- package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.js +1 -1
- package/dist/esm/swappers/CowSwapper/getCowSwapTradeQuote/getCowSwapTradeQuote.test.js +8 -8
- package/dist/esm/swappers/CowSwapper/getCowSwapTradeRate/getCowSwapTradeRate.js +1 -1
- package/dist/esm/swappers/CowSwapper/utils/cowService.d.ts +3 -3
- package/dist/esm/swappers/DebridgeSwapper/utils/debridgeService.d.ts +3 -3
- package/dist/esm/swappers/NearIntentsSwapper/utils/helpers/helpers.d.ts +2 -2
- package/dist/esm/swappers/PortalsSwapper/getPortalsTradeRate/getPortalsTradeRate.js +2 -2
- package/dist/esm/swappers/PortalsSwapper/utils/helpers.d.ts +1 -1
- package/dist/esm/swappers/RelaySwapper/constant.d.ts +39 -1
- package/dist/esm/swappers/RelaySwapper/utils/fetchRelayTrade.d.ts +1 -1
- package/dist/esm/swappers/RelaySwapper/utils/relayService.d.ts +3 -3
- package/dist/esm/swappers/SunioSwapper/utils/helpers/helpers.d.ts +2 -1
- package/dist/esm/swappers/SunioSwapper/utils/sunioService.d.ts +3 -3
- package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailQuote.js +1 -1
- package/dist/esm/swappers/ThorchainSwapper/utils/getL1ToLongtailRate.js +1 -1
- package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailQuote.js +1 -1
- package/dist/esm/swappers/ThorchainSwapper/utils/getLongtailRate.js +1 -1
- package/dist/esm/swappers/ZrxSwapper/utils/fetchFromZrx.js +2 -2
- package/dist/esm/swappers/ZrxSwapper/utils/helpers/helpers.d.ts +2 -3
- package/dist/esm/swappers/ZrxSwapper/utils/zrxService.d.ts +1 -1
- package/dist/esm/swappers/utils/test-data/cryptoMarketDataById.d.ts +35 -1
- package/dist/esm/thorchain-utils/getCallDataFromQuote.d.ts +1 -1
- package/dist/esm/thorchain-utils/getL1RateOrQuote.js +4 -4
- package/dist/esm/thorchain-utils/parseBuyTxHash.d.ts +1 -1
- package/dist/esm/thorchain-utils/service.d.ts +3 -3
- package/dist/esm/tron-utils/getTronTransactionFees.d.ts +1 -1
- package/dist/esm/utils/tenderly/storageSlots.js +20 -20
- package/dist/esm/utils.d.ts +4 -4
- package/package.json +3 -3
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* Do not edit the class manually.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.instanceOfChainflipBaasStatusDca = instanceOfChainflipBaasStatusDca;
|
|
18
|
+
exports.ChainflipBaasStatusDcaFromJSON = ChainflipBaasStatusDcaFromJSON;
|
|
19
|
+
exports.ChainflipBaasStatusDcaFromJSONTyped = ChainflipBaasStatusDcaFromJSONTyped;
|
|
20
|
+
exports.ChainflipBaasStatusDcaToJSON = ChainflipBaasStatusDcaToJSON;
|
|
18
21
|
const runtime_1 = require("../runtime");
|
|
19
22
|
const ChainflipBaasStatusChunkInfo_1 = require("./ChainflipBaasStatusChunkInfo");
|
|
20
23
|
/**
|
|
@@ -24,11 +27,9 @@ function instanceOfChainflipBaasStatusDca(value) {
|
|
|
24
27
|
let isInstance = true;
|
|
25
28
|
return isInstance;
|
|
26
29
|
}
|
|
27
|
-
exports.instanceOfChainflipBaasStatusDca = instanceOfChainflipBaasStatusDca;
|
|
28
30
|
function ChainflipBaasStatusDcaFromJSON(json) {
|
|
29
31
|
return ChainflipBaasStatusDcaFromJSONTyped(json, false);
|
|
30
32
|
}
|
|
31
|
-
exports.ChainflipBaasStatusDcaFromJSON = ChainflipBaasStatusDcaFromJSON;
|
|
32
33
|
function ChainflipBaasStatusDcaFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
34
|
if ((json === undefined) || (json === null)) {
|
|
34
35
|
return json;
|
|
@@ -40,7 +41,6 @@ function ChainflipBaasStatusDcaFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
41
|
'remainingChunks': !(0, runtime_1.exists)(json, 'remainingChunks') ? undefined : json['remainingChunks'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
exports.ChainflipBaasStatusDcaFromJSONTyped = ChainflipBaasStatusDcaFromJSONTyped;
|
|
44
44
|
function ChainflipBaasStatusDcaToJSON(value) {
|
|
45
45
|
if (value === undefined) {
|
|
46
46
|
return undefined;
|
|
@@ -53,4 +53,3 @@ function ChainflipBaasStatusDcaToJSON(value) {
|
|
|
53
53
|
'currentChunk': (0, ChainflipBaasStatusChunkInfo_1.ChainflipBaasStatusChunkInfoToJSON)(value.currentChunk),
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
exports.ChainflipBaasStatusDcaToJSON = ChainflipBaasStatusDcaToJSON;
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* Do not edit the class manually.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.instanceOfChainflipBaasStatusEgress = instanceOfChainflipBaasStatusEgress;
|
|
18
|
+
exports.ChainflipBaasStatusEgressFromJSON = ChainflipBaasStatusEgressFromJSON;
|
|
19
|
+
exports.ChainflipBaasStatusEgressFromJSONTyped = ChainflipBaasStatusEgressFromJSONTyped;
|
|
20
|
+
exports.ChainflipBaasStatusEgressToJSON = ChainflipBaasStatusEgressToJSON;
|
|
18
21
|
const runtime_1 = require("../runtime");
|
|
19
22
|
const ChainflipBaasStatusFailure_1 = require("./ChainflipBaasStatusFailure");
|
|
20
23
|
/**
|
|
@@ -24,11 +27,9 @@ function instanceOfChainflipBaasStatusEgress(value) {
|
|
|
24
27
|
let isInstance = true;
|
|
25
28
|
return isInstance;
|
|
26
29
|
}
|
|
27
|
-
exports.instanceOfChainflipBaasStatusEgress = instanceOfChainflipBaasStatusEgress;
|
|
28
30
|
function ChainflipBaasStatusEgressFromJSON(json) {
|
|
29
31
|
return ChainflipBaasStatusEgressFromJSONTyped(json, false);
|
|
30
32
|
}
|
|
31
|
-
exports.ChainflipBaasStatusEgressFromJSON = ChainflipBaasStatusEgressFromJSON;
|
|
32
33
|
function ChainflipBaasStatusEgressFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
34
|
if ((json === undefined) || (json === null)) {
|
|
34
35
|
return json;
|
|
@@ -48,7 +49,6 @@ function ChainflipBaasStatusEgressFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
49
|
'failedBlockIndex': !(0, runtime_1.exists)(json, 'failedBlockIndex') ? undefined : json['failedBlockIndex'],
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
exports.ChainflipBaasStatusEgressFromJSONTyped = ChainflipBaasStatusEgressFromJSONTyped;
|
|
52
52
|
function ChainflipBaasStatusEgressToJSON(value) {
|
|
53
53
|
if (value === undefined) {
|
|
54
54
|
return undefined;
|
|
@@ -60,4 +60,3 @@ function ChainflipBaasStatusEgressToJSON(value) {
|
|
|
60
60
|
'failure': (0, ChainflipBaasStatusFailure_1.ChainflipBaasStatusFailureToJSON)(value.failure),
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
exports.ChainflipBaasStatusEgressToJSON = ChainflipBaasStatusEgressToJSON;
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* Do not edit the class manually.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.instanceOfChainflipBaasStatusSwap = instanceOfChainflipBaasStatusSwap;
|
|
18
|
+
exports.ChainflipBaasStatusSwapFromJSON = ChainflipBaasStatusSwapFromJSON;
|
|
19
|
+
exports.ChainflipBaasStatusSwapFromJSONTyped = ChainflipBaasStatusSwapFromJSONTyped;
|
|
20
|
+
exports.ChainflipBaasStatusSwapToJSON = ChainflipBaasStatusSwapToJSON;
|
|
18
21
|
const runtime_1 = require("../runtime");
|
|
19
22
|
const ChainflipBaasStatusChunkInfo_1 = require("./ChainflipBaasStatusChunkInfo");
|
|
20
23
|
const ChainflipBaasStatusDca_1 = require("./ChainflipBaasStatusDca");
|
|
@@ -25,11 +28,9 @@ function instanceOfChainflipBaasStatusSwap(value) {
|
|
|
25
28
|
let isInstance = true;
|
|
26
29
|
return isInstance;
|
|
27
30
|
}
|
|
28
|
-
exports.instanceOfChainflipBaasStatusSwap = instanceOfChainflipBaasStatusSwap;
|
|
29
31
|
function ChainflipBaasStatusSwapFromJSON(json) {
|
|
30
32
|
return ChainflipBaasStatusSwapFromJSONTyped(json, false);
|
|
31
33
|
}
|
|
32
|
-
exports.ChainflipBaasStatusSwapFromJSON = ChainflipBaasStatusSwapFromJSON;
|
|
33
34
|
function ChainflipBaasStatusSwapFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
35
|
if ((json === undefined) || (json === null)) {
|
|
35
36
|
return json;
|
|
@@ -49,7 +50,6 @@ function ChainflipBaasStatusSwapFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
50
|
'dca': !(0, runtime_1.exists)(json, 'dca') ? undefined : (0, ChainflipBaasStatusDca_1.ChainflipBaasStatusDcaFromJSON)(json['dca']),
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
exports.ChainflipBaasStatusSwapFromJSONTyped = ChainflipBaasStatusSwapFromJSONTyped;
|
|
53
53
|
function ChainflipBaasStatusSwapToJSON(value) {
|
|
54
54
|
if (value === undefined) {
|
|
55
55
|
return undefined;
|
|
@@ -72,4 +72,3 @@ function ChainflipBaasStatusSwapToJSON(value) {
|
|
|
72
72
|
'dca': (0, ChainflipBaasStatusDca_1.ChainflipBaasStatusDcaToJSON)(value.dca),
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
exports.ChainflipBaasStatusSwapToJSON = ChainflipBaasStatusSwapToJSON;
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* Do not edit the class manually.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.instanceOfChainflipBaasSwapDepositAddress = instanceOfChainflipBaasSwapDepositAddress;
|
|
18
|
+
exports.ChainflipBaasSwapDepositAddressFromJSON = ChainflipBaasSwapDepositAddressFromJSON;
|
|
19
|
+
exports.ChainflipBaasSwapDepositAddressFromJSONTyped = ChainflipBaasSwapDepositAddressFromJSONTyped;
|
|
20
|
+
exports.ChainflipBaasSwapDepositAddressToJSON = ChainflipBaasSwapDepositAddressToJSON;
|
|
18
21
|
const runtime_1 = require("../runtime");
|
|
19
22
|
/**
|
|
20
23
|
* Check if a given object implements the ChainflipBaasSwapDepositAddress interface.
|
|
@@ -23,11 +26,9 @@ function instanceOfChainflipBaasSwapDepositAddress(value) {
|
|
|
23
26
|
let isInstance = true;
|
|
24
27
|
return isInstance;
|
|
25
28
|
}
|
|
26
|
-
exports.instanceOfChainflipBaasSwapDepositAddress = instanceOfChainflipBaasSwapDepositAddress;
|
|
27
29
|
function ChainflipBaasSwapDepositAddressFromJSON(json) {
|
|
28
30
|
return ChainflipBaasSwapDepositAddressFromJSONTyped(json, false);
|
|
29
31
|
}
|
|
30
|
-
exports.ChainflipBaasSwapDepositAddressFromJSON = ChainflipBaasSwapDepositAddressFromJSON;
|
|
31
32
|
function ChainflipBaasSwapDepositAddressFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
33
|
if ((json === undefined) || (json === null)) {
|
|
33
34
|
return json;
|
|
@@ -44,7 +45,6 @@ function ChainflipBaasSwapDepositAddressFromJSONTyped(json, ignoreDiscriminator)
|
|
|
44
45
|
'channelOpeningFeeNative': !(0, runtime_1.exists)(json, 'channelOpeningFeeNative') ? undefined : json['channelOpeningFeeNative'],
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
exports.ChainflipBaasSwapDepositAddressFromJSONTyped = ChainflipBaasSwapDepositAddressFromJSONTyped;
|
|
48
48
|
function ChainflipBaasSwapDepositAddressToJSON(value) {
|
|
49
49
|
if (value === undefined) {
|
|
50
50
|
return undefined;
|
|
@@ -56,4 +56,3 @@ function ChainflipBaasSwapDepositAddressToJSON(value) {
|
|
|
56
56
|
'id': value.id,
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
exports.ChainflipBaasSwapDepositAddressToJSON = ChainflipBaasSwapDepositAddressToJSON;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const chainflipService: {
|
|
2
|
-
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>
|
|
3
|
-
post: <
|
|
4
|
-
delete: <
|
|
2
|
+
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
3
|
+
post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
4
|
+
delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
5
5
|
};
|
|
@@ -231,7 +231,7 @@ const getQuoteOrRate = async (input, deps) => {
|
|
|
231
231
|
buyAsset,
|
|
232
232
|
sellAsset,
|
|
233
233
|
accountNumber,
|
|
234
|
-
allowanceContract: '0x0',
|
|
234
|
+
allowanceContract: '0x0', // Chainflip does not use contracts
|
|
235
235
|
estimatedExecutionTimeMs: (singleQuoteResponse.boostQuote.estimatedDurationsSeconds?.deposit ?? 0) +
|
|
236
236
|
(singleQuoteResponse.boostQuote.estimatedDurationsSeconds?.swap ?? 0) * 1000,
|
|
237
237
|
chainflipSpecific: {
|
|
@@ -289,7 +289,7 @@ const getQuoteOrRate = async (input, deps) => {
|
|
|
289
289
|
buyAsset,
|
|
290
290
|
sellAsset,
|
|
291
291
|
accountNumber,
|
|
292
|
-
allowanceContract: '0x0',
|
|
292
|
+
allowanceContract: '0x0', // Chainflip does not use contracts - all Txs are sends
|
|
293
293
|
estimatedExecutionTimeMs: ((singleQuoteResponse.estimatedDurationsSeconds?.deposit ?? 0) +
|
|
294
294
|
(singleQuoteResponse.estimatedDurationsSeconds?.swap ?? 0)) *
|
|
295
295
|
1000,
|
|
@@ -5,5 +5,5 @@ type GetUtxoTxFeesInput = {
|
|
|
5
5
|
sellAdapter: UtxoChainAdapter;
|
|
6
6
|
pubKey: string | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const getUtxoTxFees: ({ sellAmountCryptoBaseUnit, sellAdapter, pubKey, }: GetUtxoTxFeesInput) => Promise<Omit<QuoteFeeData,
|
|
8
|
+
export declare const getUtxoTxFees: ({ sellAmountCryptoBaseUnit, sellAdapter, pubKey, }: GetUtxoTxFeesInput) => Promise<Omit<QuoteFeeData, "protocolFees">>;
|
|
9
9
|
export {};
|
|
@@ -3,6 +3,7 @@ import type { Asset } from '@shapeshiftoss/types';
|
|
|
3
3
|
import type { Result } from '@sniptt/monads';
|
|
4
4
|
import type { AxiosResponse } from 'axios';
|
|
5
5
|
import type { SwapErrorRight } from '../../../types';
|
|
6
|
+
import type { ChainflipSupportedChainId } from '../constants';
|
|
6
7
|
import type { ChainflipBaasSwapDepositAddress } from '../models';
|
|
7
8
|
type ChainFlipBrokerBaseArgs = {
|
|
8
9
|
brokerUrl: string;
|
|
@@ -20,8 +21,8 @@ type GetChainFlipSwapArgs = ChainFlipBrokerBaseArgs & {
|
|
|
20
21
|
numberOfChunks?: number;
|
|
21
22
|
chunkIntervalBlocks?: number;
|
|
22
23
|
};
|
|
23
|
-
export declare const isSupportedChainId: (chainId: ChainId) => chainId is
|
|
24
|
-
export declare const isSupportedAssetId: (chainId: ChainId, assetId: AssetId) => chainId is
|
|
24
|
+
export declare const isSupportedChainId: (chainId: ChainId) => chainId is ChainflipSupportedChainId;
|
|
25
|
+
export declare const isSupportedAssetId: (chainId: ChainId, assetId: AssetId) => chainId is ChainflipSupportedChainId;
|
|
25
26
|
export declare const calculateChainflipMinPrice: ({ sellAmountIncludingProtocolFeesCryptoBaseUnit, buyAmountAfterFeesCryptoBaseUnit, slippageTolerancePercentageDecimal, sellAsset, buyAsset, }: {
|
|
26
27
|
sellAmountIncludingProtocolFeesCryptoBaseUnit: string;
|
|
27
28
|
buyAmountAfterFeesCryptoBaseUnit: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCowSwapTradeQuote =
|
|
3
|
+
exports.getCowSwapTradeQuote = getCowSwapTradeQuote;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const types_1 = require("@shapeshiftoss/types");
|
|
6
6
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
@@ -103,7 +103,7 @@ async function getCowSwapTradeQuote(input, config) {
|
|
|
103
103
|
allowanceContract: constants_2.COW_SWAP_VAULT_RELAYER_ADDRESS,
|
|
104
104
|
rate,
|
|
105
105
|
feeData: {
|
|
106
|
-
networkFeeCryptoBaseUnit: '0',
|
|
106
|
+
networkFeeCryptoBaseUnit: '0', // no miner fee for CowSwap
|
|
107
107
|
protocolFees: {
|
|
108
108
|
[sellAsset.assetId]: {
|
|
109
109
|
amountCryptoBaseUnit: feeAmountInSellTokenCryptoBaseUnit,
|
|
@@ -135,4 +135,3 @@ async function getCowSwapTradeQuote(input, config) {
|
|
|
135
135
|
};
|
|
136
136
|
return (0, monads_1.Ok)(quote);
|
|
137
137
|
}
|
|
138
|
-
exports.getCowSwapTradeQuote = getCowSwapTradeQuote;
|
|
@@ -308,8 +308,8 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
308
308
|
networkFeeCryptoBaseUnit: '0',
|
|
309
309
|
},
|
|
310
310
|
sellAmountIncludingProtocolFeesCryptoBaseUnit: '1000000000000',
|
|
311
|
-
buyAmountBeforeFeesCryptoBaseUnit: '166441655297153832879',
|
|
312
|
-
buyAmountAfterFeesCryptoBaseUnit: '144293027591563571150',
|
|
311
|
+
buyAmountBeforeFeesCryptoBaseUnit: '166441655297153832879', // ~166 FOX
|
|
312
|
+
buyAmountAfterFeesCryptoBaseUnit: '144293027591563571150', // ~144 FOX
|
|
313
313
|
source: types_2.SwapperName.CowSwap,
|
|
314
314
|
buyAsset: assets_1.FOX_MAINNET,
|
|
315
315
|
sellAsset: assets_1.WETH,
|
|
@@ -341,7 +341,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
341
341
|
affiliateBps: '0',
|
|
342
342
|
supportsEIP1559: false,
|
|
343
343
|
allowMultiHop: false,
|
|
344
|
-
slippageTolerancePercentageDecimal: '0.005',
|
|
344
|
+
slippageTolerancePercentageDecimal: '0.005', // 0.5%
|
|
345
345
|
quoteOrRate: 'quote',
|
|
346
346
|
};
|
|
347
347
|
const maybeTradeQuote = await (0, getCowSwapTradeQuote_1.getCowSwapTradeQuote)(input, MOCK_COWSWAP_CONFIG);
|
|
@@ -365,7 +365,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
365
365
|
affiliateBps: '0',
|
|
366
366
|
supportsEIP1559: false,
|
|
367
367
|
allowMultiHop: false,
|
|
368
|
-
slippageTolerancePercentageDecimal: '0.005',
|
|
368
|
+
slippageTolerancePercentageDecimal: '0.005', // 0.5%
|
|
369
369
|
quoteOrRate: 'quote',
|
|
370
370
|
};
|
|
371
371
|
mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
|
|
@@ -398,7 +398,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
398
398
|
affiliateBps: '0',
|
|
399
399
|
supportsEIP1559: false,
|
|
400
400
|
allowMultiHop: false,
|
|
401
|
-
slippageTolerancePercentageDecimal: '0.005',
|
|
401
|
+
slippageTolerancePercentageDecimal: '0.005', // 0.5%
|
|
402
402
|
quoteOrRate: 'quote',
|
|
403
403
|
};
|
|
404
404
|
mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
|
|
@@ -431,7 +431,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
431
431
|
affiliateBps: '0',
|
|
432
432
|
supportsEIP1559: false,
|
|
433
433
|
allowMultiHop: false,
|
|
434
|
-
slippageTolerancePercentageDecimal: '0.005',
|
|
434
|
+
slippageTolerancePercentageDecimal: '0.005', // 0.5%
|
|
435
435
|
quoteOrRate: 'quote',
|
|
436
436
|
};
|
|
437
437
|
mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
|
|
@@ -464,7 +464,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
464
464
|
affiliateBps: '0',
|
|
465
465
|
supportsEIP1559: false,
|
|
466
466
|
allowMultiHop: false,
|
|
467
|
-
slippageTolerancePercentageDecimal: '0.005',
|
|
467
|
+
slippageTolerancePercentageDecimal: '0.005', // 0.5%
|
|
468
468
|
quoteOrRate: 'quote',
|
|
469
469
|
};
|
|
470
470
|
mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
|
|
@@ -497,7 +497,7 @@ const expectedTradeQuoteSmallAmountWethToFox = {
|
|
|
497
497
|
affiliateBps: '0',
|
|
498
498
|
supportsEIP1559: false,
|
|
499
499
|
allowMultiHop: false,
|
|
500
|
-
slippageTolerancePercentageDecimal: '0.005',
|
|
500
|
+
slippageTolerancePercentageDecimal: '0.005', // 0.5%
|
|
501
501
|
quoteOrRate: 'quote',
|
|
502
502
|
};
|
|
503
503
|
mockedCowService.post.mockReturnValue(Promise.resolve((0, monads_1.Ok)({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCowSwapTradeRate =
|
|
3
|
+
exports.getCowSwapTradeRate = getCowSwapTradeRate;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const types_1 = require("@shapeshiftoss/types");
|
|
6
6
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
@@ -103,7 +103,7 @@ async function getCowSwapTradeRate(input, config) {
|
|
|
103
103
|
allowanceContract: constants_2.COW_SWAP_VAULT_RELAYER_ADDRESS,
|
|
104
104
|
rate,
|
|
105
105
|
feeData: {
|
|
106
|
-
networkFeeCryptoBaseUnit: '0',
|
|
106
|
+
networkFeeCryptoBaseUnit: '0', // no miner fee for CowSwap
|
|
107
107
|
protocolFees: {
|
|
108
108
|
[sellAsset.assetId]: {
|
|
109
109
|
amountCryptoBaseUnit: feeAmountInSellTokenCryptoBaseUnit,
|
|
@@ -133,4 +133,3 @@ async function getCowSwapTradeRate(input, config) {
|
|
|
133
133
|
};
|
|
134
134
|
return (0, monads_1.Ok)(quote);
|
|
135
135
|
}
|
|
136
|
-
exports.getCowSwapTradeRate = getCowSwapTradeRate;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from 'axios';
|
|
2
2
|
export declare const cowService: {
|
|
3
|
-
get: <T = any>(url: string, config?: AxiosRequestConfig<any>
|
|
4
|
-
post: <
|
|
5
|
-
delete: <
|
|
3
|
+
get: <T = any>(url: string, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
4
|
+
post: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
5
|
+
delete: <T = any>(url: string, data: any, config?: AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const debridgeService: {
|
|
2
|
-
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>
|
|
3
|
-
post: <
|
|
4
|
-
delete: <
|
|
2
|
+
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
3
|
+
post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
4
|
+
delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
5
5
|
};
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTrade =
|
|
6
|
+
exports.getTrade = getTrade;
|
|
7
7
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
8
8
|
const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
|
|
9
9
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
@@ -200,7 +200,6 @@ async function getTrade({ input, deps, }) {
|
|
|
200
200
|
};
|
|
201
201
|
return (0, monads_1.Ok)([tradeRate]);
|
|
202
202
|
}
|
|
203
|
-
exports.getTrade = getTrade;
|
|
204
203
|
function handleDebridgeError(error) {
|
|
205
204
|
if (!axios_1.default.isAxiosError(error.cause)) {
|
|
206
205
|
return (0, monads_1.Err)((0, utils_2.makeSwapErrorRight)({
|
|
@@ -8,5 +8,5 @@ export declare const getNearIntentsAsset: ({ nearNetwork, contractAddress, }: {
|
|
|
8
8
|
contractAddress: string;
|
|
9
9
|
}) => string;
|
|
10
10
|
export declare const assetToNearIntentsAsset: (asset: Asset) => Promise<string | null>;
|
|
11
|
-
export declare const mapNearIntentsStatus: (status: GetExecutionStatusResponse[
|
|
12
|
-
export declare const getNearIntentsStatusMessage: (status: GetExecutionStatusResponse[
|
|
11
|
+
export declare const mapNearIntentsStatus: (status: GetExecutionStatusResponse["status"]) => TxStatus;
|
|
12
|
+
export declare const getNearIntentsStatusMessage: (status: GetExecutionStatusResponse["status"]) => string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPortalsTradeQuote =
|
|
3
|
+
exports.getPortalsTradeQuote = getPortalsTradeQuote;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
|
|
6
6
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
@@ -227,4 +227,3 @@ async function getPortalsTradeQuote(input, assertGetEvmChainAdapter, swapperConf
|
|
|
227
227
|
}));
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
exports.getPortalsTradeQuote = getPortalsTradeQuote;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPortalsTradeRate =
|
|
3
|
+
exports.getPortalsTradeRate = getPortalsTradeRate;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
|
|
6
6
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
@@ -82,14 +82,14 @@ async function getPortalsTradeRate(input, assertGetEvmChainAdapter, swapperConfi
|
|
|
82
82
|
// Use full quote endpoint (not estimate) to get transaction data for Tenderly simulation
|
|
83
83
|
// Skip validation since this is just a rate quote
|
|
84
84
|
const quoteResponse = await (0, fetchPortalsTradeOrder_1.fetchPortalsTradeOrder)({
|
|
85
|
-
sender: RATE_DUMMY_ADDRESS,
|
|
85
|
+
sender: RATE_DUMMY_ADDRESS, // Dummy address for rates (no wallet yet)
|
|
86
86
|
inputToken,
|
|
87
87
|
outputToken,
|
|
88
88
|
inputAmount: sellAmountIncludingProtocolFeesCryptoBaseUnit,
|
|
89
89
|
slippageTolerancePercentage: userSlippageTolerancePercentageDecimalOrDefault,
|
|
90
90
|
partner: (0, helpers_1.getTreasuryAddressFromChainId)(chainId),
|
|
91
91
|
feePercentage: affiliateBpsPercentage,
|
|
92
|
-
validate: false,
|
|
92
|
+
validate: false, // Skip Portals' simulation validation
|
|
93
93
|
swapperConfig,
|
|
94
94
|
});
|
|
95
95
|
if (!quoteResponse.tx) {
|
|
@@ -195,4 +195,3 @@ async function getPortalsTradeRate(input, assertGetEvmChainAdapter, swapperConfi
|
|
|
195
195
|
}));
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
exports.getPortalsTradeRate = getPortalsTradeRate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ChainId } from '@shapeshiftoss/caip';
|
|
2
2
|
import type { PortalsSupportedChainId } from '../types';
|
|
3
|
-
export declare const isSupportedChainId: (chainId: ChainId) => chainId is
|
|
3
|
+
export declare const isSupportedChainId: (chainId: ChainId) => chainId is PortalsSupportedChainId;
|
|
4
4
|
export declare const getPortalsRouterAddressByChainId: (chainId: PortalsSupportedChainId) => string;
|
|
@@ -1,7 +1,45 @@
|
|
|
1
|
+
import { abstractChainId, arbitrumChainId, avalancheChainId, baseChainId, berachainChainId, blastChainId, bobChainId, bscChainId, btcChainId, celoChainId, cronosChainId, ethChainId, etherealChainId, flowEvmChainId, gnosisChainId, hemiChainId, hyperEvmChainId, inkChainId, katanaChainId, lineaChainId, mantleChainId, megaethChainId, modeChainId, monadChainId, optimismChainId, plasmaChainId, plumeChainId, polygonChainId, scrollChainId, seiChainId, solanaChainId, soneiumChainId, sonicChainId, storyChainId, tronChainId, unichainChainId, worldChainChainId, zkSyncEraChainId } from '@shapeshiftoss/caip';
|
|
1
2
|
import { TradeQuoteError } from '../../types';
|
|
2
3
|
import { RelayErrorCode } from './utils/types';
|
|
3
4
|
export declare const chainIdToRelayChainId: {
|
|
4
|
-
[
|
|
5
|
+
[btcChainId]: number;
|
|
6
|
+
[ethChainId]: 1;
|
|
7
|
+
[arbitrumChainId]: 42161;
|
|
8
|
+
[baseChainId]: 8453;
|
|
9
|
+
[optimismChainId]: 10;
|
|
10
|
+
[polygonChainId]: 137;
|
|
11
|
+
[solanaChainId]: number;
|
|
12
|
+
[gnosisChainId]: 100;
|
|
13
|
+
[avalancheChainId]: 43114;
|
|
14
|
+
[bscChainId]: 56;
|
|
15
|
+
[tronChainId]: number;
|
|
16
|
+
[monadChainId]: 143;
|
|
17
|
+
[hyperEvmChainId]: 999;
|
|
18
|
+
[mantleChainId]: 5000;
|
|
19
|
+
[inkChainId]: 57073;
|
|
20
|
+
[megaethChainId]: number;
|
|
21
|
+
[plasmaChainId]: 9745;
|
|
22
|
+
[katanaChainId]: 747474;
|
|
23
|
+
[etherealChainId]: number;
|
|
24
|
+
[celoChainId]: 42220;
|
|
25
|
+
[flowEvmChainId]: 747;
|
|
26
|
+
[plumeChainId]: 98866;
|
|
27
|
+
[storyChainId]: 1514;
|
|
28
|
+
[zkSyncEraChainId]: 324;
|
|
29
|
+
[blastChainId]: 81457;
|
|
30
|
+
[worldChainChainId]: 480;
|
|
31
|
+
[hemiChainId]: 43111;
|
|
32
|
+
[lineaChainId]: 59144;
|
|
33
|
+
[berachainChainId]: 80094;
|
|
34
|
+
[scrollChainId]: 534352;
|
|
35
|
+
[cronosChainId]: 25;
|
|
36
|
+
[sonicChainId]: 146;
|
|
37
|
+
[unichainChainId]: 130;
|
|
38
|
+
[bobChainId]: 60808;
|
|
39
|
+
[modeChainId]: 34443;
|
|
40
|
+
[soneiumChainId]: 1868;
|
|
41
|
+
[seiChainId]: 1329;
|
|
42
|
+
[abstractChainId]: number;
|
|
5
43
|
};
|
|
6
44
|
export declare enum RelayStatusMessage {
|
|
7
45
|
WaitingForDeposit = "Waiting for deposit...",
|
|
@@ -2,4 +2,4 @@ import type { Result } from '@sniptt/monads';
|
|
|
2
2
|
import type { AxiosResponse } from 'axios';
|
|
3
3
|
import type { SwapErrorRight, SwapperConfig } from '../../../types';
|
|
4
4
|
import type { RelayFetchQuoteParams, RelayQuote } from './types';
|
|
5
|
-
export declare const fetchRelayTrade: <T extends "
|
|
5
|
+
export declare const fetchRelayTrade: <T extends "quote" | "rate">(params: RelayFetchQuoteParams<T>, config: SwapperConfig) => Promise<Result<AxiosResponse<RelayQuote, any>, SwapErrorRight>>;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.getRelayPsbtRelayer = void 0;
|
|
27
37
|
const bitcoin = __importStar(require("@shapeshiftoss/bitcoinjs-lib"));
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTrade =
|
|
6
|
+
exports.getTrade = getTrade;
|
|
7
7
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
8
8
|
const chain_adapters_1 = require("@shapeshiftoss/chain-adapters");
|
|
9
9
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
@@ -575,4 +575,3 @@ async function getTrade({ input, deps, relayChainMap, }) {
|
|
|
575
575
|
};
|
|
576
576
|
return (0, monads_1.Ok)([tradeRate]);
|
|
577
577
|
}
|
|
578
|
-
exports.getTrade = getTrade;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const relayService: {
|
|
2
|
-
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>
|
|
3
|
-
post: <
|
|
4
|
-
delete: <
|
|
2
|
+
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
3
|
+
post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
4
|
+
delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getQuoteOrRate =
|
|
3
|
+
exports.getQuoteOrRate = getQuoteOrRate;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const utils_1 = require("@shapeshiftoss/utils");
|
|
6
6
|
const monads_1 = require("@sniptt/monads");
|
|
@@ -211,4 +211,3 @@ async function getQuoteOrRate(input, deps) {
|
|
|
211
211
|
}));
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
exports.getQuoteOrRate = getQuoteOrRate;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AssetId } from '@shapeshiftoss/caip';
|
|
2
|
+
import { tronChainId } from '@shapeshiftoss/caip';
|
|
2
3
|
export declare const isSupportedChainId: (chainId: string) => boolean;
|
|
3
4
|
export declare const assetIdToTronToken: (assetId: AssetId) => string;
|
|
4
|
-
export declare const isTronChainId: (chainId: string) => chainId is
|
|
5
|
+
export declare const isTronChainId: (chainId: string) => chainId is typeof tronChainId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const sunioServiceFactory: () => {
|
|
2
|
-
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>
|
|
3
|
-
post: <
|
|
4
|
-
delete: <
|
|
2
|
+
get: <T = any>(url: string, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
3
|
+
post: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
4
|
+
delete: <T = any>(url: string, data: any, config?: import("axios").AxiosRequestConfig<any>) => Promise<import("@sniptt/monads").Result<import("axios").AxiosResponse<T>, import("../../..").SwapErrorRight>>;
|
|
5
5
|
};
|
|
6
6
|
export type SunioService = ReturnType<typeof sunioServiceFactory>;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.getL1ToLongtailQuote = void 0;
|
|
27
37
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
@@ -127,7 +137,7 @@ const getL1ToLongtailQuote = async (input, deps, streamingInterval, swapperName)
|
|
|
127
137
|
// This is wrong, we should get the get the value before fees or display ETH value received after the thorchain bridge
|
|
128
138
|
buyAmountBeforeFeesCryptoBaseUnit: quotedAmountOut.toString(),
|
|
129
139
|
allowanceContract: contracts_1.TS_AGGREGATOR_TOKEN_TRANSFER_PROXY_CONTRACT_MAINNET,
|
|
130
|
-
})),
|
|
140
|
+
})), // assuming multi-hop quote steps here since we're mapping over quote steps,
|
|
131
141
|
isLongtail: true,
|
|
132
142
|
longtailData: {
|
|
133
143
|
L1ToLongtailExpectedAmountOut: quotedAmountOut.toString(),
|