@paraspell/sdk-core 11.7.0 → 11.8.0
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 +438 -293
- package/dist/index.d.ts +73 -47
- package/dist/index.mjs +436 -295
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -192,6 +192,10 @@ type TDestWeight = {
|
|
|
192
192
|
ref_time: bigint;
|
|
193
193
|
proof_size: bigint;
|
|
194
194
|
};
|
|
195
|
+
type TTxPair<TRes> = {
|
|
196
|
+
tx: TRes;
|
|
197
|
+
txBypass: TRes;
|
|
198
|
+
};
|
|
195
199
|
type TXTransferMethod = 'transfer';
|
|
196
200
|
type TXTokensMethod = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
197
201
|
type TPolkadotXcmMethod = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
|
|
@@ -452,10 +456,9 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
452
456
|
build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
|
|
453
457
|
private buildCommon;
|
|
454
458
|
private maybePerformXcmFormatCheck;
|
|
455
|
-
protected computeOverridenAmount(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): bigint | "800";
|
|
456
|
-
protected overrideTxAmount(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TRes>;
|
|
457
459
|
dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TDryRunResult>;
|
|
458
460
|
dryRunPreview(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, options?: TDryRunPreviewOptions): Promise<TDryRunResult>;
|
|
461
|
+
private createTxs;
|
|
459
462
|
/**
|
|
460
463
|
* Returns the XCM fee for the transfer using dryRun or paymentInfo function.
|
|
461
464
|
*
|
|
@@ -639,15 +642,15 @@ type TGetTransferableAmountOptionsBase<TRes> = {
|
|
|
639
642
|
*/
|
|
640
643
|
currency: WithAmount<TCurrencyCore>;
|
|
641
644
|
/**
|
|
642
|
-
* The
|
|
645
|
+
* The transactions
|
|
643
646
|
*/
|
|
644
|
-
|
|
647
|
+
txs: TTxPair<TRes>;
|
|
645
648
|
feeAsset?: TCurrencyInput;
|
|
646
649
|
};
|
|
647
650
|
type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes>;
|
|
648
651
|
type TGetMinTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase<TRes> & {
|
|
649
652
|
address: string;
|
|
650
|
-
builder: GeneralBuilder<TApi, TRes,
|
|
653
|
+
builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>;
|
|
651
654
|
}, TApi, TRes>;
|
|
652
655
|
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
653
656
|
/**
|
|
@@ -671,9 +674,9 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
|
671
674
|
*/
|
|
672
675
|
currency: WithAmount<TCurrencyCore>;
|
|
673
676
|
/**
|
|
674
|
-
* The
|
|
677
|
+
* The transactions
|
|
675
678
|
*/
|
|
676
|
-
|
|
679
|
+
txs: TTxPair<TRes>;
|
|
677
680
|
feeAsset?: TCurrencyInput;
|
|
678
681
|
};
|
|
679
682
|
type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes>;
|
|
@@ -753,6 +756,7 @@ type TBuilderConfig<TApi> = {
|
|
|
753
756
|
abstractDecimals?: boolean;
|
|
754
757
|
xcmFormatCheck?: boolean;
|
|
755
758
|
};
|
|
759
|
+
type TCreateTxsOptions<TApi, TRes> = Pick<TSendOptions<TApi, TRes>, 'api' | 'from' | 'to' | 'currency'>;
|
|
756
760
|
|
|
757
761
|
type TProviderEntry = {
|
|
758
762
|
name: string;
|
|
@@ -1142,9 +1146,9 @@ declare class UnableToComputeError extends Error {
|
|
|
1142
1146
|
|
|
1143
1147
|
type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
1144
1148
|
/**
|
|
1145
|
-
* The
|
|
1149
|
+
* The transactions
|
|
1146
1150
|
*/
|
|
1147
|
-
|
|
1151
|
+
txs: TTxPair<TRes>;
|
|
1148
1152
|
/**
|
|
1149
1153
|
* The origin chain
|
|
1150
1154
|
*/
|
|
@@ -1164,27 +1168,35 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1164
1168
|
swapConfig?: TSwapConfig;
|
|
1165
1169
|
};
|
|
1166
1170
|
type TGetXcmFeeOptions<TApi, TRes, TDisableFallback extends boolean = boolean> = WithApi<TGetXcmFeeBaseOptions<TRes, TDisableFallback>, TApi, TRes>;
|
|
1167
|
-
type
|
|
1168
|
-
|
|
1171
|
+
type TGetXcmFeeInternalOptions<TApi, TRes, TDisableFallback extends boolean = boolean> = Omit<TGetXcmFeeOptions<TApi, TRes, TDisableFallback>, 'txs'> & {
|
|
1172
|
+
tx: TRes;
|
|
1173
|
+
useRootOrigin: boolean;
|
|
1174
|
+
};
|
|
1175
|
+
type TGetXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeInternalOptions<TApi, TRes>, 'disableFallback' | 'useRootOrigin'>;
|
|
1176
|
+
type TGetOriginXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeInternalOptions<TApi, TRes>, 'disableFallback' | 'address' | 'useRootOrigin'>;
|
|
1169
1177
|
type TGetXcmFeeBuilderOptions = {
|
|
1170
1178
|
disableFallback: boolean;
|
|
1171
1179
|
};
|
|
1172
1180
|
type TGetOriginXcmFeeBaseOptions<TRes> = {
|
|
1173
|
-
|
|
1181
|
+
txs: {
|
|
1182
|
+
tx: TRes;
|
|
1183
|
+
txBypass: TRes;
|
|
1184
|
+
};
|
|
1174
1185
|
origin: TSubstrateChain;
|
|
1175
1186
|
destination: TChain;
|
|
1176
1187
|
senderAddress: string;
|
|
1177
|
-
currency:
|
|
1188
|
+
currency: WithAmount<TCurrencyCore>;
|
|
1178
1189
|
feeAsset?: TCurrencyInput;
|
|
1179
1190
|
disableFallback: boolean;
|
|
1180
1191
|
useRootOrigin?: boolean;
|
|
1181
1192
|
};
|
|
1182
1193
|
type TGetOriginXcmFeeOptions<TApi, TRes> = WithApi<TGetOriginXcmFeeBaseOptions<TRes>, TApi, TRes>;
|
|
1183
|
-
type
|
|
1184
|
-
|
|
1194
|
+
type TGetOriginXcmFeeInternalOptions<TApi, TRes> = Omit<TGetOriginXcmFeeOptions<TApi, TRes>, 'txs'> & {
|
|
1195
|
+
tx: TRes;
|
|
1185
1196
|
};
|
|
1186
1197
|
type TSwapConfig = {
|
|
1187
1198
|
currencyTo: TCurrencyCore;
|
|
1199
|
+
amountOut: bigint;
|
|
1188
1200
|
exchangeChain: TParachain;
|
|
1189
1201
|
};
|
|
1190
1202
|
type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
@@ -1373,7 +1385,7 @@ type TOriginFeeDetails = {
|
|
|
1373
1385
|
xcmFee: bigint;
|
|
1374
1386
|
};
|
|
1375
1387
|
type TGetTransferInfoOptionsBase<TRes> = {
|
|
1376
|
-
|
|
1388
|
+
txs: TTxPair<TRes>;
|
|
1377
1389
|
origin: TSubstrateChain;
|
|
1378
1390
|
destination: TChain;
|
|
1379
1391
|
senderAddress: string;
|
|
@@ -1480,9 +1492,11 @@ declare abstract class Parachain<TApi, TRes> {
|
|
|
1480
1492
|
get version(): Version;
|
|
1481
1493
|
canUseXTokens(options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1482
1494
|
transfer(sendOptions: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1495
|
+
throwIfCantReceive(destChain: TChain | undefined): void;
|
|
1483
1496
|
throwIfTempDisabled(options: TSendInternalOptions<TApi, TRes>, destChain?: TChain): void;
|
|
1484
1497
|
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1485
1498
|
isReceivingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1499
|
+
canReceiveFrom(_origin: TChain): boolean;
|
|
1486
1500
|
shouldUseNativeAssetTeleport({ assetInfo: asset, to }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1487
1501
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1488
1502
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): Promise<TSerializedApiCall>;
|
|
@@ -1502,14 +1516,10 @@ declare class Acala<TApi, TRes> extends Parachain<TApi, TRes> implements IXToken
|
|
|
1502
1516
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1503
1517
|
}
|
|
1504
1518
|
|
|
1505
|
-
declare class Ajuna<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer
|
|
1519
|
+
declare class Ajuna<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
1506
1520
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1507
1521
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1508
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1509
|
-
canUseXTokens({ assetInfo, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1510
1522
|
transferRelayToPara(): Promise<TSerializedApiCall>;
|
|
1511
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1512
|
-
isReceivingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1513
1523
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1514
1524
|
}
|
|
1515
1525
|
|
|
@@ -1630,7 +1640,7 @@ declare class BifrostPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implemen
|
|
|
1630
1640
|
};
|
|
1631
1641
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1632
1642
|
transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1633
|
-
transferPolkadotXCM<TApi, TRes>(
|
|
1643
|
+
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1634
1644
|
canUseXTokens({ assetInfo, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1635
1645
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1636
1646
|
}
|
|
@@ -1981,6 +1991,12 @@ declare class Unique<TApi, TRes> extends Parachain<TApi, TRes> implements IXToke
|
|
|
1981
1991
|
transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1982
1992
|
}
|
|
1983
1993
|
|
|
1994
|
+
declare class Xode<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1995
|
+
constructor();
|
|
1996
|
+
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1997
|
+
canReceiveFrom(origin: TChain): boolean;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
1984
2000
|
declare class Zeitgeist<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
1985
2001
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1986
2002
|
private getCurrencySelection;
|
|
@@ -2001,21 +2017,36 @@ declare const chains: <TApi, TRes>() => {
|
|
|
2001
2017
|
Crust: Crust<TApi, TRes>;
|
|
2002
2018
|
BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
|
|
2003
2019
|
BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
|
|
2004
|
-
BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
|
|
2005
2020
|
Centrifuge: Centrifuge<TApi, TRes>;
|
|
2006
2021
|
ComposableFinance: ComposableFinance<TApi, TRes>;
|
|
2007
2022
|
Darwinia: Darwinia<TApi, TRes>;
|
|
2008
2023
|
EnergyWebX: EnergyWebX<TApi, TRes>;
|
|
2009
2024
|
Hydration: Hydration<TApi, TRes>;
|
|
2010
|
-
IntegriteeKusama: IntegriteeKusama<TApi, TRes>;
|
|
2011
2025
|
IntegriteePolkadot: IntegriteePolkadot<TApi, TRes>;
|
|
2012
2026
|
Interlay: Interlay<TApi, TRes>;
|
|
2013
2027
|
Heima: Heima<TApi, TRes>;
|
|
2014
2028
|
Jamton: Jamton<TApi, TRes>;
|
|
2015
2029
|
Moonbeam: Moonbeam<TApi, TRes>;
|
|
2030
|
+
CoretimePolkadot: CoretimePolkadot<TApi, TRes>;
|
|
2031
|
+
RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
|
|
2032
|
+
PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
|
|
2033
|
+
Manta: Manta<TApi, TRes>;
|
|
2034
|
+
Nodle: Nodle<TApi, TRes>;
|
|
2035
|
+
NeuroWeb: NeuroWeb<TApi, TRes>;
|
|
2036
|
+
Pendulum: Pendulum<TApi, TRes>;
|
|
2037
|
+
Collectives: Collectives<TApi, TRes>;
|
|
2038
|
+
Phala: Phala<TApi, TRes>;
|
|
2039
|
+
Subsocial: Subsocial<TApi, TRes>;
|
|
2040
|
+
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
2041
|
+
Curio: Curio<TApi, TRes>;
|
|
2042
|
+
Mythos: Mythos<TApi, TRes>;
|
|
2043
|
+
Peaq: Peaq<TApi, TRes>;
|
|
2044
|
+
Polimec: Polimec<TApi, TRes>;
|
|
2045
|
+
Xode: Xode<TApi, TRes>;
|
|
2016
2046
|
AssetHubKusama: AssetHubKusama<TApi, TRes>;
|
|
2047
|
+
BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
|
|
2017
2048
|
CoretimeKusama: CoretimeKusama<TApi, TRes>;
|
|
2018
|
-
|
|
2049
|
+
IntegriteeKusama: IntegriteeKusama<TApi, TRes>;
|
|
2019
2050
|
Encointer: Encointer<TApi, TRes>;
|
|
2020
2051
|
Altair: Altair<TApi, TRes>;
|
|
2021
2052
|
Amplitude: Amplitude<TApi, TRes>;
|
|
@@ -2029,23 +2060,9 @@ declare const chains: <TApi, TRes>() => {
|
|
|
2029
2060
|
Laos: Laos<TApi, TRes>;
|
|
2030
2061
|
Quartz: Quartz<TApi, TRes>;
|
|
2031
2062
|
RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
|
|
2032
|
-
RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
|
|
2033
|
-
PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
|
|
2034
2063
|
PeopleKusama: PeopleKusama<TApi, TRes>;
|
|
2035
2064
|
Shiden: Shiden<TApi, TRes>;
|
|
2036
|
-
Manta: Manta<TApi, TRes>;
|
|
2037
|
-
Nodle: Nodle<TApi, TRes>;
|
|
2038
|
-
NeuroWeb: NeuroWeb<TApi, TRes>;
|
|
2039
|
-
Pendulum: Pendulum<TApi, TRes>;
|
|
2040
2065
|
Zeitgeist: Zeitgeist<TApi, TRes>;
|
|
2041
|
-
Collectives: Collectives<TApi, TRes>;
|
|
2042
|
-
Phala: Phala<TApi, TRes>;
|
|
2043
|
-
Subsocial: Subsocial<TApi, TRes>;
|
|
2044
|
-
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
2045
|
-
Curio: Curio<TApi, TRes>;
|
|
2046
|
-
Mythos: Mythos<TApi, TRes>;
|
|
2047
|
-
Peaq: Peaq<TApi, TRes>;
|
|
2048
|
-
Polimec: Polimec<TApi, TRes>;
|
|
2049
2066
|
AssetHubWestend: AssetHubWestend<TApi, TRes>;
|
|
2050
2067
|
BridgeHubWestend: BridgeHubWestend<TApi, TRes>;
|
|
2051
2068
|
CollectivesWestend: CollectivesWestend<TApi, TRes>;
|
|
@@ -2129,7 +2146,7 @@ declare const getOriginXcmFee: <TApi, TRes>(options: TGetOriginXcmFeeOptions<TAp
|
|
|
2129
2146
|
|
|
2130
2147
|
declare const getOriginXcmFeeEstimate: <TApi, TRes>({ api, tx, origin, destination, currency, senderAddress, feeAsset }: TGetOriginXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateDetail>;
|
|
2131
2148
|
|
|
2132
|
-
declare const getOriginXcmFeeInternal: <TApi, TRes>({ api, tx, origin, destination, senderAddress, disableFallback, feeAsset, currency, useRootOrigin }:
|
|
2149
|
+
declare const getOriginXcmFeeInternal: <TApi, TRes>({ api, tx, origin, destination, senderAddress, disableFallback, feeAsset, currency, useRootOrigin }: TGetOriginXcmFeeInternalOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
|
|
2133
2150
|
forwardedXcms?: any;
|
|
2134
2151
|
destParaId?: number;
|
|
2135
2152
|
}>;
|
|
@@ -2138,16 +2155,18 @@ declare const getXcmFee: <TApi, TRes, TDisableFallback extends boolean>(options:
|
|
|
2138
2155
|
|
|
2139
2156
|
declare const getXcmFeeEstimate: <TApi, TRes>(options: TGetXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateResult>;
|
|
2140
2157
|
|
|
2158
|
+
declare const getXcmFeeInternal: <TApi, TRes, TDisableFallback extends boolean>({ api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback, swapConfig, useRootOrigin }: TGetXcmFeeInternalOptions<TApi, TRes, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2159
|
+
|
|
2141
2160
|
declare const getBridgeStatus: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => Promise<TBridgeStatus>;
|
|
2142
2161
|
|
|
2143
2162
|
declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
|
|
2144
2163
|
|
|
2145
|
-
declare const getTransferInfo: <TApi, TRes>({ api,
|
|
2164
|
+
declare const getTransferInfo: <TApi, TRes>({ api, txs, origin, destination, senderAddress, ahAddress, address, currency, feeAsset }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
|
|
2146
2165
|
|
|
2147
|
-
declare const getMinTransferableAmountInternal: <TApi, TRes>({ api, origin, senderAddress, address, origin: chain, destination, currency,
|
|
2166
|
+
declare const getMinTransferableAmountInternal: <TApi, TRes>({ api, origin, senderAddress, address, origin: chain, destination, currency, feeAsset, txs, builder }: TGetMinTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2148
2167
|
declare const getMinTransferableAmount: <TApi, TRes>(options: TGetMinTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2149
2168
|
|
|
2150
|
-
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: chain, destination, currency,
|
|
2169
|
+
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: chain, destination, currency, txs, feeAsset }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2151
2170
|
declare const getTransferableAmount: <TApi, TRes>(options: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2152
2171
|
|
|
2153
2172
|
declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
|
|
@@ -2176,6 +2195,13 @@ declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAss
|
|
|
2176
2195
|
|
|
2177
2196
|
declare const sortAssets: (assets: TAsset[]) => TAsset[];
|
|
2178
2197
|
|
|
2198
|
+
declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>) => bigint | "800";
|
|
2199
|
+
declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>) => Promise<TRes>;
|
|
2200
|
+
declare const createTxs: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>) => Promise<{
|
|
2201
|
+
tx: Awaited<TRes>;
|
|
2202
|
+
txBypass: Awaited<TRes>;
|
|
2203
|
+
}>;
|
|
2204
|
+
|
|
2179
2205
|
declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
|
|
2180
2206
|
|
|
2181
2207
|
declare const getChainVersion: <TApi, TRes>(chain: TChain) => Version;
|
|
@@ -2190,7 +2216,7 @@ declare const getRelayChainOf: (chain: TSubstrateChain) => TRelaychain;
|
|
|
2190
2216
|
|
|
2191
2217
|
declare const createChainClient: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, chain: TSubstrateChain) => Promise<TApi>;
|
|
2192
2218
|
|
|
2193
|
-
declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain,
|
|
2219
|
+
declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain, _executionFee: bigint, isFeeAsset?: boolean) => bigint;
|
|
2194
2220
|
|
|
2195
2221
|
declare const computeFeeFromDryRunPjs: (dryRun: any, chain: TSubstrateChain, executionFee: bigint) => bigint;
|
|
2196
2222
|
|
|
@@ -2227,7 +2253,7 @@ declare const localizeLocation: (chain: TChain, location: TLocation) => TLocatio
|
|
|
2227
2253
|
|
|
2228
2254
|
declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
2229
2255
|
|
|
2230
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "ComposableFinance" | "Darwinia" | "EnergyWebX" | "Hydration" | "IntegriteePolkadot" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "Subsocial" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "Polimec" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2256
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "ComposableFinance" | "Darwinia" | "EnergyWebX" | "Hydration" | "IntegriteePolkadot" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "Subsocial" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "Polimec" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2231
2257
|
|
|
2232
2258
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2233
2259
|
|
|
@@ -2263,5 +2289,5 @@ declare const handleToAhTeleport: <TApi, TRes>(origin: TParachain, input: TPolka
|
|
|
2263
2289
|
|
|
2264
2290
|
declare const validateAddress: (address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2265
2291
|
|
|
2266
|
-
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, padFee, padFeeBy, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, verifyEdOnDestination, wrapTxBypass };
|
|
2267
|
-
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase,
|
|
2292
|
+
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTxs, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, overrideTxAmount, padFee, padFeeBy, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, verifyEdOnDestination, wrapTxBypass };
|
|
2293
|
+
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignByAssetOptions, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TSwapConfig, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxPair, TTypeAndThenCallContext, TTypeAndThenFees, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|