@paraspell/sdk 1.1.13 → 1.1.14
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 +54 -16
- package/dist/index.d.ts +9 -10
- package/dist/index.mjs +55 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5,12 +5,6 @@ var ethers = require('ethers');
|
|
|
5
5
|
var endpoints = require('@polkadot/apps-config/endpoints');
|
|
6
6
|
|
|
7
7
|
// derrived from https://github.com/kodadot/packages/blob/main/minimark/src/common/types.ts
|
|
8
|
-
exports.TType = void 0;
|
|
9
|
-
(function (TType) {
|
|
10
|
-
TType["CONSTS"] = "consts";
|
|
11
|
-
TType["QUERY"] = "query";
|
|
12
|
-
TType["TX"] = "tx";
|
|
13
|
-
})(exports.TType || (exports.TType = {}));
|
|
14
8
|
exports.Version = void 0;
|
|
15
9
|
(function (Version) {
|
|
16
10
|
Version[Version["V1"] = 0] = "V1";
|
|
@@ -3771,7 +3765,6 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
|
3771
3765
|
var module = lowercaseFirstLetter(pallet.toString());
|
|
3772
3766
|
if (serializedApiCallEnabled) {
|
|
3773
3767
|
return {
|
|
3774
|
-
type: exports.TType.TX,
|
|
3775
3768
|
module: module,
|
|
3776
3769
|
section: 'transfer',
|
|
3777
3770
|
parameters: [currencySelection, amount, addressSelection, fees]
|
|
@@ -4509,6 +4502,7 @@ var Karura$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4509
4502
|
return Karura;
|
|
4510
4503
|
}(ParachainNode);
|
|
4511
4504
|
|
|
4505
|
+
// Contains basic structure of polkadotXCM call
|
|
4512
4506
|
var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
4513
4507
|
function PolkadotXCMTransferImpl() {
|
|
4514
4508
|
_classCallCheck(this, PolkadotXCMTransferImpl);
|
|
@@ -4524,7 +4518,6 @@ var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
|
4524
4518
|
var fees = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
4525
4519
|
if (serializedApiCallEnabled) {
|
|
4526
4520
|
return {
|
|
4527
|
-
type: exports.TType.TX,
|
|
4528
4521
|
module: 'polkadotXcm',
|
|
4529
4522
|
section: method,
|
|
4530
4523
|
parameters: [header, addressSelection, currencySelection, 0].concat(_toConsumableArray(fees ? [fees] : []))
|
|
@@ -5226,6 +5219,13 @@ function getNodeEndpointOption(node) {
|
|
|
5226
5219
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
5227
5220
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
5228
5221
|
};
|
|
5222
|
+
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref2) {
|
|
5223
|
+
var _api$tx$module;
|
|
5224
|
+
var module = _ref2.module,
|
|
5225
|
+
section = _ref2.section,
|
|
5226
|
+
parameters = _ref2.parameters;
|
|
5227
|
+
return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
|
|
5228
|
+
};
|
|
5229
5229
|
|
|
5230
5230
|
var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, symbolOrId) {
|
|
5231
5231
|
var _getAssetsObject = getAssetsObject(node),
|
|
@@ -5285,25 +5285,59 @@ var sendSerializedApiCall = function sendSerializedApiCall(api, origin, currency
|
|
|
5285
5285
|
function send(api, origin, currencySymbolOrId, amount, to, destination) {
|
|
5286
5286
|
return sendCommon(api, origin, currencySymbolOrId, amount, to, destination);
|
|
5287
5287
|
}
|
|
5288
|
-
|
|
5288
|
+
// TODO: Refactor this function
|
|
5289
|
+
var transferRelayToParaCommon = function transferRelayToParaCommon(api, destination, amount, to) {
|
|
5290
|
+
var serializedApiCallEnabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
5289
5291
|
var paraId = getParaId(destination);
|
|
5290
5292
|
if (destination === 'Statemint' || destination === 'Statemine') {
|
|
5291
5293
|
// Same for Statemint, Statemine and Encoiter
|
|
5292
|
-
|
|
5294
|
+
var _serializedApiCall = {
|
|
5295
|
+
module: 'xcmPallet',
|
|
5296
|
+
section: 'limitedTeleportAssets',
|
|
5297
|
+
parameters: [createHeaderPolkadotXCM('RelayToPara', exports.Version.V3, paraId), handleAddress('RelayToPara', '', api, to, exports.Version.V3, paraId), createCurrencySpecification(amount, 'RelayToPara', exports.Version.V3, destination), 0, 'Unlimited']
|
|
5298
|
+
};
|
|
5299
|
+
if (serializedApiCallEnabled) {
|
|
5300
|
+
return _serializedApiCall;
|
|
5301
|
+
}
|
|
5302
|
+
return callPolkadotJsTxFunction(api, _serializedApiCall);
|
|
5293
5303
|
} else if (destination === 'Encointer') {
|
|
5294
|
-
|
|
5304
|
+
var _serializedApiCall2 = {
|
|
5305
|
+
module: 'xcmPallet',
|
|
5306
|
+
section: 'limitedTeleportAssets',
|
|
5307
|
+
parameters: [createHeaderPolkadotXCM('RelayToPara', exports.Version.V1, paraId), handleAddress('RelayToPara', '', api, to, exports.Version.V1, paraId), createCurrencySpecification(amount, 'RelayToPara', exports.Version.V1, destination), 0, 'Unlimited']
|
|
5308
|
+
};
|
|
5309
|
+
if (serializedApiCallEnabled) {
|
|
5310
|
+
return _serializedApiCall2;
|
|
5311
|
+
}
|
|
5312
|
+
return callPolkadotJsTxFunction(api, _serializedApiCall2);
|
|
5295
5313
|
} else if (destination === 'Darwinia' || destination === 'Crab') {
|
|
5296
5314
|
// Do not do anything because Darwinia and Crab does not have DOT and KSM registered
|
|
5297
5315
|
throw new NodeNotSupportedError('These nodes do not support XCM transfers from Relay / to Relay chain.');
|
|
5298
5316
|
}
|
|
5299
|
-
|
|
5317
|
+
var serializedApiCall = {
|
|
5318
|
+
module: 'xcmPallet',
|
|
5319
|
+
section: 'reserveTransferAssets',
|
|
5320
|
+
parameters: [createHeaderPolkadotXCM('RelayToPara', exports.Version.V3, paraId), handleAddress('RelayToPara', '', api, to, exports.Version.V3, paraId), createCurrencySpecification(amount, 'RelayToPara', exports.Version.V3, destination), 0]
|
|
5321
|
+
};
|
|
5322
|
+
if (serializedApiCallEnabled) {
|
|
5323
|
+
return serializedApiCall;
|
|
5324
|
+
}
|
|
5325
|
+
return callPolkadotJsTxFunction(api, serializedApiCall);
|
|
5326
|
+
};
|
|
5327
|
+
function transferRelayToPara(api, destination, amount, to) {
|
|
5328
|
+
return transferRelayToParaCommon(api, destination, amount, to);
|
|
5300
5329
|
}
|
|
5330
|
+
var transferRelayToParaSerializedApiCall = function transferRelayToParaSerializedApiCall(api, destination, amount, to) {
|
|
5331
|
+
return transferRelayToParaCommon(api, destination, amount, to, true);
|
|
5332
|
+
};
|
|
5301
5333
|
|
|
5302
5334
|
var index$3 = /*#__PURE__*/Object.freeze({
|
|
5303
5335
|
__proto__: null,
|
|
5304
5336
|
send: send,
|
|
5305
5337
|
sendSerializedApiCall: sendSerializedApiCall,
|
|
5306
|
-
transferRelayToPara: transferRelayToPara
|
|
5338
|
+
transferRelayToPara: transferRelayToPara,
|
|
5339
|
+
transferRelayToParaCommon: transferRelayToParaCommon,
|
|
5340
|
+
transferRelayToParaSerializedApiCall: transferRelayToParaSerializedApiCall
|
|
5307
5341
|
});
|
|
5308
5342
|
|
|
5309
5343
|
//Contains XYK Decentralized exchange functions implemented in collaboration with Basilisk team
|
|
@@ -5575,6 +5609,11 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
5575
5609
|
value: function build() {
|
|
5576
5610
|
return transferRelayToPara(this.api, this.to, this._amount, this._address);
|
|
5577
5611
|
}
|
|
5612
|
+
}, {
|
|
5613
|
+
key: "buildSerializedApiCall",
|
|
5614
|
+
value: function buildSerializedApiCall() {
|
|
5615
|
+
return transferRelayToParaSerializedApiCall(this.api, this.to, this._amount, this._address);
|
|
5616
|
+
}
|
|
5578
5617
|
}], [{
|
|
5579
5618
|
key: "create",
|
|
5580
5619
|
value: function create(api, to) {
|
|
@@ -5735,11 +5774,10 @@ var ToGeneralBuilder = /*#__PURE__*/function () {
|
|
|
5735
5774
|
return ToGeneralBuilder;
|
|
5736
5775
|
}();
|
|
5737
5776
|
var FromGeneralBuilder = /*#__PURE__*/function () {
|
|
5738
|
-
function FromGeneralBuilder(api, from
|
|
5777
|
+
function FromGeneralBuilder(api, from) {
|
|
5739
5778
|
_classCallCheck(this, FromGeneralBuilder);
|
|
5740
5779
|
this.api = api;
|
|
5741
5780
|
this.from = from;
|
|
5742
|
-
this.version = version;
|
|
5743
5781
|
}
|
|
5744
5782
|
_createClass(FromGeneralBuilder, [{
|
|
5745
5783
|
key: "to",
|
|
@@ -5767,7 +5805,7 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
5767
5805
|
_createClass(GeneralBuilder, [{
|
|
5768
5806
|
key: "from",
|
|
5769
5807
|
value: function from(node) {
|
|
5770
|
-
return new FromGeneralBuilder(this.api, node
|
|
5808
|
+
return new FromGeneralBuilder(this.api, node);
|
|
5771
5809
|
}
|
|
5772
5810
|
}, {
|
|
5773
5811
|
key: "to",
|
package/dist/index.d.ts
CHANGED
|
@@ -35,13 +35,7 @@ type TPalletMap = {
|
|
|
35
35
|
supportedPallets: TPallet[];
|
|
36
36
|
};
|
|
37
37
|
type TPalletJsonMap = Record<TNode, TPalletMap>;
|
|
38
|
-
declare enum TType {
|
|
39
|
-
CONSTS = "consts",
|
|
40
|
-
QUERY = "query",
|
|
41
|
-
TX = "tx"
|
|
42
|
-
}
|
|
43
38
|
type TSerializedApiCall = {
|
|
44
|
-
type: TType;
|
|
45
39
|
module: string;
|
|
46
40
|
section: string;
|
|
47
41
|
parameters: any[];
|
|
@@ -76,16 +70,22 @@ declare enum Version {
|
|
|
76
70
|
|
|
77
71
|
declare const sendSerializedApiCall: (api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: any, to: string, destination?: TNode) => TSerializedApiCall;
|
|
78
72
|
declare function send(api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: any, to: string, destination?: TNode): Extrinsic;
|
|
73
|
+
declare const transferRelayToParaCommon: (api: ApiPromise, destination: TNode, amount: any, to: string, serializedApiCallEnabled?: boolean) => Extrinsic | TSerializedApiCall | never;
|
|
79
74
|
declare function transferRelayToPara(api: ApiPromise, destination: TNode, amount: any, to: string): Extrinsic | never;
|
|
75
|
+
declare const transferRelayToParaSerializedApiCall: (api: ApiPromise, destination: TNode, amount: any, to: string) => TSerializedApiCall;
|
|
80
76
|
|
|
81
77
|
declare const index$4_send: typeof send;
|
|
82
78
|
declare const index$4_sendSerializedApiCall: typeof sendSerializedApiCall;
|
|
83
79
|
declare const index$4_transferRelayToPara: typeof transferRelayToPara;
|
|
80
|
+
declare const index$4_transferRelayToParaCommon: typeof transferRelayToParaCommon;
|
|
81
|
+
declare const index$4_transferRelayToParaSerializedApiCall: typeof transferRelayToParaSerializedApiCall;
|
|
84
82
|
declare namespace index$4 {
|
|
85
83
|
export {
|
|
86
84
|
index$4_send as send,
|
|
87
85
|
index$4_sendSerializedApiCall as sendSerializedApiCall,
|
|
88
86
|
index$4_transferRelayToPara as transferRelayToPara,
|
|
87
|
+
index$4_transferRelayToParaCommon as transferRelayToParaCommon,
|
|
88
|
+
index$4_transferRelayToParaSerializedApiCall as transferRelayToParaSerializedApiCall,
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -249,6 +249,7 @@ interface AssetAAddLiquidityBuilder {
|
|
|
249
249
|
|
|
250
250
|
interface FinalRelayToParaBuilder$1 {
|
|
251
251
|
build(): Extrinsic | never;
|
|
252
|
+
buildSerializedApiCall(): TSerializedApiCall;
|
|
252
253
|
}
|
|
253
254
|
interface AddressRelayToParaBuilder {
|
|
254
255
|
address(address: string): FinalRelayToParaBuilder$1;
|
|
@@ -299,15 +300,13 @@ declare class ToGeneralBuilder {
|
|
|
299
300
|
declare class FromGeneralBuilder {
|
|
300
301
|
private api;
|
|
301
302
|
private from;
|
|
302
|
-
|
|
303
|
-
constructor(api: ApiPromise, from: TNode, version: number);
|
|
303
|
+
constructor(api: ApiPromise, from: TNode);
|
|
304
304
|
to(node: TNode): ToGeneralBuilder;
|
|
305
305
|
currency(currency: string | number | bigint): AmountSendBuilder;
|
|
306
306
|
closeChannel(): InboundCloseChannelBuilder;
|
|
307
307
|
}
|
|
308
308
|
declare class GeneralBuilder {
|
|
309
309
|
private api;
|
|
310
|
-
private version;
|
|
311
310
|
constructor(api: ApiPromise);
|
|
312
311
|
from(node: TNode): FromGeneralBuilder;
|
|
313
312
|
to(node: TNode): AmountRelayToParaBuilder;
|
|
@@ -340,4 +339,4 @@ declare class ScenarioNotSupportedError extends Error {
|
|
|
340
339
|
constructor(node: TNode, scenario: TScenario);
|
|
341
340
|
}
|
|
342
341
|
|
|
343
|
-
export { Bool, Builder, Extrinsic, ExtrinsicFunction, IPolkadotXCMTransfer, IXTokensTransfer, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, TSerializedApiCall,
|
|
342
|
+
export { Bool, Builder, Extrinsic, ExtrinsicFunction, IPolkadotXCMTransfer, IXTokensTransfer, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, TSerializedApiCall, UpdateFunction, Version, XTokensTransferInput, index as assets, index$1 as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNodeEndpointOption, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };
|
package/dist/index.mjs
CHANGED
|
@@ -3,12 +3,6 @@ import { ethers } from 'ethers';
|
|
|
3
3
|
import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoints';
|
|
4
4
|
|
|
5
5
|
// derrived from https://github.com/kodadot/packages/blob/main/minimark/src/common/types.ts
|
|
6
|
-
var TType;
|
|
7
|
-
(function (TType) {
|
|
8
|
-
TType["CONSTS"] = "consts";
|
|
9
|
-
TType["QUERY"] = "query";
|
|
10
|
-
TType["TX"] = "tx";
|
|
11
|
-
})(TType || (TType = {}));
|
|
12
6
|
var Version;
|
|
13
7
|
(function (Version) {
|
|
14
8
|
Version[Version["V1"] = 0] = "V1";
|
|
@@ -3769,7 +3763,6 @@ var XTokensTransferImpl = /*#__PURE__*/function () {
|
|
|
3769
3763
|
var module = lowercaseFirstLetter(pallet.toString());
|
|
3770
3764
|
if (serializedApiCallEnabled) {
|
|
3771
3765
|
return {
|
|
3772
|
-
type: TType.TX,
|
|
3773
3766
|
module: module,
|
|
3774
3767
|
section: 'transfer',
|
|
3775
3768
|
parameters: [currencySelection, amount, addressSelection, fees]
|
|
@@ -4507,6 +4500,7 @@ var Karura$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4507
4500
|
return Karura;
|
|
4508
4501
|
}(ParachainNode);
|
|
4509
4502
|
|
|
4503
|
+
// Contains basic structure of polkadotXCM call
|
|
4510
4504
|
var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
4511
4505
|
function PolkadotXCMTransferImpl() {
|
|
4512
4506
|
_classCallCheck(this, PolkadotXCMTransferImpl);
|
|
@@ -4522,7 +4516,6 @@ var PolkadotXCMTransferImpl = /*#__PURE__*/function () {
|
|
|
4522
4516
|
var fees = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
4523
4517
|
if (serializedApiCallEnabled) {
|
|
4524
4518
|
return {
|
|
4525
|
-
type: TType.TX,
|
|
4526
4519
|
module: 'polkadotXcm',
|
|
4527
4520
|
section: method,
|
|
4528
4521
|
parameters: [header, addressSelection, currencySelection, 0].concat(_toConsumableArray(fees ? [fees] : []))
|
|
@@ -5224,6 +5217,13 @@ function getNodeEndpointOption(node) {
|
|
|
5224
5217
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
5225
5218
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
5226
5219
|
};
|
|
5220
|
+
var callPolkadotJsTxFunction = function callPolkadotJsTxFunction(api, _ref2) {
|
|
5221
|
+
var _api$tx$module;
|
|
5222
|
+
var module = _ref2.module,
|
|
5223
|
+
section = _ref2.section,
|
|
5224
|
+
parameters = _ref2.parameters;
|
|
5225
|
+
return (_api$tx$module = api.tx[module])[section].apply(_api$tx$module, _toConsumableArray(parameters));
|
|
5226
|
+
};
|
|
5227
5227
|
|
|
5228
5228
|
var getAssetBySymbolOrId = function getAssetBySymbolOrId(node, symbolOrId) {
|
|
5229
5229
|
var _getAssetsObject = getAssetsObject(node),
|
|
@@ -5283,25 +5283,59 @@ var sendSerializedApiCall = function sendSerializedApiCall(api, origin, currency
|
|
|
5283
5283
|
function send(api, origin, currencySymbolOrId, amount, to, destination) {
|
|
5284
5284
|
return sendCommon(api, origin, currencySymbolOrId, amount, to, destination);
|
|
5285
5285
|
}
|
|
5286
|
-
|
|
5286
|
+
// TODO: Refactor this function
|
|
5287
|
+
var transferRelayToParaCommon = function transferRelayToParaCommon(api, destination, amount, to) {
|
|
5288
|
+
var serializedApiCallEnabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
5287
5289
|
var paraId = getParaId(destination);
|
|
5288
5290
|
if (destination === 'Statemint' || destination === 'Statemine') {
|
|
5289
5291
|
// Same for Statemint, Statemine and Encoiter
|
|
5290
|
-
|
|
5292
|
+
var _serializedApiCall = {
|
|
5293
|
+
module: 'xcmPallet',
|
|
5294
|
+
section: 'limitedTeleportAssets',
|
|
5295
|
+
parameters: [createHeaderPolkadotXCM('RelayToPara', Version.V3, paraId), handleAddress('RelayToPara', '', api, to, Version.V3, paraId), createCurrencySpecification(amount, 'RelayToPara', Version.V3, destination), 0, 'Unlimited']
|
|
5296
|
+
};
|
|
5297
|
+
if (serializedApiCallEnabled) {
|
|
5298
|
+
return _serializedApiCall;
|
|
5299
|
+
}
|
|
5300
|
+
return callPolkadotJsTxFunction(api, _serializedApiCall);
|
|
5291
5301
|
} else if (destination === 'Encointer') {
|
|
5292
|
-
|
|
5302
|
+
var _serializedApiCall2 = {
|
|
5303
|
+
module: 'xcmPallet',
|
|
5304
|
+
section: 'limitedTeleportAssets',
|
|
5305
|
+
parameters: [createHeaderPolkadotXCM('RelayToPara', Version.V1, paraId), handleAddress('RelayToPara', '', api, to, Version.V1, paraId), createCurrencySpecification(amount, 'RelayToPara', Version.V1, destination), 0, 'Unlimited']
|
|
5306
|
+
};
|
|
5307
|
+
if (serializedApiCallEnabled) {
|
|
5308
|
+
return _serializedApiCall2;
|
|
5309
|
+
}
|
|
5310
|
+
return callPolkadotJsTxFunction(api, _serializedApiCall2);
|
|
5293
5311
|
} else if (destination === 'Darwinia' || destination === 'Crab') {
|
|
5294
5312
|
// Do not do anything because Darwinia and Crab does not have DOT and KSM registered
|
|
5295
5313
|
throw new NodeNotSupportedError('These nodes do not support XCM transfers from Relay / to Relay chain.');
|
|
5296
5314
|
}
|
|
5297
|
-
|
|
5315
|
+
var serializedApiCall = {
|
|
5316
|
+
module: 'xcmPallet',
|
|
5317
|
+
section: 'reserveTransferAssets',
|
|
5318
|
+
parameters: [createHeaderPolkadotXCM('RelayToPara', Version.V3, paraId), handleAddress('RelayToPara', '', api, to, Version.V3, paraId), createCurrencySpecification(amount, 'RelayToPara', Version.V3, destination), 0]
|
|
5319
|
+
};
|
|
5320
|
+
if (serializedApiCallEnabled) {
|
|
5321
|
+
return serializedApiCall;
|
|
5322
|
+
}
|
|
5323
|
+
return callPolkadotJsTxFunction(api, serializedApiCall);
|
|
5324
|
+
};
|
|
5325
|
+
function transferRelayToPara(api, destination, amount, to) {
|
|
5326
|
+
return transferRelayToParaCommon(api, destination, amount, to);
|
|
5298
5327
|
}
|
|
5328
|
+
var transferRelayToParaSerializedApiCall = function transferRelayToParaSerializedApiCall(api, destination, amount, to) {
|
|
5329
|
+
return transferRelayToParaCommon(api, destination, amount, to, true);
|
|
5330
|
+
};
|
|
5299
5331
|
|
|
5300
5332
|
var index$3 = /*#__PURE__*/Object.freeze({
|
|
5301
5333
|
__proto__: null,
|
|
5302
5334
|
send: send,
|
|
5303
5335
|
sendSerializedApiCall: sendSerializedApiCall,
|
|
5304
|
-
transferRelayToPara: transferRelayToPara
|
|
5336
|
+
transferRelayToPara: transferRelayToPara,
|
|
5337
|
+
transferRelayToParaCommon: transferRelayToParaCommon,
|
|
5338
|
+
transferRelayToParaSerializedApiCall: transferRelayToParaSerializedApiCall
|
|
5305
5339
|
});
|
|
5306
5340
|
|
|
5307
5341
|
//Contains XYK Decentralized exchange functions implemented in collaboration with Basilisk team
|
|
@@ -5573,6 +5607,11 @@ var RelayToParaBuilder = /*#__PURE__*/function () {
|
|
|
5573
5607
|
value: function build() {
|
|
5574
5608
|
return transferRelayToPara(this.api, this.to, this._amount, this._address);
|
|
5575
5609
|
}
|
|
5610
|
+
}, {
|
|
5611
|
+
key: "buildSerializedApiCall",
|
|
5612
|
+
value: function buildSerializedApiCall() {
|
|
5613
|
+
return transferRelayToParaSerializedApiCall(this.api, this.to, this._amount, this._address);
|
|
5614
|
+
}
|
|
5576
5615
|
}], [{
|
|
5577
5616
|
key: "create",
|
|
5578
5617
|
value: function create(api, to) {
|
|
@@ -5733,11 +5772,10 @@ var ToGeneralBuilder = /*#__PURE__*/function () {
|
|
|
5733
5772
|
return ToGeneralBuilder;
|
|
5734
5773
|
}();
|
|
5735
5774
|
var FromGeneralBuilder = /*#__PURE__*/function () {
|
|
5736
|
-
function FromGeneralBuilder(api, from
|
|
5775
|
+
function FromGeneralBuilder(api, from) {
|
|
5737
5776
|
_classCallCheck(this, FromGeneralBuilder);
|
|
5738
5777
|
this.api = api;
|
|
5739
5778
|
this.from = from;
|
|
5740
|
-
this.version = version;
|
|
5741
5779
|
}
|
|
5742
5780
|
_createClass(FromGeneralBuilder, [{
|
|
5743
5781
|
key: "to",
|
|
@@ -5765,7 +5803,7 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
5765
5803
|
_createClass(GeneralBuilder, [{
|
|
5766
5804
|
key: "from",
|
|
5767
5805
|
value: function from(node) {
|
|
5768
|
-
return new FromGeneralBuilder(this.api, node
|
|
5806
|
+
return new FromGeneralBuilder(this.api, node);
|
|
5769
5807
|
}
|
|
5770
5808
|
}, {
|
|
5771
5809
|
key: "to",
|
|
@@ -6241,4 +6279,4 @@ var getSupportedPallets = function getSupportedPallets(node) {
|
|
|
6241
6279
|
return palletsMap[node].supportedPallets;
|
|
6242
6280
|
};
|
|
6243
6281
|
|
|
6244
|
-
export { Builder, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, SUPPORTED_PALLETS, ScenarioNotSupportedError,
|
|
6282
|
+
export { Builder, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, SUPPORTED_PALLETS, ScenarioNotSupportedError, Version, index$4 as assets, index as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNodeEndpointOption, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$1 as openChannels, index$3 as xcmPallet, index$2 as xyk };
|