@paraspell/sdk 1.1.10 → 1.1.12
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 +1 -1
- package/dist/index.cjs +205 -173
- package/dist/index.d.ts +27 -4
- package/dist/index.mjs +206 -174
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,17 @@ type TPalletMap = {
|
|
|
34
34
|
supportedPallets: TPallet[];
|
|
35
35
|
};
|
|
36
36
|
type TPalletJsonMap = Record<TNode, TPalletMap>;
|
|
37
|
+
declare enum TType {
|
|
38
|
+
CONSTS = "consts",
|
|
39
|
+
QUERY = "query",
|
|
40
|
+
TX = "tx"
|
|
41
|
+
}
|
|
42
|
+
type TSerializedApiCall = {
|
|
43
|
+
type: TType;
|
|
44
|
+
module: string;
|
|
45
|
+
section: string;
|
|
46
|
+
parameters: any[];
|
|
47
|
+
};
|
|
37
48
|
type XTokensTransferInput = {
|
|
38
49
|
api: ApiPromise;
|
|
39
50
|
currency: string;
|
|
@@ -41,9 +52,10 @@ type XTokensTransferInput = {
|
|
|
41
52
|
amount: any;
|
|
42
53
|
addressSelection: any;
|
|
43
54
|
fees: number;
|
|
55
|
+
serializedApiCallEnabled?: boolean;
|
|
44
56
|
};
|
|
45
57
|
interface IXTokensTransfer {
|
|
46
|
-
transferXTokens(input: XTokensTransferInput): Extrinsic;
|
|
58
|
+
transferXTokens(input: XTokensTransferInput): Extrinsic | TSerializedApiCall;
|
|
47
59
|
}
|
|
48
60
|
type PolkadotXCMTransferInput = {
|
|
49
61
|
api: ApiPromise;
|
|
@@ -51,19 +63,27 @@ type PolkadotXCMTransferInput = {
|
|
|
51
63
|
addressSelection: any;
|
|
52
64
|
currencySelection: any;
|
|
53
65
|
scenario: TScenario;
|
|
66
|
+
serializedApiCallEnabled?: boolean;
|
|
54
67
|
};
|
|
55
68
|
interface IPolkadotXCMTransfer {
|
|
56
|
-
transferPolkadotXCM(input: PolkadotXCMTransferInput): Extrinsic;
|
|
69
|
+
transferPolkadotXCM(input: PolkadotXCMTransferInput): Extrinsic | TSerializedApiCall;
|
|
70
|
+
}
|
|
71
|
+
declare enum Version {
|
|
72
|
+
V1 = 0,
|
|
73
|
+
V3 = 1
|
|
57
74
|
}
|
|
58
75
|
|
|
76
|
+
declare const sendSerializedApiCall: (api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: any, to: string, destination?: TNode) => TSerializedApiCall;
|
|
59
77
|
declare function send(api: ApiPromise, origin: TNode, currencySymbolOrId: string | number | bigint, amount: any, to: string, destination?: TNode): Extrinsic;
|
|
60
78
|
declare function transferRelayToPara(api: ApiPromise, destination: TNode, amount: any, to: string): Extrinsic | never;
|
|
61
79
|
|
|
62
80
|
declare const index$4_send: typeof send;
|
|
81
|
+
declare const index$4_sendSerializedApiCall: typeof sendSerializedApiCall;
|
|
63
82
|
declare const index$4_transferRelayToPara: typeof transferRelayToPara;
|
|
64
83
|
declare namespace index$4 {
|
|
65
84
|
export {
|
|
66
85
|
index$4_send as send,
|
|
86
|
+
index$4_sendSerializedApiCall as sendSerializedApiCall,
|
|
67
87
|
index$4_transferRelayToPara as transferRelayToPara,
|
|
68
88
|
};
|
|
69
89
|
}
|
|
@@ -258,6 +278,7 @@ interface MaxSizeOpenChannelBuilder {
|
|
|
258
278
|
|
|
259
279
|
interface FinalRelayToParaBuilder {
|
|
260
280
|
build(): Extrinsic | never;
|
|
281
|
+
buildSerializedApiCall(): TSerializedApiCall;
|
|
261
282
|
}
|
|
262
283
|
interface AddressSendBuilder {
|
|
263
284
|
address(address: string): FinalRelayToParaBuilder;
|
|
@@ -277,13 +298,15 @@ declare class ToGeneralBuilder {
|
|
|
277
298
|
declare class FromGeneralBuilder {
|
|
278
299
|
private api;
|
|
279
300
|
private from;
|
|
280
|
-
|
|
301
|
+
private version;
|
|
302
|
+
constructor(api: ApiPromise, from: TNode, version: number);
|
|
281
303
|
to(node: TNode): ToGeneralBuilder;
|
|
282
304
|
currency(currency: string | number | bigint): AmountSendBuilder;
|
|
283
305
|
closeChannel(): InboundCloseChannelBuilder;
|
|
284
306
|
}
|
|
285
307
|
declare class GeneralBuilder {
|
|
286
308
|
private api;
|
|
309
|
+
private version;
|
|
287
310
|
constructor(api: ApiPromise);
|
|
288
311
|
from(node: TNode): FromGeneralBuilder;
|
|
289
312
|
to(node: TNode): AmountRelayToParaBuilder;
|
|
@@ -298,4 +321,4 @@ declare function Builder(api: ApiPromise): GeneralBuilder;
|
|
|
298
321
|
declare const getDefaultPallet: (node: TNode) => TPallet;
|
|
299
322
|
declare const getSupportedPallets: (node: TNode) => TPallet[];
|
|
300
323
|
|
|
301
|
-
export { Bool, Builder, Extrinsic, ExtrinsicFunction, IPolkadotXCMTransfer, IXTokensTransfer, NODE_NAMES, PolkadotXCMTransferInput, SUPPORTED_PALLETS, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, UpdateFunction, XTokensTransferInput, index as assets, index$1 as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };
|
|
324
|
+
export { Bool, Builder, Extrinsic, ExtrinsicFunction, IPolkadotXCMTransfer, IXTokensTransfer, NODE_NAMES, PolkadotXCMTransferInput, SUPPORTED_PALLETS, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, TSerializedApiCall, TType, UpdateFunction, Version, XTokensTransferInput, index as assets, index$1 as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };
|