@paraspell/sdk 1.0.1 → 1.1.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/LICENSE +2 -2
- package/README.md +106 -36
- package/dist/index.cjs +347 -52
- package/dist/index.d.ts +9 -8
- package/dist/index.mjs +347 -52
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiPromise } from '@polkadot/api';
|
|
2
2
|
import { SubmittableExtrinsic } from '@polkadot/api-base/types';
|
|
3
3
|
|
|
4
|
-
declare const NODE_NAMES: readonly ["Statemint", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "Centrifuge", "Clover", "ComposableFinance", "Darwinia", "HydraDX", "Interlay", "Kylin", "Litentry", "Moonbeam", "Parallel", "Statemine", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Dorafactory", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kico", "Kintsugi", "Listen", "Litmus", "Mangata", "Moonriver", "ParallelHeiko", "Picasso", "Pichiu", "Quartz", "Robonomics", "Shiden", "Turing"];
|
|
4
|
+
declare const NODE_NAMES: readonly ["Statemint", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "Centrifuge", "Clover", "ComposableFinance", "Darwinia", "HydraDX", "Interlay", "Kylin", "Litentry", "Moonbeam", "Parallel", "Statemine", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Dorafactory", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kico", "Kintsugi", "Listen", "Litmus", "Mangata", "Moonriver", "ParallelHeiko", "Picasso", "Pichiu", "Quartz", "Robonomics", "Shiden", "Turing", "Equilibrium", "Unique", "Crust", "Efinity", "Ipci"];
|
|
5
5
|
declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm"];
|
|
6
6
|
|
|
7
7
|
type UpdateFunction = (name: string, index: number) => string;
|
|
@@ -18,7 +18,11 @@ type TAssetDetails = {
|
|
|
18
18
|
symbol: string;
|
|
19
19
|
decimals: number;
|
|
20
20
|
};
|
|
21
|
-
type TNativeAssetDetails =
|
|
21
|
+
type TNativeAssetDetails = {
|
|
22
|
+
assetId?: string;
|
|
23
|
+
symbol: string;
|
|
24
|
+
decimals: number;
|
|
25
|
+
};
|
|
22
26
|
type TNodeAssets = {
|
|
23
27
|
paraId: number;
|
|
24
28
|
relayChainAssetSymbol: 'KSM' | 'DOT';
|
|
@@ -35,7 +39,7 @@ type TPalletMap = {
|
|
|
35
39
|
};
|
|
36
40
|
type TPalletJsonMap = Record<TNode, TPalletMap>;
|
|
37
41
|
|
|
38
|
-
declare function send(api: ApiPromise, origin: TNode,
|
|
42
|
+
declare function send(api: ApiPromise, origin: TNode, currencySymbolOrId: string | number, amount: any, to: string, destination?: TNode): Extrinsic;
|
|
39
43
|
declare function transferRelayToPara(api: ApiPromise, destination: TNode, amount: any, to: string): Extrinsic | never;
|
|
40
44
|
|
|
41
45
|
declare const index$4_send: typeof send;
|
|
@@ -241,16 +245,13 @@ interface AddressSendBuilder {
|
|
|
241
245
|
interface AmountSendBuilder {
|
|
242
246
|
amount(amount: any): AddressSendBuilder;
|
|
243
247
|
}
|
|
244
|
-
interface CurrencyIdSendBuilder {
|
|
245
|
-
currencyId(currencyId: number): AmountSendBuilder;
|
|
246
|
-
}
|
|
247
248
|
|
|
248
249
|
declare class ToGeneralBuilder {
|
|
249
250
|
private api;
|
|
250
251
|
private from;
|
|
251
252
|
private to;
|
|
252
253
|
constructor(api: ApiPromise, from: TNode, to: TNode);
|
|
253
|
-
currency(currency: string):
|
|
254
|
+
currency(currency: string | number): AmountSendBuilder;
|
|
254
255
|
openChannel(): MaxSizeOpenChannelBuilder;
|
|
255
256
|
}
|
|
256
257
|
declare class FromGeneralBuilder {
|
|
@@ -258,7 +259,7 @@ declare class FromGeneralBuilder {
|
|
|
258
259
|
private from;
|
|
259
260
|
constructor(api: ApiPromise, from: TNode);
|
|
260
261
|
to(node: TNode): ToGeneralBuilder;
|
|
261
|
-
currency(currency: string):
|
|
262
|
+
currency(currency: string | number): AmountSendBuilder;
|
|
262
263
|
closeChannel(): InboundCloseChannelBuilder;
|
|
263
264
|
}
|
|
264
265
|
declare class GeneralBuilder {
|