@paraspell/sdk-core 8.0.1 → 8.0.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/index.cjs +31 -18
- package/dist/index.d.ts +5 -3
- package/dist/index.mjs +31 -19
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18994,7 +18994,7 @@ var getDestinationMultilocation = function getDestinationMultilocation(api, addr
|
|
|
18994
18994
|
var acc = "0x".concat(accountType).concat(addressHex, "00");
|
|
18995
18995
|
var _getNodeConfig = getNodeConfig(destination),
|
|
18996
18996
|
paraId = _getNodeConfig.paraId;
|
|
18997
|
-
return [1, ["0x0000000".concat(paraId.toString(16)), acc]];
|
|
18997
|
+
return [1, paraId ? ["0x0000000".concat(paraId.toString(16)), acc] : [acc]];
|
|
18998
18998
|
};
|
|
18999
18999
|
|
|
19000
19000
|
var abi = [
|
|
@@ -19106,6 +19106,18 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19106
19106
|
while (1) switch (_context.prev = _context.next) {
|
|
19107
19107
|
case 0:
|
|
19108
19108
|
api = _ref.api, from = _ref.from, to = _ref.to, signer = _ref.signer, address = _ref.address, currency = _ref.currency;
|
|
19109
|
+
if (!('multiasset' in currency)) {
|
|
19110
|
+
_context.next = 3;
|
|
19111
|
+
break;
|
|
19112
|
+
}
|
|
19113
|
+
throw new Error('Multiassets syntax is not supported for Evm transfers');
|
|
19114
|
+
case 3:
|
|
19115
|
+
if (!('multilocation' in currency && isOverrideMultiLocationSpecifier(currency.multilocation))) {
|
|
19116
|
+
_context.next = 5;
|
|
19117
|
+
break;
|
|
19118
|
+
}
|
|
19119
|
+
throw new Error('Override multilocation is not supported for Evm transfers');
|
|
19120
|
+
case 5:
|
|
19109
19121
|
contract = isEthersSigner(signer) ? new ethers.Contract(CONTRACT_ADDRESS, abi, signer) : viem.getContract({
|
|
19110
19122
|
abi: abi,
|
|
19111
19123
|
address: CONTRACT_ADDRESS,
|
|
@@ -19119,27 +19131,27 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19119
19131
|
});
|
|
19120
19132
|
foundAsset = getAssetBySymbolOrId(from, currency, to);
|
|
19121
19133
|
if (!(foundAsset === null)) {
|
|
19122
|
-
_context.next =
|
|
19134
|
+
_context.next = 9;
|
|
19123
19135
|
break;
|
|
19124
19136
|
}
|
|
19125
19137
|
throw new InvalidCurrencyError("Origin node ".concat(from, " does not support currency ").concat(JSON.stringify(currency), "."));
|
|
19126
|
-
case
|
|
19138
|
+
case 9:
|
|
19127
19139
|
if (!(foundAsset.symbol === getNativeAssetSymbol(from))) {
|
|
19128
|
-
_context.next =
|
|
19140
|
+
_context.next = 13;
|
|
19129
19141
|
break;
|
|
19130
19142
|
}
|
|
19131
19143
|
asset = NATIVE_ASSET_ID;
|
|
19132
|
-
_context.next =
|
|
19144
|
+
_context.next = 16;
|
|
19133
19145
|
break;
|
|
19134
|
-
case
|
|
19146
|
+
case 13:
|
|
19135
19147
|
if (!(!isForeignAsset(foundAsset) || !foundAsset.assetId)) {
|
|
19136
|
-
_context.next =
|
|
19148
|
+
_context.next = 15;
|
|
19137
19149
|
break;
|
|
19138
19150
|
}
|
|
19139
19151
|
throw new InvalidCurrencyError('Currency must be a foreign asset with valid assetId');
|
|
19140
|
-
case
|
|
19152
|
+
case 15:
|
|
19141
19153
|
asset = formatAssetIdToERC20(foundAsset.assetId);
|
|
19142
|
-
case
|
|
19154
|
+
case 16:
|
|
19143
19155
|
destMultiLocation = getDestinationMultilocation(api, address, to);
|
|
19144
19156
|
weight = U_64_MAX; // Partially inspired by Moonbeam XCM-SDK
|
|
19145
19157
|
// https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/sdk/src/contract/contracts/Xtokens/Xtokens.ts#L53
|
|
@@ -19155,26 +19167,26 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19155
19167
|
symbol: 'xcUSDT'
|
|
19156
19168
|
}, to);
|
|
19157
19169
|
if (!useMultiAssets) {
|
|
19158
|
-
_context.next =
|
|
19170
|
+
_context.next = 28;
|
|
19159
19171
|
break;
|
|
19160
19172
|
}
|
|
19161
|
-
_context.next =
|
|
19173
|
+
_context.next = 25;
|
|
19162
19174
|
return createTx('transferMultiCurrencies', [[[asset, currency.amount], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !== void 0 ? _usdtAsset$assetId : ''), '200000']], 1,
|
|
19163
19175
|
// index of the fee asset
|
|
19164
19176
|
destMultiLocation, weight]);
|
|
19165
|
-
case
|
|
19177
|
+
case 25:
|
|
19166
19178
|
_context.t0 = _context.sent;
|
|
19167
|
-
_context.next =
|
|
19179
|
+
_context.next = 31;
|
|
19168
19180
|
break;
|
|
19169
|
-
case
|
|
19170
|
-
_context.next =
|
|
19181
|
+
case 28:
|
|
19182
|
+
_context.next = 30;
|
|
19171
19183
|
return createTx('transfer', [asset, currency.amount, destMultiLocation, weight]);
|
|
19172
|
-
case
|
|
19184
|
+
case 30:
|
|
19173
19185
|
_context.t0 = _context.sent;
|
|
19174
|
-
case
|
|
19186
|
+
case 31:
|
|
19175
19187
|
tx = _context.t0;
|
|
19176
19188
|
return _context.abrupt("return", _typeof(tx) === 'object' ? tx.hash : tx);
|
|
19177
|
-
case
|
|
19189
|
+
case 33:
|
|
19178
19190
|
case "end":
|
|
19179
19191
|
return _context.stop();
|
|
19180
19192
|
}
|
|
@@ -19250,6 +19262,7 @@ exports.getTransferableAmount = getTransferableAmount;
|
|
|
19250
19262
|
exports.hasSupportForAsset = hasSupportForAsset;
|
|
19251
19263
|
exports.isForeignAsset = isForeignAsset;
|
|
19252
19264
|
exports.isNodeEvm = isNodeEvm;
|
|
19265
|
+
exports.isOverrideMultiLocationSpecifier = isOverrideMultiLocationSpecifier;
|
|
19253
19266
|
exports.isRelayChain = isRelayChain;
|
|
19254
19267
|
exports.resolveModuleError = resolveModuleError;
|
|
19255
19268
|
exports.send = send;
|
package/dist/index.d.ts
CHANGED
|
@@ -1000,11 +1000,11 @@ type TEvmBuilderOptionsBase = {
|
|
|
1000
1000
|
/**
|
|
1001
1001
|
* The destination node on Polkadot network.
|
|
1002
1002
|
*/
|
|
1003
|
-
to:
|
|
1003
|
+
to: TNodeDotKsmWithRelayChains;
|
|
1004
1004
|
/**
|
|
1005
1005
|
* The currency to transfer. Symbol or ID.
|
|
1006
1006
|
*/
|
|
1007
|
-
currency:
|
|
1007
|
+
currency: TCurrencyInputWithAmount;
|
|
1008
1008
|
/**
|
|
1009
1009
|
* The Polkadot destination address.
|
|
1010
1010
|
*/
|
|
@@ -1594,6 +1594,8 @@ declare const computeFeeFromDryRun: (dryRun: any, node: TNodeDotKsmWithRelayChai
|
|
|
1594
1594
|
|
|
1595
1595
|
declare const computeFeeFromDryRunPjs: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
|
|
1596
1596
|
|
|
1597
|
+
declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiLocationValueWithOverride) => multiLocationSpecifier is TOverrideMultiLocationSpecifier;
|
|
1598
|
+
|
|
1597
1599
|
/**
|
|
1598
1600
|
* Determines the relay chain for a given node.
|
|
1599
1601
|
*
|
|
@@ -1719,4 +1721,4 @@ declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
|
1719
1721
|
*/
|
|
1720
1722
|
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1721
1723
|
|
|
1722
|
-
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, GeneralBuilder, type IAccountBuilder, type IAddToBatchBuilder, type IAddressBuilder, type ICurrencyBuilder, type IFinalBuilder, type IFinalBuilderWithOptions, type IFromBuilder, type IFungibleBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IToBuilder, type IVersionBuilder, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyCoreV1WithAmount, type TCurrencyCoreWithFee, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationHeader, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isRelayChain, resolveModuleError, send, transferMoonbeamEvm, transferRelayToPara };
|
|
1724
|
+
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, GeneralBuilder, type IAccountBuilder, type IAddToBatchBuilder, type IAddressBuilder, type ICurrencyBuilder, type IFinalBuilder, type IFinalBuilderWithOptions, type IFromBuilder, type IFungibleBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IToBuilder, type IVersionBuilder, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyCoreV1WithAmount, type TCurrencyCoreWithFee, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationHeader, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, resolveModuleError, send, transferMoonbeamEvm, transferRelayToPara };
|
package/dist/index.mjs
CHANGED
|
@@ -18992,7 +18992,7 @@ var getDestinationMultilocation = function getDestinationMultilocation(api, addr
|
|
|
18992
18992
|
var acc = "0x".concat(accountType).concat(addressHex, "00");
|
|
18993
18993
|
var _getNodeConfig = getNodeConfig(destination),
|
|
18994
18994
|
paraId = _getNodeConfig.paraId;
|
|
18995
|
-
return [1, ["0x0000000".concat(paraId.toString(16)), acc]];
|
|
18995
|
+
return [1, paraId ? ["0x0000000".concat(paraId.toString(16)), acc] : [acc]];
|
|
18996
18996
|
};
|
|
18997
18997
|
|
|
18998
18998
|
var abi = [
|
|
@@ -19104,6 +19104,18 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19104
19104
|
while (1) switch (_context.prev = _context.next) {
|
|
19105
19105
|
case 0:
|
|
19106
19106
|
api = _ref.api, from = _ref.from, to = _ref.to, signer = _ref.signer, address = _ref.address, currency = _ref.currency;
|
|
19107
|
+
if (!('multiasset' in currency)) {
|
|
19108
|
+
_context.next = 3;
|
|
19109
|
+
break;
|
|
19110
|
+
}
|
|
19111
|
+
throw new Error('Multiassets syntax is not supported for Evm transfers');
|
|
19112
|
+
case 3:
|
|
19113
|
+
if (!('multilocation' in currency && isOverrideMultiLocationSpecifier(currency.multilocation))) {
|
|
19114
|
+
_context.next = 5;
|
|
19115
|
+
break;
|
|
19116
|
+
}
|
|
19117
|
+
throw new Error('Override multilocation is not supported for Evm transfers');
|
|
19118
|
+
case 5:
|
|
19107
19119
|
contract = isEthersSigner(signer) ? new Contract(CONTRACT_ADDRESS, abi, signer) : getContract({
|
|
19108
19120
|
abi: abi,
|
|
19109
19121
|
address: CONTRACT_ADDRESS,
|
|
@@ -19117,27 +19129,27 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19117
19129
|
});
|
|
19118
19130
|
foundAsset = getAssetBySymbolOrId(from, currency, to);
|
|
19119
19131
|
if (!(foundAsset === null)) {
|
|
19120
|
-
_context.next =
|
|
19132
|
+
_context.next = 9;
|
|
19121
19133
|
break;
|
|
19122
19134
|
}
|
|
19123
19135
|
throw new InvalidCurrencyError("Origin node ".concat(from, " does not support currency ").concat(JSON.stringify(currency), "."));
|
|
19124
|
-
case
|
|
19136
|
+
case 9:
|
|
19125
19137
|
if (!(foundAsset.symbol === getNativeAssetSymbol(from))) {
|
|
19126
|
-
_context.next =
|
|
19138
|
+
_context.next = 13;
|
|
19127
19139
|
break;
|
|
19128
19140
|
}
|
|
19129
19141
|
asset = NATIVE_ASSET_ID;
|
|
19130
|
-
_context.next =
|
|
19142
|
+
_context.next = 16;
|
|
19131
19143
|
break;
|
|
19132
|
-
case
|
|
19144
|
+
case 13:
|
|
19133
19145
|
if (!(!isForeignAsset(foundAsset) || !foundAsset.assetId)) {
|
|
19134
|
-
_context.next =
|
|
19146
|
+
_context.next = 15;
|
|
19135
19147
|
break;
|
|
19136
19148
|
}
|
|
19137
19149
|
throw new InvalidCurrencyError('Currency must be a foreign asset with valid assetId');
|
|
19138
|
-
case
|
|
19150
|
+
case 15:
|
|
19139
19151
|
asset = formatAssetIdToERC20(foundAsset.assetId);
|
|
19140
|
-
case
|
|
19152
|
+
case 16:
|
|
19141
19153
|
destMultiLocation = getDestinationMultilocation(api, address, to);
|
|
19142
19154
|
weight = U_64_MAX; // Partially inspired by Moonbeam XCM-SDK
|
|
19143
19155
|
// https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/sdk/src/contract/contracts/Xtokens/Xtokens.ts#L53
|
|
@@ -19153,26 +19165,26 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19153
19165
|
symbol: 'xcUSDT'
|
|
19154
19166
|
}, to);
|
|
19155
19167
|
if (!useMultiAssets) {
|
|
19156
|
-
_context.next =
|
|
19168
|
+
_context.next = 28;
|
|
19157
19169
|
break;
|
|
19158
19170
|
}
|
|
19159
|
-
_context.next =
|
|
19171
|
+
_context.next = 25;
|
|
19160
19172
|
return createTx('transferMultiCurrencies', [[[asset, currency.amount], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !== void 0 ? _usdtAsset$assetId : ''), '200000']], 1,
|
|
19161
19173
|
// index of the fee asset
|
|
19162
19174
|
destMultiLocation, weight]);
|
|
19163
|
-
case
|
|
19175
|
+
case 25:
|
|
19164
19176
|
_context.t0 = _context.sent;
|
|
19165
|
-
_context.next =
|
|
19177
|
+
_context.next = 31;
|
|
19166
19178
|
break;
|
|
19167
|
-
case
|
|
19168
|
-
_context.next =
|
|
19179
|
+
case 28:
|
|
19180
|
+
_context.next = 30;
|
|
19169
19181
|
return createTx('transfer', [asset, currency.amount, destMultiLocation, weight]);
|
|
19170
|
-
case
|
|
19182
|
+
case 30:
|
|
19171
19183
|
_context.t0 = _context.sent;
|
|
19172
|
-
case
|
|
19184
|
+
case 31:
|
|
19173
19185
|
tx = _context.t0;
|
|
19174
19186
|
return _context.abrupt("return", _typeof(tx) === 'object' ? tx.hash : tx);
|
|
19175
|
-
case
|
|
19187
|
+
case 33:
|
|
19176
19188
|
case "end":
|
|
19177
19189
|
return _context.stop();
|
|
19178
19190
|
}
|
|
@@ -19183,4 +19195,4 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
19183
19195
|
};
|
|
19184
19196
|
}();
|
|
19185
19197
|
|
|
19186
|
-
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, _deepEqual as deepEqual, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isRelayChain, resolveModuleError, send, transferMoonbeamEvm, transferRelayToPara };
|
|
19198
|
+
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, _deepEqual as deepEqual, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, resolveModuleError, send, transferMoonbeamEvm, transferRelayToPara };
|