@paraspell/sdk-core 11.14.10 → 12.0.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.d.ts +108 -182
- package/dist/index.mjs +478 -540
- package/package.json +5 -5
- package/dist/index.cjs +0 -14338
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
2
2
|
import { TChain, TLocation, TSubstrateChain, Version, TRelaychain, TParachain, TExternalChain, TJunction, TJunctions } from '@paraspell/sdk-common';
|
|
3
3
|
export * from '@paraspell/sdk-common';
|
|
4
|
-
import { TCurrencyInputWithAmount, TCurrencyInput, WithAmount, TAssetInfo, TAsset, TAssetWithFee, WithComplexAmount, TCurrencyCore, TAmount, TAssetWithLocation,
|
|
4
|
+
import { TCurrencyInputWithAmount, TCurrencyInput, WithAmount, TAssetInfo, TAsset, TAssetWithFee, WithComplexAmount, TCurrencyCore, TAmount, TAssetWithLocation, TAssetInfoWithId } from '@paraspell/assets';
|
|
5
5
|
export * from '@paraspell/assets';
|
|
6
6
|
import { TPallet, TAssetsPallet } from '@paraspell/pallets';
|
|
7
7
|
export * from '@paraspell/pallets';
|
|
@@ -502,7 +502,13 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
502
502
|
destParaId?: number;
|
|
503
503
|
}>;
|
|
504
504
|
/**
|
|
505
|
-
* Estimates the origin and destination XCM fee using paymentInfo function.
|
|
505
|
+
* Estimates the origin and destination XCM fee using the `paymentInfo` function.
|
|
506
|
+
*
|
|
507
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
508
|
+
* Please use `builder.getXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
509
|
+
* Will be removed in v13.
|
|
510
|
+
* For more details, see the documentation:
|
|
511
|
+
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
506
512
|
*
|
|
507
513
|
* @returns An origin and destination fee estimate.
|
|
508
514
|
*/
|
|
@@ -510,6 +516,12 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
510
516
|
/**
|
|
511
517
|
* Estimates the origin XCM fee using paymentInfo function.
|
|
512
518
|
*
|
|
519
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
520
|
+
* Please use `builder.getOriginXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
521
|
+
* Will be removed in v13.
|
|
522
|
+
* For more details, see the documentation:
|
|
523
|
+
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
524
|
+
*
|
|
513
525
|
* @returns An origin fee estimate.
|
|
514
526
|
*/
|
|
515
527
|
getOriginXcmFeeEstimate(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TGetXcmFeeEstimateDetail>;
|
|
@@ -632,8 +644,6 @@ type TDryRunXcmBaseOptions<TRes> = {
|
|
|
632
644
|
};
|
|
633
645
|
type TDryRunXcmOptions<TApi, TRes> = WithApi<TDryRunXcmBaseOptions<TRes>, TApi, TRes>;
|
|
634
646
|
type TDryRunResBase = {
|
|
635
|
-
/** @deprecated Use `asset` property instead. */
|
|
636
|
-
currency: string;
|
|
637
647
|
asset: TAssetInfo;
|
|
638
648
|
};
|
|
639
649
|
type TDryRunChainSuccess = TDryRunResBase & {
|
|
@@ -653,15 +663,13 @@ type THopInfo = {
|
|
|
653
663
|
chain: TChain;
|
|
654
664
|
result: TDryRunChainResult;
|
|
655
665
|
};
|
|
656
|
-
type
|
|
666
|
+
type TChainEndpoint = 'origin' | 'destination' | TChain;
|
|
657
667
|
type TDryRunResult = {
|
|
658
668
|
failureReason?: string;
|
|
659
669
|
failureSubReason?: string;
|
|
660
|
-
failureChain?:
|
|
670
|
+
failureChain?: TChainEndpoint;
|
|
661
671
|
origin: TDryRunChainResult;
|
|
662
672
|
destination?: TDryRunChainResult;
|
|
663
|
-
assetHub?: TDryRunChainResult;
|
|
664
|
-
bridgeHub?: TDryRunChainResult;
|
|
665
673
|
hops: THopInfo[];
|
|
666
674
|
};
|
|
667
675
|
type TResolveHopParams<TApi, TRes> = {
|
|
@@ -683,8 +691,6 @@ type HopProcessParams<TApi, TRes> = {
|
|
|
683
691
|
forwardedXcms: any;
|
|
684
692
|
hasPassedExchange: boolean;
|
|
685
693
|
isDestination: boolean;
|
|
686
|
-
isAssetHub: boolean;
|
|
687
|
-
isBridgeHub: boolean;
|
|
688
694
|
};
|
|
689
695
|
type HopTraversalConfig<TApi, TRes, THopResult> = {
|
|
690
696
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -706,8 +712,6 @@ type HopTraversalResult<THopResult> = {
|
|
|
706
712
|
chain: TSubstrateChain;
|
|
707
713
|
result: THopResult;
|
|
708
714
|
}>;
|
|
709
|
-
assetHub?: THopResult;
|
|
710
|
-
bridgeHub?: THopResult;
|
|
711
715
|
destination?: THopResult;
|
|
712
716
|
lastProcessedChain?: TSubstrateChain;
|
|
713
717
|
};
|
|
@@ -893,11 +897,8 @@ type TGetFeeForDestChainOptions<TApi, TRes> = WithApi<TGetFeeForDestChainBaseOpt
|
|
|
893
897
|
type TGetReverseTxFeeOptions<TApi, TRes> = Omit<TGetFeeForDestChainOptions<TApi, TRes>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain'> & {
|
|
894
898
|
destination: TSubstrateChain;
|
|
895
899
|
};
|
|
896
|
-
type THubKey = 'assetHub' | 'bridgeHub';
|
|
897
900
|
type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
|
|
898
901
|
type TXcmFeeBase$1 = {
|
|
899
|
-
/** @deprecated Use `asset` property instead. */
|
|
900
|
-
currency: string;
|
|
901
902
|
asset: TAssetInfo;
|
|
902
903
|
weight?: TWeight;
|
|
903
904
|
sufficient?: boolean;
|
|
@@ -924,8 +925,6 @@ type TXcmFeeHopResult = {
|
|
|
924
925
|
dryRunSubError?: string;
|
|
925
926
|
forwardedXcms?: any;
|
|
926
927
|
destParaId?: number;
|
|
927
|
-
/** @deprecated Use `asset` property instead. */
|
|
928
|
-
currency: string;
|
|
929
928
|
asset: TAssetInfo;
|
|
930
929
|
};
|
|
931
930
|
type TConditionalXcmFeeDetail<TDisableFallback extends boolean> = TDisableFallback extends false ? TXcmFeeDetailWithFallback : TXcmFeeDetail;
|
|
@@ -937,24 +936,19 @@ type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
|
|
|
937
936
|
chain: TChain;
|
|
938
937
|
result: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
939
938
|
};
|
|
940
|
-
type TXcmFeeChain = 'origin' | 'destination' | 'assetHub' | 'bridgeHub' | TChain;
|
|
941
939
|
type TXcmFeeHopInfo = {
|
|
942
940
|
chain: TChain;
|
|
943
941
|
result: TXcmFeeDetail;
|
|
944
942
|
};
|
|
945
943
|
type TGetXcmFeeResult<TDisableFallback extends boolean = boolean> = {
|
|
946
944
|
failureReason?: string;
|
|
947
|
-
failureChain?:
|
|
945
|
+
failureChain?: TChainEndpoint;
|
|
948
946
|
origin: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
949
947
|
destination: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
950
|
-
assetHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
951
|
-
bridgeHub?: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
952
948
|
hops: TConditionalXcmFeeHopInfo<TDisableFallback>[];
|
|
953
949
|
};
|
|
954
950
|
type TGetXcmFeeEstimateDetail = {
|
|
955
951
|
fee: bigint;
|
|
956
|
-
/** @deprecated Use `asset` property instead. */
|
|
957
|
-
currency: string;
|
|
958
952
|
asset: TAssetInfo;
|
|
959
953
|
sufficient?: boolean;
|
|
960
954
|
};
|
|
@@ -963,48 +957,6 @@ type TGetXcmFeeEstimateResult = {
|
|
|
963
957
|
destination: TGetXcmFeeEstimateDetail;
|
|
964
958
|
};
|
|
965
959
|
|
|
966
|
-
/**
|
|
967
|
-
* Retrieves the native asset balance for a given account on a specified chain.
|
|
968
|
-
*/
|
|
969
|
-
type TGetBalanceNativeOptionsBase = {
|
|
970
|
-
/**
|
|
971
|
-
* The address of the account.
|
|
972
|
-
*/
|
|
973
|
-
address: string;
|
|
974
|
-
/**
|
|
975
|
-
* The chain on which to query the balance.
|
|
976
|
-
*/
|
|
977
|
-
chain: TChain;
|
|
978
|
-
/**
|
|
979
|
-
* The native currency to query.
|
|
980
|
-
*/
|
|
981
|
-
currency?: {
|
|
982
|
-
symbol: string;
|
|
983
|
-
};
|
|
984
|
-
};
|
|
985
|
-
type TGetBalanceNativeOptions<TApi, TRes> = WithApi<TGetBalanceNativeOptionsBase, TApi, TRes>;
|
|
986
|
-
/**
|
|
987
|
-
* Retrieves the balance of a foreign asset for a given account on a specified chain.
|
|
988
|
-
*/
|
|
989
|
-
type TGetBalanceForeignOptionsBase = {
|
|
990
|
-
address: string;
|
|
991
|
-
/**
|
|
992
|
-
* The chain on which to query the balance.
|
|
993
|
-
*/
|
|
994
|
-
chain: TSubstrateChain;
|
|
995
|
-
};
|
|
996
|
-
type TGetBalanceForeignOptions<TApi, TRes> = WithApi<TGetBalanceForeignOptionsBase & {
|
|
997
|
-
/**
|
|
998
|
-
* The currency to query.
|
|
999
|
-
*/
|
|
1000
|
-
currency: TCurrencyCore;
|
|
1001
|
-
}, TApi, TRes>;
|
|
1002
|
-
type TGetBalanceForeignByAssetOptions<TApi, TRes> = WithApi<TGetBalanceForeignOptionsBase & {
|
|
1003
|
-
/**
|
|
1004
|
-
* The asset to query balance for.
|
|
1005
|
-
*/
|
|
1006
|
-
asset: TAssetInfo;
|
|
1007
|
-
}, TApi, TRes>;
|
|
1008
960
|
type TGetBalanceCommonOptions = {
|
|
1009
961
|
/**
|
|
1010
962
|
* The address of the account.
|
|
@@ -1031,41 +983,10 @@ type TGetBalanceOptionsBase = TGetBalanceCommonOptions & {
|
|
|
1031
983
|
/**
|
|
1032
984
|
* The currency to query.
|
|
1033
985
|
*/
|
|
1034
|
-
currency
|
|
986
|
+
currency?: TCurrencyCore;
|
|
1035
987
|
};
|
|
1036
988
|
type TGetBalanceOptions<TApi, TRes> = WithApi<TGetBalanceOptionsBase, TApi, TRes>;
|
|
1037
989
|
type TGetAssetBalanceOptions<TApi, TRes> = WithApi<TGetAssetBalanceOptionsBase, TApi, TRes>;
|
|
1038
|
-
type TGetOriginFeeDetailsOptionsBase = {
|
|
1039
|
-
/**
|
|
1040
|
-
* The origin chain.
|
|
1041
|
-
*/
|
|
1042
|
-
origin: TSubstrateChain;
|
|
1043
|
-
/**
|
|
1044
|
-
* The destination chain.
|
|
1045
|
-
*/
|
|
1046
|
-
destination: TChain;
|
|
1047
|
-
/**
|
|
1048
|
-
* The currency to transfer.
|
|
1049
|
-
*/
|
|
1050
|
-
currency: WithComplexAmount<TCurrencyCore>;
|
|
1051
|
-
/**
|
|
1052
|
-
* The origin account.
|
|
1053
|
-
*/
|
|
1054
|
-
account: string;
|
|
1055
|
-
/**
|
|
1056
|
-
* The destination account.
|
|
1057
|
-
*/
|
|
1058
|
-
accountDestination: string;
|
|
1059
|
-
/**
|
|
1060
|
-
* The address of the account.
|
|
1061
|
-
*/
|
|
1062
|
-
ahAddress?: string;
|
|
1063
|
-
/**
|
|
1064
|
-
* The fee margin percentage.
|
|
1065
|
-
*/
|
|
1066
|
-
feeMarginPercentage?: number;
|
|
1067
|
-
};
|
|
1068
|
-
type TGetOriginFeeDetailsOptions<TApi, TRes> = WithApi<TGetOriginFeeDetailsOptionsBase, TApi, TRes>;
|
|
1069
990
|
type TGetTransferableAmountOptionsBase<TRes> = {
|
|
1070
991
|
/**
|
|
1071
992
|
* The sender address of the account.
|
|
@@ -1271,55 +1192,44 @@ declare class AmountTooLowError extends Error {
|
|
|
1271
1192
|
}
|
|
1272
1193
|
|
|
1273
1194
|
/**
|
|
1274
|
-
* Error thrown when
|
|
1195
|
+
* Error thrown when a batch operation is invalid or cannot be executed.
|
|
1275
1196
|
*/
|
|
1276
|
-
declare class
|
|
1277
|
-
|
|
1278
|
-
* Constructs a new BridgeHaltedError.
|
|
1279
|
-
*
|
|
1280
|
-
* @param message - Optional custom error message.
|
|
1281
|
-
*/
|
|
1282
|
-
constructor();
|
|
1197
|
+
declare class BatchValidationError extends Error {
|
|
1198
|
+
constructor(message: string);
|
|
1283
1199
|
}
|
|
1284
1200
|
|
|
1285
1201
|
/**
|
|
1286
|
-
*
|
|
1202
|
+
* Error thrown when the Ethereum bridge is halted.
|
|
1287
1203
|
*/
|
|
1288
|
-
declare class
|
|
1204
|
+
declare class BridgeHaltedError extends Error {
|
|
1289
1205
|
/**
|
|
1290
|
-
* Constructs a new
|
|
1206
|
+
* Constructs a new BridgeHaltedError.
|
|
1291
1207
|
*
|
|
1292
1208
|
* @param message - Optional custom error message.
|
|
1293
1209
|
*/
|
|
1294
|
-
constructor(
|
|
1210
|
+
constructor();
|
|
1295
1211
|
}
|
|
1296
1212
|
|
|
1297
|
-
type TDryRunType = 'origin' | 'destination' | 'assetHub' | 'bridgeHub' | TChain;
|
|
1298
1213
|
/**
|
|
1299
1214
|
* Error thrown when the Dry Run fails.
|
|
1300
1215
|
*/
|
|
1301
1216
|
declare class DryRunFailedError extends Error {
|
|
1302
1217
|
readonly reason: string;
|
|
1303
|
-
readonly dryRunType?:
|
|
1218
|
+
readonly dryRunType?: TChainEndpoint;
|
|
1304
1219
|
/**
|
|
1305
1220
|
* Constructs a new DryRunFailedError.
|
|
1306
1221
|
*
|
|
1307
1222
|
* @param reason - The reason why the dry run failed.
|
|
1308
1223
|
* @param dryRunType - Optional. Specifies if the error is related to the 'origin' or 'destination' dry run.
|
|
1309
1224
|
*/
|
|
1310
|
-
constructor(reason: string, dryRunType?:
|
|
1225
|
+
constructor(reason: string, dryRunType?: TChainEndpoint);
|
|
1311
1226
|
}
|
|
1312
1227
|
|
|
1313
1228
|
/**
|
|
1314
|
-
* Error thrown when
|
|
1229
|
+
* Error thrown when a feature or route is temporarily disabled via configuration or governance.
|
|
1315
1230
|
*/
|
|
1316
|
-
declare class
|
|
1317
|
-
|
|
1318
|
-
* Constructs a new IncompatibleChainsError.
|
|
1319
|
-
*
|
|
1320
|
-
* @param message - Optional custom error message.
|
|
1321
|
-
*/
|
|
1322
|
-
constructor(message?: string);
|
|
1231
|
+
declare class FeatureTemporarilyDisabledError extends Error {
|
|
1232
|
+
constructor(message: string);
|
|
1323
1233
|
}
|
|
1324
1234
|
|
|
1325
1235
|
/**
|
|
@@ -1334,18 +1244,6 @@ declare class InvalidAddressError extends Error {
|
|
|
1334
1244
|
constructor(message: string);
|
|
1335
1245
|
}
|
|
1336
1246
|
|
|
1337
|
-
/**
|
|
1338
|
-
* Error thrown when the Dry Run fails.
|
|
1339
|
-
*/
|
|
1340
|
-
declare class InvalidParameterError extends Error {
|
|
1341
|
-
/**
|
|
1342
|
-
* Constructs a new InvalidParameterError.
|
|
1343
|
-
*
|
|
1344
|
-
* @param message - Required error message.
|
|
1345
|
-
*/
|
|
1346
|
-
constructor(message: string);
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
1247
|
/**
|
|
1350
1248
|
* Error development mode is on and no API override is provided for a specific chain.
|
|
1351
1249
|
*/
|
|
@@ -1358,6 +1256,13 @@ declare class MissingChainApiError extends Error {
|
|
|
1358
1256
|
constructor(chain: TChain);
|
|
1359
1257
|
}
|
|
1360
1258
|
|
|
1259
|
+
/**
|
|
1260
|
+
* Error thrown when a required parameter is missing.
|
|
1261
|
+
*/
|
|
1262
|
+
declare class MissingParameterError extends Error {
|
|
1263
|
+
constructor(parameter: string | string[], message?: string);
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1361
1266
|
/**
|
|
1362
1267
|
* Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
1363
1268
|
*/
|
|
@@ -1371,17 +1276,50 @@ declare class NoXCMSupportImplementedError extends Error {
|
|
|
1371
1276
|
}
|
|
1372
1277
|
|
|
1373
1278
|
/**
|
|
1374
|
-
*
|
|
1279
|
+
* Error thrown when numeric input is invalid or cannot be parsed.
|
|
1280
|
+
*/
|
|
1281
|
+
declare class NumberFormatError extends Error {
|
|
1282
|
+
constructor(message?: string);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Error thrown when asset or currency overrides are invalid or conflicting.
|
|
1287
|
+
*/
|
|
1288
|
+
declare class OverrideConflictError extends Error {
|
|
1289
|
+
constructor(message: string);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* Error thrown when no provider or RPC endpoint is available for the requested chain.
|
|
1294
|
+
*/
|
|
1295
|
+
declare class ProviderUnavailableError extends Error {
|
|
1296
|
+
constructor(message: string);
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Error thrown when routing or path resolution fails.
|
|
1301
|
+
*/
|
|
1302
|
+
declare class RoutingResolutionError extends Error {
|
|
1303
|
+
constructor(message: string);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* Error thrown when a required runtime API is not available on the target chain.
|
|
1308
|
+
*/
|
|
1309
|
+
declare class RuntimeApiUnavailableError extends Error {
|
|
1310
|
+
constructor(chain: string, apiName: string);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
type TScenarioNotSupportedContext = {
|
|
1314
|
+
chain: TChain;
|
|
1315
|
+
scenario: TScenario;
|
|
1316
|
+
};
|
|
1317
|
+
/**
|
|
1318
|
+
* Error thrown when a scenario, route, or chain capability is not supported.
|
|
1375
1319
|
*/
|
|
1376
1320
|
declare class ScenarioNotSupportedError extends Error {
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
*
|
|
1380
|
-
* @param chain - The chain where the scenario is not supported.
|
|
1381
|
-
* @param scenario - The scenario that is not supported.
|
|
1382
|
-
* @param message - Optional custom error message.
|
|
1383
|
-
*/
|
|
1384
|
-
constructor(chain: TChain, scenario: TScenario, message?: string);
|
|
1321
|
+
constructor(message: string);
|
|
1322
|
+
constructor({ chain, scenario }: TScenarioNotSupportedContext);
|
|
1385
1323
|
}
|
|
1386
1324
|
|
|
1387
1325
|
declare class TransferToAhNotSupported extends Error {
|
|
@@ -1400,20 +1338,22 @@ declare class UnableToComputeError extends Error {
|
|
|
1400
1338
|
constructor(message: string);
|
|
1401
1339
|
}
|
|
1402
1340
|
|
|
1341
|
+
/**
|
|
1342
|
+
* Error thrown when an operation or parameter combination is not supported.
|
|
1343
|
+
*/
|
|
1344
|
+
declare class UnsupportedOperationError extends Error {
|
|
1345
|
+
constructor(message: string);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1403
1348
|
type THopTransferInfo = {
|
|
1404
1349
|
chain: TChain;
|
|
1405
1350
|
result: {
|
|
1406
1351
|
xcmFee: TXcmFeeBase;
|
|
1407
|
-
existentialDeposit: bigint;
|
|
1408
|
-
/** @deprecated use `asset` property instead */
|
|
1409
|
-
currencySymbol: string;
|
|
1410
1352
|
asset: TAssetInfo;
|
|
1411
1353
|
};
|
|
1412
1354
|
};
|
|
1413
1355
|
type TXcmFeeBase = {
|
|
1414
1356
|
fee: bigint;
|
|
1415
|
-
/** @deprecated use `asset` property instead */
|
|
1416
|
-
currencySymbol: string;
|
|
1417
1357
|
asset: TAssetInfo;
|
|
1418
1358
|
};
|
|
1419
1359
|
type TTransferInfo = {
|
|
@@ -1427,10 +1367,7 @@ type TTransferInfo = {
|
|
|
1427
1367
|
sufficient: boolean;
|
|
1428
1368
|
balance: bigint;
|
|
1429
1369
|
balanceAfter: bigint;
|
|
1430
|
-
/** @deprecated use `asset` property instead */
|
|
1431
|
-
currencySymbol: string;
|
|
1432
1370
|
asset: TAssetInfo;
|
|
1433
|
-
existentialDeposit: bigint;
|
|
1434
1371
|
};
|
|
1435
1372
|
xcmFee: TXcmFeeBase & {
|
|
1436
1373
|
sufficient: boolean;
|
|
@@ -1438,30 +1375,14 @@ type TTransferInfo = {
|
|
|
1438
1375
|
balanceAfter: bigint;
|
|
1439
1376
|
};
|
|
1440
1377
|
};
|
|
1441
|
-
|
|
1442
|
-
/** @deprecated use `asset` property instead */
|
|
1443
|
-
currencySymbol: string;
|
|
1444
|
-
asset: TAssetInfo;
|
|
1445
|
-
existentialDeposit: bigint;
|
|
1446
|
-
xcmFee: TXcmFeeBase;
|
|
1447
|
-
};
|
|
1448
|
-
bridgeHub?: {
|
|
1449
|
-
/** @deprecated use `asset` property instead */
|
|
1450
|
-
currencySymbol: string;
|
|
1451
|
-
asset: TAssetInfo;
|
|
1452
|
-
xcmFee: TXcmFeeBase;
|
|
1453
|
-
};
|
|
1454
|
-
hops?: THopTransferInfo[];
|
|
1378
|
+
hops: THopTransferInfo[];
|
|
1455
1379
|
destination: {
|
|
1456
1380
|
receivedCurrency: {
|
|
1457
1381
|
sufficient: boolean | UnableToComputeError;
|
|
1458
1382
|
receivedAmount: bigint | UnableToComputeError;
|
|
1459
1383
|
balance: bigint;
|
|
1460
1384
|
balanceAfter: bigint | UnableToComputeError;
|
|
1461
|
-
/** @deprecated use `asset` property instead */
|
|
1462
|
-
currencySymbol: string;
|
|
1463
1385
|
asset: TAssetInfo;
|
|
1464
|
-
existentialDeposit: bigint;
|
|
1465
1386
|
};
|
|
1466
1387
|
xcmFee: TXcmFeeBase & {
|
|
1467
1388
|
balanceAfter: bigint | UnableToComputeError;
|
|
@@ -1471,10 +1392,7 @@ type TTransferInfo = {
|
|
|
1471
1392
|
type BuildHopInfoOptions<TApi, TRes> = {
|
|
1472
1393
|
api: IPolkadotApi<TApi, TRes>;
|
|
1473
1394
|
chain: TSubstrateChain;
|
|
1474
|
-
|
|
1475
|
-
fee: bigint;
|
|
1476
|
-
currency: string;
|
|
1477
|
-
};
|
|
1395
|
+
fee: bigint;
|
|
1478
1396
|
originChain: TSubstrateChain;
|
|
1479
1397
|
currency: TCurrencyCore;
|
|
1480
1398
|
asset: TAssetInfo;
|
|
@@ -1574,8 +1492,6 @@ declare const getAssetBalanceInternal: <TApi, TRes>({ api, address, chain, asset
|
|
|
1574
1492
|
declare const getBalanceInternal: <TApi, TRes>(options: TGetBalanceOptions<TApi, TRes>) => Promise<bigint>;
|
|
1575
1493
|
declare const getBalance: <TApi, TRes>(options: TGetBalanceOptions<TApi, TRes>) => Promise<bigint>;
|
|
1576
1494
|
|
|
1577
|
-
declare const getBalanceNative: <TApi, TRes>(options: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
|
|
1578
|
-
|
|
1579
1495
|
declare const getEthErc20Balance: (asset: TAssetInfo, address: string) => Promise<bigint>;
|
|
1580
1496
|
|
|
1581
1497
|
declare const getMoonbeamErc20Balance: (chain: TSubstrateChain, assetId: string, address: string) => Promise<bigint>;
|
|
@@ -1921,11 +1837,11 @@ declare class Jamton<TApi, TRes> extends Parachain<TApi, TRes> implements IXToke
|
|
|
1921
1837
|
private static NATIVE_ASSET_IDS;
|
|
1922
1838
|
constructor();
|
|
1923
1839
|
getCustomCurrencyId(asset: TAssetInfo): {
|
|
1924
|
-
ForeignAsset: number;
|
|
1925
|
-
Native?: undefined;
|
|
1926
|
-
} | {
|
|
1927
1840
|
Native: number;
|
|
1928
1841
|
ForeignAsset?: undefined;
|
|
1842
|
+
} | {
|
|
1843
|
+
ForeignAsset: number;
|
|
1844
|
+
Native?: undefined;
|
|
1929
1845
|
};
|
|
1930
1846
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1931
1847
|
}
|
|
@@ -2217,14 +2133,18 @@ declare const transferMoonbeamEvm: <TApi, TRes>({ api, from, to, signer, address
|
|
|
2217
2133
|
|
|
2218
2134
|
declare const transferMoonbeamToEth: <TApi, TRes>({ api, from, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<`0x${string}`>;
|
|
2219
2135
|
|
|
2220
|
-
declare const getOriginFeeDetailsInternal: <TApi, TRes>({ api, account, accountDestination, ahAddress, currency, origin, destination, feeMarginPercentage }: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
|
|
2221
|
-
declare const getOriginFeeDetails: <TApi, TRes>(options: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
|
|
2222
|
-
|
|
2223
2136
|
declare const getOriginXcmFee: <TApi, TRes>(options: TGetOriginXcmFeeOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
|
|
2224
2137
|
forwardedXcms?: unknown;
|
|
2225
2138
|
destParaId?: number;
|
|
2226
2139
|
}>;
|
|
2227
2140
|
|
|
2141
|
+
/**
|
|
2142
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
2143
|
+
* Please use `builder.getOriginXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
2144
|
+
* Will be removed in v13.
|
|
2145
|
+
* For more details, see the documentation:
|
|
2146
|
+
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
2147
|
+
*/
|
|
2228
2148
|
declare const getOriginXcmFeeEstimate: <TApi, TRes>({ api, tx, origin, destination, currency, senderAddress, feeAsset }: TGetOriginXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateDetail>;
|
|
2229
2149
|
|
|
2230
2150
|
declare const getOriginXcmFeeInternal: <TApi, TRes>({ api, tx, origin, destination, senderAddress, disableFallback, feeAsset, currency, useRootOrigin }: TGetOriginXcmFeeInternalOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
|
|
@@ -2235,6 +2155,13 @@ declare const getOriginXcmFeeInternal: <TApi, TRes>({ api, tx, origin, destinati
|
|
|
2235
2155
|
declare const getXcmFeeInternal: <TApi, TRes, TDisableFallback extends boolean>(options: TGetXcmFeeOptions<TApi, TRes, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2236
2156
|
declare const getXcmFee: <TApi, TRes, TDisableFallback extends boolean>(options: TGetXcmFeeOptions<TApi, TRes, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2237
2157
|
|
|
2158
|
+
/**
|
|
2159
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
2160
|
+
* Please use `builder.getXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
2161
|
+
* Will be removed in v13.
|
|
2162
|
+
* For more details, see the documentation:
|
|
2163
|
+
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
2164
|
+
*/
|
|
2238
2165
|
declare const getXcmFeeEstimate: <TApi, TRes>(options: TGetXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateResult>;
|
|
2239
2166
|
|
|
2240
2167
|
declare const getXcmFeeOnce: <TApi, TRes, TDisableFallback extends boolean>({ api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback, swapConfig, useRootOrigin, skipReverseFeeCalculation }: TGetXcmFeeInternalOptions<TApi, TRes, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
@@ -2278,8 +2205,7 @@ declare const assertToIsString: (to: TDestination, overrideMsg?: string) => asse
|
|
|
2278
2205
|
declare const assertAddressIsString: (address: TAddress) => asserts address is Exclude<TAddress, TLocation>;
|
|
2279
2206
|
declare const assertSenderAddress: (address: string | undefined) => asserts address is string;
|
|
2280
2207
|
declare const assertHasLocation: (asset: TAssetInfo) => asserts asset is TAssetWithLocation;
|
|
2281
|
-
declare const assertHasId: (asset: TAssetInfo) => asserts asset is
|
|
2282
|
-
declare const assertIsForeign: (asset: TAssetInfo) => asserts asset is TForeignAssetInfo;
|
|
2208
|
+
declare const assertHasId: (asset: TAssetInfo) => asserts asset is TAssetInfoWithId;
|
|
2283
2209
|
|
|
2284
2210
|
declare const createId: (version: Version, location: TLocation) => TLocation | {
|
|
2285
2211
|
Concrete: TLocation;
|
|
@@ -2396,5 +2322,5 @@ declare const formatUnits: typeof formatUnits$1;
|
|
|
2396
2322
|
|
|
2397
2323
|
declare const validateAddress: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2398
2324
|
|
|
2399
|
-
export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BridgeHaltedError, Builder,
|
|
2400
|
-
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions,
|
|
2325
|
+
export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, UnsupportedOperationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, constructTypeAndThenCall, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createId, createTx, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatAssetIdToERC20, formatUnits, getAssetBalanceInternal, getAssetReserveChain, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getEthErc20Balance, getFailureInfo, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, verifyEdOnDestination, wrapTxBypass };
|
|
2326
|
+
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedEthTransfer, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TSwapConfig, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|