@paraspell/sdk-core 11.8.0 → 11.8.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 +457 -325
- package/dist/index.d.ts +156 -164
- package/dist/index.mjs +457 -325
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -192,10 +192,6 @@ 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
|
-
};
|
|
199
195
|
type TXTransferMethod = 'transfer';
|
|
200
196
|
type TXTokensMethod = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
201
197
|
type TPolkadotXcmMethod = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
|
|
@@ -458,7 +454,7 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
458
454
|
private maybePerformXcmFormatCheck;
|
|
459
455
|
dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TDryRunResult>;
|
|
460
456
|
dryRunPreview(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, options?: TDryRunPreviewOptions): Promise<TDryRunResult>;
|
|
461
|
-
private
|
|
457
|
+
private createTxFactory;
|
|
462
458
|
/**
|
|
463
459
|
* Returns the XCM fee for the transfer using dryRun or paymentInfo function.
|
|
464
460
|
*
|
|
@@ -473,7 +469,7 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
473
469
|
* @returns An origin fee.
|
|
474
470
|
*/
|
|
475
471
|
getOriginXcmFee(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, { disableFallback }?: TGetXcmFeeBuilderOptions): Promise<TXcmFeeDetail & {
|
|
476
|
-
forwardedXcms?:
|
|
472
|
+
forwardedXcms?: unknown;
|
|
477
473
|
destParaId?: number;
|
|
478
474
|
}>;
|
|
479
475
|
/**
|
|
@@ -533,6 +529,146 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
533
529
|
*/
|
|
534
530
|
declare const Builder: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => GeneralBuilder<TApi, TRes, object>;
|
|
535
531
|
|
|
532
|
+
type TTxFactory<TRes> = (amount?: string) => Promise<TRes>;
|
|
533
|
+
type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
534
|
+
/**
|
|
535
|
+
* The transaction factory
|
|
536
|
+
*/
|
|
537
|
+
buildTx: TTxFactory<TRes>;
|
|
538
|
+
/**
|
|
539
|
+
* The origin chain
|
|
540
|
+
*/
|
|
541
|
+
origin: TSubstrateChain;
|
|
542
|
+
/**
|
|
543
|
+
* The destination chain
|
|
544
|
+
*/
|
|
545
|
+
destination: TChain;
|
|
546
|
+
/**
|
|
547
|
+
* The sender address
|
|
548
|
+
*/
|
|
549
|
+
senderAddress: string;
|
|
550
|
+
address: string;
|
|
551
|
+
currency: WithAmount<TCurrencyCore>;
|
|
552
|
+
feeAsset?: TCurrencyInput;
|
|
553
|
+
disableFallback: TDisableFallback;
|
|
554
|
+
swapConfig?: TSwapConfig;
|
|
555
|
+
};
|
|
556
|
+
type TGetXcmFeeOptions<TApi, TRes, TDisableFallback extends boolean = boolean> = WithApi<TGetXcmFeeBaseOptions<TRes, TDisableFallback>, TApi, TRes>;
|
|
557
|
+
type TGetXcmFeeInternalOptions<TApi, TRes, TDisableFallback extends boolean = boolean> = Omit<TGetXcmFeeOptions<TApi, TRes, TDisableFallback>, 'buildTx'> & {
|
|
558
|
+
tx: TRes;
|
|
559
|
+
useRootOrigin: boolean;
|
|
560
|
+
};
|
|
561
|
+
type TGetXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeInternalOptions<TApi, TRes>, 'disableFallback' | 'useRootOrigin' | 'buildTx'>;
|
|
562
|
+
type TGetOriginXcmFeeEstimateOptions<TApi, TRes> = Omit<TGetXcmFeeInternalOptions<TApi, TRes>, 'disableFallback' | 'address' | 'useRootOrigin' | 'buildTx'>;
|
|
563
|
+
type TGetXcmFeeBuilderOptions = {
|
|
564
|
+
disableFallback: boolean;
|
|
565
|
+
};
|
|
566
|
+
type TGetOriginXcmFeeBaseOptions<TRes> = {
|
|
567
|
+
buildTx: TTxFactory<TRes>;
|
|
568
|
+
origin: TSubstrateChain;
|
|
569
|
+
destination: TChain;
|
|
570
|
+
senderAddress: string;
|
|
571
|
+
currency: WithAmount<TCurrencyCore>;
|
|
572
|
+
feeAsset?: TCurrencyInput;
|
|
573
|
+
disableFallback: boolean;
|
|
574
|
+
useRootOrigin?: boolean;
|
|
575
|
+
};
|
|
576
|
+
type TGetOriginXcmFeeOptions<TApi, TRes> = WithApi<TGetOriginXcmFeeBaseOptions<TRes>, TApi, TRes>;
|
|
577
|
+
type TGetOriginXcmFeeInternalOptions<TApi, TRes> = Omit<TGetOriginXcmFeeOptions<TApi, TRes>, 'buildTx'> & {
|
|
578
|
+
tx: TRes;
|
|
579
|
+
};
|
|
580
|
+
type TSwapConfig = {
|
|
581
|
+
currencyTo: TCurrencyCore;
|
|
582
|
+
amountOut: bigint;
|
|
583
|
+
exchangeChain: TParachain;
|
|
584
|
+
};
|
|
585
|
+
type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
586
|
+
prevChain: TSubstrateChain;
|
|
587
|
+
origin: TSubstrateChain;
|
|
588
|
+
destination: TChain;
|
|
589
|
+
senderAddress: string;
|
|
590
|
+
address: string;
|
|
591
|
+
currency: WithAmount<TCurrencyCore>;
|
|
592
|
+
forwardedXcms: any;
|
|
593
|
+
tx: TRes;
|
|
594
|
+
asset: TAssetInfo;
|
|
595
|
+
originFee: bigint;
|
|
596
|
+
feeAsset?: TCurrencyInput;
|
|
597
|
+
disableFallback: boolean;
|
|
598
|
+
hasPassedExchange?: boolean;
|
|
599
|
+
swapConfig?: TSwapConfig;
|
|
600
|
+
};
|
|
601
|
+
type TGetFeeForDestChainOptions<TApi, TRes> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes>;
|
|
602
|
+
type TGetReverseTxFeeOptions<TApi, TRes> = Omit<TGetFeeForDestChainOptions<TApi, TRes>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain'> & {
|
|
603
|
+
destination: TSubstrateChain;
|
|
604
|
+
};
|
|
605
|
+
type THubKey = 'assetHub' | 'bridgeHub';
|
|
606
|
+
type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
|
|
607
|
+
type TXcmFeeBase$1 = {
|
|
608
|
+
/** @deprecated Use `asset` property instead. */
|
|
609
|
+
currency: string;
|
|
610
|
+
asset: TAssetInfo;
|
|
611
|
+
weight?: TWeight;
|
|
612
|
+
sufficient?: boolean;
|
|
613
|
+
};
|
|
614
|
+
type TXcmFeeDetailSuccess = TXcmFeeBase$1 & {
|
|
615
|
+
fee: bigint;
|
|
616
|
+
feeType: TFeeType;
|
|
617
|
+
dryRunError?: string;
|
|
618
|
+
};
|
|
619
|
+
type TXcmFeeDetailWithFallback = TXcmFeeDetailSuccess;
|
|
620
|
+
type TXcmFeeDetailError = TXcmFeeBase$1 & {
|
|
621
|
+
fee?: bigint;
|
|
622
|
+
feeType?: TFeeType;
|
|
623
|
+
dryRunError: string;
|
|
624
|
+
};
|
|
625
|
+
type TXcmFeeDetail = TXcmFeeDetailSuccess | TXcmFeeDetailError;
|
|
626
|
+
type TXcmFeeHopResult = {
|
|
627
|
+
fee?: bigint;
|
|
628
|
+
feeType?: TFeeType;
|
|
629
|
+
sufficient?: boolean;
|
|
630
|
+
dryRunError?: string;
|
|
631
|
+
forwardedXcms?: any;
|
|
632
|
+
destParaId?: number;
|
|
633
|
+
/** @deprecated Use `asset` property instead. */
|
|
634
|
+
currency: string;
|
|
635
|
+
asset: TAssetInfo;
|
|
636
|
+
};
|
|
637
|
+
type TConditionalXcmFeeDetail<TDisableFallback extends boolean> = TDisableFallback extends false ? TXcmFeeDetailWithFallback : TXcmFeeDetail;
|
|
638
|
+
type TDestXcmFeeDetail<TDisableFallback extends boolean> = Omit<TConditionalXcmFeeDetail<TDisableFallback>, 'currency'> & {
|
|
639
|
+
forwardedXcms?: any;
|
|
640
|
+
destParaId?: number;
|
|
641
|
+
};
|
|
642
|
+
type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
|
|
643
|
+
chain: TChain;
|
|
644
|
+
result: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
645
|
+
};
|
|
646
|
+
type TXcmFeeChain = 'origin' | 'destination' | 'assetHub' | 'bridgeHub' | TChain;
|
|
647
|
+
type TXcmFeeHopInfo = {
|
|
648
|
+
chain: TChain;
|
|
649
|
+
result: TXcmFeeDetail;
|
|
650
|
+
};
|
|
651
|
+
type TGetXcmFeeResult<TDisableFallback extends boolean = boolean> = {
|
|
652
|
+
failureReason?: string;
|
|
653
|
+
failureChain?: TXcmFeeChain;
|
|
654
|
+
origin: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
655
|
+
destination: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
656
|
+
assetHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
657
|
+
bridgeHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
658
|
+
hops: TConditionalXcmFeeHopInfo<TDisableFallback>[];
|
|
659
|
+
};
|
|
660
|
+
type TGetXcmFeeEstimateDetail = {
|
|
661
|
+
fee: bigint;
|
|
662
|
+
/** @deprecated Use `asset` property instead. */
|
|
663
|
+
currency: string;
|
|
664
|
+
asset: TAssetInfo;
|
|
665
|
+
sufficient?: boolean;
|
|
666
|
+
};
|
|
667
|
+
type TGetXcmFeeEstimateResult = {
|
|
668
|
+
origin: TGetXcmFeeEstimateDetail;
|
|
669
|
+
destination: TGetXcmFeeEstimateDetail;
|
|
670
|
+
};
|
|
671
|
+
|
|
536
672
|
/**
|
|
537
673
|
* Retrieves the native asset balance for a given account on a specified chain.
|
|
538
674
|
*/
|
|
@@ -644,7 +780,7 @@ type TGetTransferableAmountOptionsBase<TRes> = {
|
|
|
644
780
|
/**
|
|
645
781
|
* The transactions
|
|
646
782
|
*/
|
|
647
|
-
|
|
783
|
+
buildTx: TTxFactory<TRes>;
|
|
648
784
|
feeAsset?: TCurrencyInput;
|
|
649
785
|
};
|
|
650
786
|
type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes>;
|
|
@@ -676,7 +812,7 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
|
676
812
|
/**
|
|
677
813
|
* The transactions
|
|
678
814
|
*/
|
|
679
|
-
|
|
815
|
+
buildTx: TTxFactory<TRes>;
|
|
680
816
|
feeAsset?: TCurrencyInput;
|
|
681
817
|
};
|
|
682
818
|
type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes>;
|
|
@@ -1144,147 +1280,6 @@ declare class UnableToComputeError extends Error {
|
|
|
1144
1280
|
constructor(message: string);
|
|
1145
1281
|
}
|
|
1146
1282
|
|
|
1147
|
-
type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
1148
|
-
/**
|
|
1149
|
-
* The transactions
|
|
1150
|
-
*/
|
|
1151
|
-
txs: TTxPair<TRes>;
|
|
1152
|
-
/**
|
|
1153
|
-
* The origin chain
|
|
1154
|
-
*/
|
|
1155
|
-
origin: TSubstrateChain;
|
|
1156
|
-
/**
|
|
1157
|
-
* The destination chain
|
|
1158
|
-
*/
|
|
1159
|
-
destination: TChain;
|
|
1160
|
-
/**
|
|
1161
|
-
* The sender address
|
|
1162
|
-
*/
|
|
1163
|
-
senderAddress: string;
|
|
1164
|
-
address: string;
|
|
1165
|
-
currency: WithAmount<TCurrencyCore>;
|
|
1166
|
-
feeAsset?: TCurrencyInput;
|
|
1167
|
-
disableFallback: TDisableFallback;
|
|
1168
|
-
swapConfig?: TSwapConfig;
|
|
1169
|
-
};
|
|
1170
|
-
type TGetXcmFeeOptions<TApi, TRes, TDisableFallback extends boolean = boolean> = WithApi<TGetXcmFeeBaseOptions<TRes, TDisableFallback>, TApi, TRes>;
|
|
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'>;
|
|
1177
|
-
type TGetXcmFeeBuilderOptions = {
|
|
1178
|
-
disableFallback: boolean;
|
|
1179
|
-
};
|
|
1180
|
-
type TGetOriginXcmFeeBaseOptions<TRes> = {
|
|
1181
|
-
txs: {
|
|
1182
|
-
tx: TRes;
|
|
1183
|
-
txBypass: TRes;
|
|
1184
|
-
};
|
|
1185
|
-
origin: TSubstrateChain;
|
|
1186
|
-
destination: TChain;
|
|
1187
|
-
senderAddress: string;
|
|
1188
|
-
currency: WithAmount<TCurrencyCore>;
|
|
1189
|
-
feeAsset?: TCurrencyInput;
|
|
1190
|
-
disableFallback: boolean;
|
|
1191
|
-
useRootOrigin?: boolean;
|
|
1192
|
-
};
|
|
1193
|
-
type TGetOriginXcmFeeOptions<TApi, TRes> = WithApi<TGetOriginXcmFeeBaseOptions<TRes>, TApi, TRes>;
|
|
1194
|
-
type TGetOriginXcmFeeInternalOptions<TApi, TRes> = Omit<TGetOriginXcmFeeOptions<TApi, TRes>, 'txs'> & {
|
|
1195
|
-
tx: TRes;
|
|
1196
|
-
};
|
|
1197
|
-
type TSwapConfig = {
|
|
1198
|
-
currencyTo: TCurrencyCore;
|
|
1199
|
-
amountOut: bigint;
|
|
1200
|
-
exchangeChain: TParachain;
|
|
1201
|
-
};
|
|
1202
|
-
type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
1203
|
-
prevChain: TSubstrateChain;
|
|
1204
|
-
origin: TSubstrateChain;
|
|
1205
|
-
destination: TChain;
|
|
1206
|
-
senderAddress: string;
|
|
1207
|
-
address: string;
|
|
1208
|
-
currency: WithAmount<TCurrencyCore>;
|
|
1209
|
-
forwardedXcms: any;
|
|
1210
|
-
tx: TRes;
|
|
1211
|
-
asset: TAssetInfo;
|
|
1212
|
-
originFee: bigint;
|
|
1213
|
-
feeAsset?: TCurrencyInput;
|
|
1214
|
-
disableFallback: boolean;
|
|
1215
|
-
swapConfig?: TSwapConfig;
|
|
1216
|
-
};
|
|
1217
|
-
type TGetFeeForDestChainOptions<TApi, TRes> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes>;
|
|
1218
|
-
type TGetReverseTxFeeOptions<TApi, TRes> = Omit<TGetFeeForDestChainOptions<TApi, TRes>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain'> & {
|
|
1219
|
-
destination: TSubstrateChain;
|
|
1220
|
-
};
|
|
1221
|
-
type THubKey = 'assetHub' | 'bridgeHub';
|
|
1222
|
-
type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
|
|
1223
|
-
type TXcmFeeBase$1 = {
|
|
1224
|
-
/** @deprecated Use `asset` property instead. */
|
|
1225
|
-
currency: string;
|
|
1226
|
-
asset: TAssetInfo;
|
|
1227
|
-
weight?: TWeight;
|
|
1228
|
-
sufficient?: boolean;
|
|
1229
|
-
};
|
|
1230
|
-
type TXcmFeeDetailSuccess = TXcmFeeBase$1 & {
|
|
1231
|
-
fee: bigint;
|
|
1232
|
-
feeType: TFeeType;
|
|
1233
|
-
dryRunError?: string;
|
|
1234
|
-
};
|
|
1235
|
-
type TXcmFeeDetailWithFallback = TXcmFeeDetailSuccess;
|
|
1236
|
-
type TXcmFeeDetailError = TXcmFeeBase$1 & {
|
|
1237
|
-
fee?: bigint;
|
|
1238
|
-
feeType?: TFeeType;
|
|
1239
|
-
dryRunError: string;
|
|
1240
|
-
};
|
|
1241
|
-
type TXcmFeeDetail = TXcmFeeDetailSuccess | TXcmFeeDetailError;
|
|
1242
|
-
type TXcmFeeHopResult = {
|
|
1243
|
-
fee?: bigint;
|
|
1244
|
-
feeType?: TFeeType;
|
|
1245
|
-
sufficient?: boolean;
|
|
1246
|
-
dryRunError?: string;
|
|
1247
|
-
forwardedXcms?: any;
|
|
1248
|
-
destParaId?: number;
|
|
1249
|
-
/** @deprecated Use `asset` property instead. */
|
|
1250
|
-
currency: string;
|
|
1251
|
-
asset: TAssetInfo;
|
|
1252
|
-
};
|
|
1253
|
-
type TConditionalXcmFeeDetail<TDisableFallback extends boolean> = TDisableFallback extends false ? TXcmFeeDetailWithFallback : TXcmFeeDetail;
|
|
1254
|
-
type TDestXcmFeeDetail<TDisableFallback extends boolean> = Omit<TConditionalXcmFeeDetail<TDisableFallback>, 'currency'> & {
|
|
1255
|
-
forwardedXcms?: any;
|
|
1256
|
-
destParaId?: number;
|
|
1257
|
-
};
|
|
1258
|
-
type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
|
|
1259
|
-
chain: TChain;
|
|
1260
|
-
result: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1261
|
-
};
|
|
1262
|
-
type TXcmFeeChain = 'origin' | 'destination' | 'assetHub' | 'bridgeHub' | TChain;
|
|
1263
|
-
type TXcmFeeHopInfo = {
|
|
1264
|
-
chain: TChain;
|
|
1265
|
-
result: TXcmFeeDetail;
|
|
1266
|
-
};
|
|
1267
|
-
type TGetXcmFeeResult<TDisableFallback extends boolean = boolean> = {
|
|
1268
|
-
failureReason?: string;
|
|
1269
|
-
failureChain?: TXcmFeeChain;
|
|
1270
|
-
origin: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1271
|
-
destination: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1272
|
-
assetHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1273
|
-
bridgeHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1274
|
-
hops: TConditionalXcmFeeHopInfo<TDisableFallback>[];
|
|
1275
|
-
};
|
|
1276
|
-
type TGetXcmFeeEstimateDetail = {
|
|
1277
|
-
fee: bigint;
|
|
1278
|
-
/** @deprecated Use `asset` property instead. */
|
|
1279
|
-
currency: string;
|
|
1280
|
-
asset: TAssetInfo;
|
|
1281
|
-
sufficient?: boolean;
|
|
1282
|
-
};
|
|
1283
|
-
type TGetXcmFeeEstimateResult = {
|
|
1284
|
-
origin: TGetXcmFeeEstimateDetail;
|
|
1285
|
-
destination: TGetXcmFeeEstimateDetail;
|
|
1286
|
-
};
|
|
1287
|
-
|
|
1288
1283
|
type THopTransferInfo = {
|
|
1289
1284
|
chain: TChain;
|
|
1290
1285
|
result: {
|
|
@@ -1385,7 +1380,7 @@ type TOriginFeeDetails = {
|
|
|
1385
1380
|
xcmFee: bigint;
|
|
1386
1381
|
};
|
|
1387
1382
|
type TGetTransferInfoOptionsBase<TRes> = {
|
|
1388
|
-
|
|
1383
|
+
buildTx: TTxFactory<TRes>;
|
|
1389
1384
|
origin: TSubstrateChain;
|
|
1390
1385
|
destination: TChain;
|
|
1391
1386
|
senderAddress: string;
|
|
@@ -1431,7 +1426,7 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
1431
1426
|
calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
|
|
1432
1427
|
quoteAhPrice(fromMl: TLocation, toMl: TLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
|
|
1433
1428
|
getXcmWeight(xcm: any): Promise<TWeight>;
|
|
1434
|
-
getXcmPaymentApiFee(chain: TSubstrateChain,
|
|
1429
|
+
getXcmPaymentApiFee(chain: TSubstrateChain, localXcm: any, forwardedXcm: any, asset: TAssetInfo, transformXcm: boolean): Promise<bigint>;
|
|
1435
1430
|
getEvmStorage(contract: string, slot: string): Promise<string>;
|
|
1436
1431
|
getBalanceNative(address: string): Promise<bigint>;
|
|
1437
1432
|
getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
|
|
@@ -2140,7 +2135,7 @@ declare const transferMoonbeamEvm: <TApi, TRes>({ api, from, to, signer, address
|
|
|
2140
2135
|
declare const transferMoonbeamToEth: <TApi, TRes>({ api, from, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<`0x${string}`>;
|
|
2141
2136
|
|
|
2142
2137
|
declare const getOriginXcmFee: <TApi, TRes>(options: TGetOriginXcmFeeOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
|
|
2143
|
-
forwardedXcms?:
|
|
2138
|
+
forwardedXcms?: unknown;
|
|
2144
2139
|
destParaId?: number;
|
|
2145
2140
|
}>;
|
|
2146
2141
|
|
|
@@ -2161,12 +2156,12 @@ declare const getBridgeStatus: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => Pr
|
|
|
2161
2156
|
|
|
2162
2157
|
declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
|
|
2163
2158
|
|
|
2164
|
-
declare const getTransferInfo: <TApi, TRes>({ api,
|
|
2159
|
+
declare const getTransferInfo: <TApi, TRes>({ api, buildTx, origin, destination, senderAddress, ahAddress, address, currency, feeAsset }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
|
|
2165
2160
|
|
|
2166
|
-
declare const getMinTransferableAmountInternal: <TApi, TRes>({ api, origin, senderAddress, address, origin: chain, destination, currency, feeAsset,
|
|
2161
|
+
declare const getMinTransferableAmountInternal: <TApi, TRes>({ api, origin, senderAddress, address, origin: chain, destination, currency, feeAsset, buildTx, builder }: TGetMinTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2167
2162
|
declare const getMinTransferableAmount: <TApi, TRes>(options: TGetMinTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2168
2163
|
|
|
2169
|
-
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: chain, destination, currency,
|
|
2164
|
+
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: chain, destination, currency, buildTx, feeAsset }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2170
2165
|
declare const getTransferableAmount: <TApi, TRes>(options: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2171
2166
|
|
|
2172
2167
|
declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
|
|
@@ -2195,12 +2190,9 @@ declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAss
|
|
|
2195
2190
|
|
|
2196
2191
|
declare const sortAssets: (assets: TAsset[]) => TAsset[];
|
|
2197
2192
|
|
|
2198
|
-
declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes
|
|
2199
|
-
declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress
|
|
2200
|
-
declare const
|
|
2201
|
-
tx: Awaited<TRes>;
|
|
2202
|
-
txBypass: Awaited<TRes>;
|
|
2203
|
-
}>;
|
|
2193
|
+
declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, increaseAmount: string) => bigint;
|
|
2194
|
+
declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, amount: string) => Promise<TRes>;
|
|
2195
|
+
declare const createTx: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, amount: string | undefined) => Promise<TRes>;
|
|
2204
2196
|
|
|
2205
2197
|
declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
|
|
2206
2198
|
|
|
@@ -2216,7 +2208,7 @@ declare const getRelayChainOf: (chain: TSubstrateChain) => TRelaychain;
|
|
|
2216
2208
|
|
|
2217
2209
|
declare const createChainClient: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, chain: TSubstrateChain) => Promise<TApi>;
|
|
2218
2210
|
|
|
2219
|
-
declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain,
|
|
2211
|
+
declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain, executionFee: bigint, isFeeAsset?: boolean) => bigint;
|
|
2220
2212
|
|
|
2221
2213
|
declare const computeFeeFromDryRunPjs: (dryRun: any, chain: TSubstrateChain, executionFee: bigint) => bigint;
|
|
2222
2214
|
|
|
@@ -2289,5 +2281,5 @@ declare const handleToAhTeleport: <TApi, TRes>(origin: TParachain, input: TPolka
|
|
|
2289
2281
|
|
|
2290
2282
|
declare const validateAddress: (address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2291
2283
|
|
|
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,
|
|
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,
|
|
2284
|
+
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, createTx, 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 };
|
|
2285
|
+
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, TTxFactory, 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 };
|