@paraspell/sdk-core 11.8.0 → 11.8.1
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 +352 -249
- package/dist/index.d.ts +154 -163
- package/dist/index.mjs +352 -249
- 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,145 @@ 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
|
+
swapConfig?: TSwapConfig;
|
|
599
|
+
};
|
|
600
|
+
type TGetFeeForDestChainOptions<TApi, TRes> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes>;
|
|
601
|
+
type TGetReverseTxFeeOptions<TApi, TRes> = Omit<TGetFeeForDestChainOptions<TApi, TRes>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain'> & {
|
|
602
|
+
destination: TSubstrateChain;
|
|
603
|
+
};
|
|
604
|
+
type THubKey = 'assetHub' | 'bridgeHub';
|
|
605
|
+
type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
|
|
606
|
+
type TXcmFeeBase$1 = {
|
|
607
|
+
/** @deprecated Use `asset` property instead. */
|
|
608
|
+
currency: string;
|
|
609
|
+
asset: TAssetInfo;
|
|
610
|
+
weight?: TWeight;
|
|
611
|
+
sufficient?: boolean;
|
|
612
|
+
};
|
|
613
|
+
type TXcmFeeDetailSuccess = TXcmFeeBase$1 & {
|
|
614
|
+
fee: bigint;
|
|
615
|
+
feeType: TFeeType;
|
|
616
|
+
dryRunError?: string;
|
|
617
|
+
};
|
|
618
|
+
type TXcmFeeDetailWithFallback = TXcmFeeDetailSuccess;
|
|
619
|
+
type TXcmFeeDetailError = TXcmFeeBase$1 & {
|
|
620
|
+
fee?: bigint;
|
|
621
|
+
feeType?: TFeeType;
|
|
622
|
+
dryRunError: string;
|
|
623
|
+
};
|
|
624
|
+
type TXcmFeeDetail = TXcmFeeDetailSuccess | TXcmFeeDetailError;
|
|
625
|
+
type TXcmFeeHopResult = {
|
|
626
|
+
fee?: bigint;
|
|
627
|
+
feeType?: TFeeType;
|
|
628
|
+
sufficient?: boolean;
|
|
629
|
+
dryRunError?: string;
|
|
630
|
+
forwardedXcms?: any;
|
|
631
|
+
destParaId?: number;
|
|
632
|
+
/** @deprecated Use `asset` property instead. */
|
|
633
|
+
currency: string;
|
|
634
|
+
asset: TAssetInfo;
|
|
635
|
+
};
|
|
636
|
+
type TConditionalXcmFeeDetail<TDisableFallback extends boolean> = TDisableFallback extends false ? TXcmFeeDetailWithFallback : TXcmFeeDetail;
|
|
637
|
+
type TDestXcmFeeDetail<TDisableFallback extends boolean> = Omit<TConditionalXcmFeeDetail<TDisableFallback>, 'currency'> & {
|
|
638
|
+
forwardedXcms?: any;
|
|
639
|
+
destParaId?: number;
|
|
640
|
+
};
|
|
641
|
+
type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
|
|
642
|
+
chain: TChain;
|
|
643
|
+
result: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
644
|
+
};
|
|
645
|
+
type TXcmFeeChain = 'origin' | 'destination' | 'assetHub' | 'bridgeHub' | TChain;
|
|
646
|
+
type TXcmFeeHopInfo = {
|
|
647
|
+
chain: TChain;
|
|
648
|
+
result: TXcmFeeDetail;
|
|
649
|
+
};
|
|
650
|
+
type TGetXcmFeeResult<TDisableFallback extends boolean = boolean> = {
|
|
651
|
+
failureReason?: string;
|
|
652
|
+
failureChain?: TXcmFeeChain;
|
|
653
|
+
origin: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
654
|
+
destination: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
655
|
+
assetHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
656
|
+
bridgeHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
657
|
+
hops: TConditionalXcmFeeHopInfo<TDisableFallback>[];
|
|
658
|
+
};
|
|
659
|
+
type TGetXcmFeeEstimateDetail = {
|
|
660
|
+
fee: bigint;
|
|
661
|
+
/** @deprecated Use `asset` property instead. */
|
|
662
|
+
currency: string;
|
|
663
|
+
asset: TAssetInfo;
|
|
664
|
+
sufficient?: boolean;
|
|
665
|
+
};
|
|
666
|
+
type TGetXcmFeeEstimateResult = {
|
|
667
|
+
origin: TGetXcmFeeEstimateDetail;
|
|
668
|
+
destination: TGetXcmFeeEstimateDetail;
|
|
669
|
+
};
|
|
670
|
+
|
|
536
671
|
/**
|
|
537
672
|
* Retrieves the native asset balance for a given account on a specified chain.
|
|
538
673
|
*/
|
|
@@ -644,7 +779,7 @@ type TGetTransferableAmountOptionsBase<TRes> = {
|
|
|
644
779
|
/**
|
|
645
780
|
* The transactions
|
|
646
781
|
*/
|
|
647
|
-
|
|
782
|
+
buildTx: TTxFactory<TRes>;
|
|
648
783
|
feeAsset?: TCurrencyInput;
|
|
649
784
|
};
|
|
650
785
|
type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes>;
|
|
@@ -676,7 +811,7 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
|
676
811
|
/**
|
|
677
812
|
* The transactions
|
|
678
813
|
*/
|
|
679
|
-
|
|
814
|
+
buildTx: TTxFactory<TRes>;
|
|
680
815
|
feeAsset?: TCurrencyInput;
|
|
681
816
|
};
|
|
682
817
|
type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes>;
|
|
@@ -1144,147 +1279,6 @@ declare class UnableToComputeError extends Error {
|
|
|
1144
1279
|
constructor(message: string);
|
|
1145
1280
|
}
|
|
1146
1281
|
|
|
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
1282
|
type THopTransferInfo = {
|
|
1289
1283
|
chain: TChain;
|
|
1290
1284
|
result: {
|
|
@@ -1385,7 +1379,7 @@ type TOriginFeeDetails = {
|
|
|
1385
1379
|
xcmFee: bigint;
|
|
1386
1380
|
};
|
|
1387
1381
|
type TGetTransferInfoOptionsBase<TRes> = {
|
|
1388
|
-
|
|
1382
|
+
buildTx: TTxFactory<TRes>;
|
|
1389
1383
|
origin: TSubstrateChain;
|
|
1390
1384
|
destination: TChain;
|
|
1391
1385
|
senderAddress: string;
|
|
@@ -2140,7 +2134,7 @@ declare const transferMoonbeamEvm: <TApi, TRes>({ api, from, to, signer, address
|
|
|
2140
2134
|
declare const transferMoonbeamToEth: <TApi, TRes>({ api, from, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<`0x${string}`>;
|
|
2141
2135
|
|
|
2142
2136
|
declare const getOriginXcmFee: <TApi, TRes>(options: TGetOriginXcmFeeOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
|
|
2143
|
-
forwardedXcms?:
|
|
2137
|
+
forwardedXcms?: unknown;
|
|
2144
2138
|
destParaId?: number;
|
|
2145
2139
|
}>;
|
|
2146
2140
|
|
|
@@ -2161,12 +2155,12 @@ declare const getBridgeStatus: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => Pr
|
|
|
2161
2155
|
|
|
2162
2156
|
declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
|
|
2163
2157
|
|
|
2164
|
-
declare const getTransferInfo: <TApi, TRes>({ api,
|
|
2158
|
+
declare const getTransferInfo: <TApi, TRes>({ api, buildTx, origin, destination, senderAddress, ahAddress, address, currency, feeAsset }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
|
|
2165
2159
|
|
|
2166
|
-
declare const getMinTransferableAmountInternal: <TApi, TRes>({ api, origin, senderAddress, address, origin: chain, destination, currency, feeAsset,
|
|
2160
|
+
declare const getMinTransferableAmountInternal: <TApi, TRes>({ api, origin, senderAddress, address, origin: chain, destination, currency, feeAsset, buildTx, builder }: TGetMinTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2167
2161
|
declare const getMinTransferableAmount: <TApi, TRes>(options: TGetMinTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2168
2162
|
|
|
2169
|
-
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: chain, destination, currency,
|
|
2163
|
+
declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: chain, destination, currency, buildTx, feeAsset }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2170
2164
|
declare const getTransferableAmount: <TApi, TRes>(options: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
|
|
2171
2165
|
|
|
2172
2166
|
declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
|
|
@@ -2195,12 +2189,9 @@ declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAss
|
|
|
2195
2189
|
|
|
2196
2190
|
declare const sortAssets: (assets: TAsset[]) => TAsset[];
|
|
2197
2191
|
|
|
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
|
-
}>;
|
|
2192
|
+
declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, increaseAmount: string) => bigint;
|
|
2193
|
+
declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, amount: string) => Promise<TRes>;
|
|
2194
|
+
declare const createTx: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, amount: string | undefined) => Promise<TRes>;
|
|
2204
2195
|
|
|
2205
2196
|
declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
|
|
2206
2197
|
|
|
@@ -2216,7 +2207,7 @@ declare const getRelayChainOf: (chain: TSubstrateChain) => TRelaychain;
|
|
|
2216
2207
|
|
|
2217
2208
|
declare const createChainClient: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, chain: TSubstrateChain) => Promise<TApi>;
|
|
2218
2209
|
|
|
2219
|
-
declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain,
|
|
2210
|
+
declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain, executionFee: bigint, isFeeAsset?: boolean) => bigint;
|
|
2220
2211
|
|
|
2221
2212
|
declare const computeFeeFromDryRunPjs: (dryRun: any, chain: TSubstrateChain, executionFee: bigint) => bigint;
|
|
2222
2213
|
|
|
@@ -2289,5 +2280,5 @@ declare const handleToAhTeleport: <TApi, TRes>(origin: TParachain, input: TPolka
|
|
|
2289
2280
|
|
|
2290
2281
|
declare const validateAddress: (address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2291
2282
|
|
|
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,
|
|
2283
|
+
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 };
|
|
2284
|
+
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 };
|