@paraspell/sdk-core 12.1.1 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +24 -5
- package/dist/index.mjs +141 -37
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -298,7 +298,7 @@ declare abstract class BaseAssetsPallet {
|
|
|
298
298
|
/**
|
|
299
299
|
* Builder class for constructing asset claim transactions.
|
|
300
300
|
*/
|
|
301
|
-
declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase> = object> {
|
|
301
|
+
declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase & TBuilderInternalOptions> = object> {
|
|
302
302
|
readonly api: IPolkadotApi<TApi, TRes>;
|
|
303
303
|
readonly _options: T;
|
|
304
304
|
constructor(api: IPolkadotApi<TApi, TRes>, options?: T);
|
|
@@ -311,6 +311,15 @@ declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptions
|
|
|
311
311
|
currency(currency: TAssetClaimOptionsBase['currency']): AssetClaimBuilder<TApi, TRes, T & {
|
|
312
312
|
currency: TAssetClaimOptionsBase['currency'];
|
|
313
313
|
}>;
|
|
314
|
+
/**
|
|
315
|
+
* Sets the sender address.
|
|
316
|
+
*
|
|
317
|
+
* @param address - The sender address.
|
|
318
|
+
* @returns
|
|
319
|
+
*/
|
|
320
|
+
senderAddress(addressOrPath: string): AssetClaimBuilder<TApi, TRes, T & {
|
|
321
|
+
senderAddress: string;
|
|
322
|
+
}>;
|
|
314
323
|
/**
|
|
315
324
|
* Specifies the account address on which the assets will be claimed.
|
|
316
325
|
*
|
|
@@ -335,6 +344,7 @@ declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptions
|
|
|
335
344
|
* @returns A Promise that resolves to the asset claim extrinsic.
|
|
336
345
|
*/
|
|
337
346
|
build(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase>): Promise<TRes>;
|
|
347
|
+
signAndSubmit(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase & TBuilderInternalOptions>): Promise<string>;
|
|
338
348
|
/**
|
|
339
349
|
* Returns the API instance used by the builder.
|
|
340
350
|
*
|
|
@@ -359,7 +369,7 @@ declare class BatchTransactionManager<TApi, TRes> {
|
|
|
359
369
|
/**
|
|
360
370
|
* A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
|
|
361
371
|
*/
|
|
362
|
-
declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = object> {
|
|
372
|
+
declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions & TBuilderInternalOptions> = object> {
|
|
363
373
|
readonly batchManager: BatchTransactionManager<TApi, TRes>;
|
|
364
374
|
readonly api: IPolkadotApi<TApi, TRes>;
|
|
365
375
|
readonly _options: T;
|
|
@@ -416,7 +426,7 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
416
426
|
* @param address - The sender address.
|
|
417
427
|
* @returns
|
|
418
428
|
*/
|
|
419
|
-
senderAddress(
|
|
429
|
+
senderAddress(addressOrPath: string): GeneralBuilder<TApi, TRes, T & {
|
|
420
430
|
senderAddress: string;
|
|
421
431
|
}>;
|
|
422
432
|
/**
|
|
@@ -556,6 +566,7 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
|
|
|
556
566
|
* @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
|
|
557
567
|
*/
|
|
558
568
|
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<bigint>;
|
|
569
|
+
signAndSubmit(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress & TBuilderInternalOptions>): Promise<string>;
|
|
559
570
|
/**
|
|
560
571
|
* Returns the API instance used by the builder.
|
|
561
572
|
*
|
|
@@ -1127,6 +1138,9 @@ type TBuildInternalRes<TApi, TRes, TOptions extends TSendBaseOptions = TSendBase
|
|
|
1127
1138
|
tx: TRes;
|
|
1128
1139
|
options: TSendOptions<TApi, TRes> & TOptions;
|
|
1129
1140
|
};
|
|
1141
|
+
type TBuilderInternalOptions = {
|
|
1142
|
+
path?: string;
|
|
1143
|
+
};
|
|
1130
1144
|
|
|
1131
1145
|
type TProviderEntry = {
|
|
1132
1146
|
name: string;
|
|
@@ -1480,6 +1494,8 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
1480
1494
|
getDisconnectAllowed(): boolean;
|
|
1481
1495
|
disconnect(force?: boolean): Promise<void>;
|
|
1482
1496
|
validateSubstrateAddress(address: string): boolean;
|
|
1497
|
+
deriveAddress(path: string): string;
|
|
1498
|
+
signAndSubmit(tx: TRes, path: string): Promise<string>;
|
|
1483
1499
|
}
|
|
1484
1500
|
|
|
1485
1501
|
declare const blake2b256: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
@@ -2198,6 +2214,7 @@ declare const assertAddressIsString: (address: TAddress) => asserts address is E
|
|
|
2198
2214
|
declare const assertSenderAddress: (address: string | undefined) => asserts address is string;
|
|
2199
2215
|
declare const assertHasLocation: (asset: TAssetInfo) => asserts asset is TAssetWithLocation;
|
|
2200
2216
|
declare const assertHasId: (asset: TAssetInfo) => asserts asset is TAssetInfoWithId;
|
|
2217
|
+
declare const assertDerivationPath: (path: string | undefined) => asserts path is string;
|
|
2201
2218
|
|
|
2202
2219
|
declare const createId: (version: Version, location: TLocation) => TLocation | {
|
|
2203
2220
|
Concrete: TLocation;
|
|
@@ -2249,6 +2266,8 @@ declare const padValueBy: (amount: bigint, percent: number) => bigint;
|
|
|
2249
2266
|
*/
|
|
2250
2267
|
declare const getChain: <TApi, TRes, T extends keyof ReturnType<typeof chains>>(chain: T) => ReturnType<typeof chains<TApi, TRes>>[T];
|
|
2251
2268
|
|
|
2269
|
+
declare const getEvmPrivateKeyHex: (path: string) => "0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133" | "0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b" | "0x0b6e18cafb6ed99687ec547bd28139cafdd2bffe70e6b688025de6b445aa5c5b" | "0x39539ab1876910bbf3a223d84a29e28f1cb4e2e456503e7e91ed39b2e7223d68" | "0x7dce9bc8babb68fec1409be38c8e1a52650206a7ed90ff956ae8a6d15eeaaef4" | "0xb9d2ea9a615f3165812e8d44de0d24da9bbd164b65c4f0573e1ce2c8dbd9c8df" | undefined;
|
|
2270
|
+
|
|
2252
2271
|
declare const createBeneficiaryLocXTokens: <TApi, TRes>({ api, address: recipientAddress, origin, destination, version, paraId }: TCreateBeneficiaryXTokensOptions<TApi, TRes>) => TLocation;
|
|
2253
2272
|
declare const createBeneficiaryLocation: <TApi, TRes>({ api, address, version }: TCreateBeneficiaryOptions<TApi, TRes>) => TLocation;
|
|
2254
2273
|
|
|
@@ -2314,5 +2333,5 @@ declare const formatUnits: typeof formatUnits$1;
|
|
|
2314
2333
|
|
|
2315
2334
|
declare const validateAddress: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2316
2335
|
|
|
2317
|
-
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, RELAY_LOCATION, 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 };
|
|
2318
|
-
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 };
|
|
2336
|
+
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, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, UnsupportedOperationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertDerivationPath, 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, getEvmPrivateKeyHex, 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 };
|
|
2337
|
+
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderInternalOptions, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { isChainEvm, getAssetsObject, InvalidCurrencyError, extractAssetLocation
|
|
|
3
3
|
export * from '@paraspell/assets';
|
|
4
4
|
import { base58 } from '@scure/base';
|
|
5
5
|
import { isAddress, parseUnits as parseUnits$1, formatUnits as formatUnits$1, getContract, createPublicClient, http, pad, toHex, getAddress, concat, keccak256 } from 'viem';
|
|
6
|
-
import { replaceBigInt, isTLocation, Version, hasJunction, getJunctionValue, isRelayChain, deepEqual, Parents, isExternalChain, isSubstrateBridge, PARACHAINS, RELAYCHAINS,
|
|
6
|
+
import { replaceBigInt, isTLocation, Version, hasJunction, getJunctionValue, isRelayChain, deepEqual, Parents, isExternalChain, isSubstrateBridge, PARACHAINS, RELAYCHAINS, isTrustedChain } from '@paraspell/sdk-common';
|
|
7
7
|
export * from '@paraspell/sdk-common';
|
|
8
8
|
import { mainnet, moonbeam, moonriver } from 'viem/chains';
|
|
9
9
|
import { getSupportedPallets, getNativeAssetsPallet, getOtherAssetsPallets, getSupportedPalletsDetails } from '@paraspell/pallets';
|
|
@@ -823,6 +823,11 @@ var assertHasId = function assertHasId(asset) {
|
|
|
823
823
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset, replaceBigInt), " has no assetId"));
|
|
824
824
|
}
|
|
825
825
|
};
|
|
826
|
+
var assertDerivationPath = function assertDerivationPath(path) {
|
|
827
|
+
if (!path) {
|
|
828
|
+
throw new InvalidAddressError('Sender address needs to be a derivation path to sign and submit transaction using this method.');
|
|
829
|
+
}
|
|
830
|
+
};
|
|
826
831
|
|
|
827
832
|
var createId = function createId(version, location) {
|
|
828
833
|
if (version === Version.V3) {
|
|
@@ -1404,10 +1409,6 @@ var Hydration$1 = {
|
|
|
1404
1409
|
info: "hydradx",
|
|
1405
1410
|
paraId: 2034,
|
|
1406
1411
|
providers: [
|
|
1407
|
-
{
|
|
1408
|
-
name: "Dwellir",
|
|
1409
|
-
endpoint: "wss://hydration-rpc.n.dwellir.com"
|
|
1410
|
-
},
|
|
1411
1412
|
{
|
|
1412
1413
|
name: "Helikon",
|
|
1413
1414
|
endpoint: "wss://rpc.helikon.io/hydradx"
|
|
@@ -3022,6 +3023,22 @@ var AssetClaimBuilder = /*#__PURE__*/function () {
|
|
|
3022
3023
|
currency: _currency
|
|
3023
3024
|
}));
|
|
3024
3025
|
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Sets the sender address.
|
|
3028
|
+
*
|
|
3029
|
+
* @param address - The sender address.
|
|
3030
|
+
* @returns
|
|
3031
|
+
*/
|
|
3032
|
+
}, {
|
|
3033
|
+
key: "senderAddress",
|
|
3034
|
+
value: function senderAddress(addressOrPath) {
|
|
3035
|
+
var isPath = addressOrPath.startsWith('//');
|
|
3036
|
+
var address = isPath ? this.api.deriveAddress(addressOrPath) : addressOrPath;
|
|
3037
|
+
return new AssetClaimBuilder(this.api, _objectSpread2(_objectSpread2({}, this._options), {}, {
|
|
3038
|
+
senderAddress: address,
|
|
3039
|
+
path: isPath ? addressOrPath : undefined
|
|
3040
|
+
}));
|
|
3041
|
+
}
|
|
3025
3042
|
/**
|
|
3026
3043
|
* Specifies the account address on which the assets will be claimed.
|
|
3027
3044
|
*
|
|
@@ -3031,8 +3048,10 @@ var AssetClaimBuilder = /*#__PURE__*/function () {
|
|
|
3031
3048
|
}, {
|
|
3032
3049
|
key: "address",
|
|
3033
3050
|
value: function address(_address) {
|
|
3051
|
+
var isPath = typeof _address === 'string' && _address.startsWith('//');
|
|
3052
|
+
var resolvedAddress = isPath ? this.api.deriveAddress(_address) : _address;
|
|
3034
3053
|
return new AssetClaimBuilder(this.api, _objectSpread2(_objectSpread2({}, this._options), {}, {
|
|
3035
|
-
address:
|
|
3054
|
+
address: resolvedAddress
|
|
3036
3055
|
}));
|
|
3037
3056
|
}
|
|
3038
3057
|
/**
|
|
@@ -3060,6 +3079,31 @@ var AssetClaimBuilder = /*#__PURE__*/function () {
|
|
|
3060
3079
|
api: this.api
|
|
3061
3080
|
}, this._options));
|
|
3062
3081
|
}
|
|
3082
|
+
}, {
|
|
3083
|
+
key: "signAndSubmit",
|
|
3084
|
+
value: function () {
|
|
3085
|
+
var _signAndSubmit = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
3086
|
+
var path, tx;
|
|
3087
|
+
return _regenerator().w(function (_context) {
|
|
3088
|
+
while (1) switch (_context.n) {
|
|
3089
|
+
case 0:
|
|
3090
|
+
path = this._options.path;
|
|
3091
|
+
assertDerivationPath(path);
|
|
3092
|
+
_context.n = 1;
|
|
3093
|
+
return claimAssets(_objectSpread2({
|
|
3094
|
+
api: this.api
|
|
3095
|
+
}, this._options));
|
|
3096
|
+
case 1:
|
|
3097
|
+
tx = _context.v;
|
|
3098
|
+
return _context.a(2, this.api.signAndSubmit(tx, path));
|
|
3099
|
+
}
|
|
3100
|
+
}, _callee, this);
|
|
3101
|
+
}));
|
|
3102
|
+
function signAndSubmit() {
|
|
3103
|
+
return _signAndSubmit.apply(this, arguments);
|
|
3104
|
+
}
|
|
3105
|
+
return signAndSubmit;
|
|
3106
|
+
}()
|
|
3063
3107
|
/**
|
|
3064
3108
|
* Returns the API instance used by the builder.
|
|
3065
3109
|
*
|
|
@@ -3452,8 +3496,10 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
3452
3496
|
}, {
|
|
3453
3497
|
key: "address",
|
|
3454
3498
|
value: function address(_address) {
|
|
3499
|
+
var isPath = typeof _address === 'string' && _address.startsWith('//');
|
|
3500
|
+
var resolvedAddress = isPath ? this.api.deriveAddress(_address) : _address;
|
|
3455
3501
|
return new GeneralBuilder(this.api, this.batchManager, _objectSpread2(_objectSpread2({}, this._options), {}, {
|
|
3456
|
-
address:
|
|
3502
|
+
address: resolvedAddress
|
|
3457
3503
|
}));
|
|
3458
3504
|
}
|
|
3459
3505
|
/**
|
|
@@ -3464,9 +3510,12 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
3464
3510
|
*/
|
|
3465
3511
|
}, {
|
|
3466
3512
|
key: "senderAddress",
|
|
3467
|
-
value: function senderAddress(
|
|
3513
|
+
value: function senderAddress(addressOrPath) {
|
|
3514
|
+
var isPath = addressOrPath.startsWith('//');
|
|
3515
|
+
var address = isPath ? this.api.deriveAddress(addressOrPath) : addressOrPath;
|
|
3468
3516
|
return new GeneralBuilder(this.api, this.batchManager, _objectSpread2(_objectSpread2({}, this._options), {}, {
|
|
3469
|
-
senderAddress: address
|
|
3517
|
+
senderAddress: address,
|
|
3518
|
+
path: isPath ? addressOrPath : undefined
|
|
3470
3519
|
}));
|
|
3471
3520
|
}
|
|
3472
3521
|
/**
|
|
@@ -3767,9 +3816,7 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
3767
3816
|
}, {
|
|
3768
3817
|
key: "getXcmFee",
|
|
3769
3818
|
value: (function () {
|
|
3770
|
-
var _getXcmFee2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(
|
|
3771
|
-
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
3772
|
-
options) {
|
|
3819
|
+
var _getXcmFee2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(options) {
|
|
3773
3820
|
var _options$disableFallb;
|
|
3774
3821
|
var disableFallback, _yield$this$prepareNo2, normalizedOptions, buildTx, api, from, to, senderAddress, address, currency, feeAsset;
|
|
3775
3822
|
return _regenerator().w(function (_context8) {
|
|
@@ -4190,13 +4237,36 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
4190
4237
|
return _getReceivableAmount.apply(this, arguments);
|
|
4191
4238
|
}
|
|
4192
4239
|
return getReceivableAmount;
|
|
4240
|
+
}())
|
|
4241
|
+
}, {
|
|
4242
|
+
key: "signAndSubmit",
|
|
4243
|
+
value: function () {
|
|
4244
|
+
var _signAndSubmit = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15() {
|
|
4245
|
+
var path, _yield$this$buildInte3, tx;
|
|
4246
|
+
return _regenerator().w(function (_context15) {
|
|
4247
|
+
while (1) switch (_context15.n) {
|
|
4248
|
+
case 0:
|
|
4249
|
+
path = this._options.path;
|
|
4250
|
+
assertDerivationPath(path);
|
|
4251
|
+
_context15.n = 1;
|
|
4252
|
+
return this.buildInternal();
|
|
4253
|
+
case 1:
|
|
4254
|
+
_yield$this$buildInte3 = _context15.v;
|
|
4255
|
+
tx = _yield$this$buildInte3.tx;
|
|
4256
|
+
return _context15.a(2, this.api.signAndSubmit(tx, path));
|
|
4257
|
+
}
|
|
4258
|
+
}, _callee15, this);
|
|
4259
|
+
}));
|
|
4260
|
+
function signAndSubmit() {
|
|
4261
|
+
return _signAndSubmit.apply(this, arguments);
|
|
4262
|
+
}
|
|
4263
|
+
return signAndSubmit;
|
|
4193
4264
|
}()
|
|
4194
4265
|
/**
|
|
4195
4266
|
* Returns the API instance used by the builder.
|
|
4196
4267
|
*
|
|
4197
4268
|
* @returns The API instance.
|
|
4198
4269
|
*/
|
|
4199
|
-
)
|
|
4200
4270
|
}, {
|
|
4201
4271
|
key: "getApi",
|
|
4202
4272
|
value: function getApi() {
|
|
@@ -8027,21 +8097,28 @@ var getTransferableAmount = /*#__PURE__*/function () {
|
|
|
8027
8097
|
};
|
|
8028
8098
|
}();
|
|
8029
8099
|
|
|
8030
|
-
var
|
|
8100
|
+
var resolveTransferType = function resolveTransferType(_ref) {
|
|
8031
8101
|
var origin = _ref.origin,
|
|
8032
|
-
reserve = _ref.reserve
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8102
|
+
reserve = _ref.reserve;
|
|
8103
|
+
if (origin.chain === reserve.chain) return 'LocalReserve';
|
|
8104
|
+
if (isTrustedChain(origin.chain) && isTrustedChain(reserve.chain)) return 'Teleport';
|
|
8105
|
+
return 'DestinationReserve';
|
|
8106
|
+
};
|
|
8107
|
+
var buildTypeAndThenCall = function buildTypeAndThenCall(context, isDotAsset, customXcm, assets) {
|
|
8108
|
+
var origin = context.origin,
|
|
8109
|
+
reserve = context.reserve,
|
|
8110
|
+
dest = context.dest,
|
|
8111
|
+
isSubBridge = context.isSubBridge,
|
|
8112
|
+
assetInfo = context.assetInfo,
|
|
8113
|
+
_context$options = context.options,
|
|
8114
|
+
version = _context$options.version,
|
|
8115
|
+
pallet = _context$options.pallet,
|
|
8116
|
+
method = _context$options.method;
|
|
8040
8117
|
var feeAssetLocation = !isDotAsset ? RELAY_LOCATION : assetInfo.location;
|
|
8041
8118
|
var finalDest = origin.chain === reserve.chain ? dest.chain : reserve.chain;
|
|
8042
8119
|
var destLocation = createDestination(version, origin.chain, finalDest, getParaId(finalDest));
|
|
8043
|
-
var
|
|
8044
|
-
var feeMultiAsset = createAsset(version, assetInfo.amount, isRelayChain(origin.chain) || isSubBridge ? localizeLocation(origin.chain, feeAssetLocation) : feeAssetLocation);
|
|
8120
|
+
var transferType = resolveTransferType(context);
|
|
8121
|
+
var feeMultiAsset = createAsset(version, assetInfo.amount, isRelayChain(origin.chain) || isSubBridge || origin.chain === 'Mythos' ? localizeLocation(origin.chain, feeAssetLocation) : feeAssetLocation);
|
|
8045
8122
|
var module = pallet !== null && pallet !== void 0 ? pallet : isRelayChain(origin.chain) ? 'XcmPallet' : 'PolkadotXcm';
|
|
8046
8123
|
var methodName = method !== null && method !== void 0 ? method : 'transfer_assets_using_type_and_then';
|
|
8047
8124
|
return {
|
|
@@ -8050,9 +8127,9 @@ var buildTypeAndThenCall = function buildTypeAndThenCall(_ref, isDotAsset, custo
|
|
|
8050
8127
|
params: {
|
|
8051
8128
|
dest: addXcmVersionHeader(destLocation, version),
|
|
8052
8129
|
assets: addXcmVersionHeader(assets, version),
|
|
8053
|
-
assets_transfer_type:
|
|
8130
|
+
assets_transfer_type: transferType,
|
|
8054
8131
|
remote_fees_id: addXcmVersionHeader(feeMultiAsset.id, version),
|
|
8055
|
-
fees_transfer_type:
|
|
8132
|
+
fees_transfer_type: transferType,
|
|
8056
8133
|
custom_xcm_on_dest: addXcmVersionHeader(customXcm, version),
|
|
8057
8134
|
weight_limit: 'Unlimited'
|
|
8058
8135
|
}
|
|
@@ -8076,7 +8153,7 @@ var resolveReserveChain = function resolveReserveChain(chain, destination, asset
|
|
|
8076
8153
|
};
|
|
8077
8154
|
var createTypeAndThenCallContext = /*#__PURE__*/function () {
|
|
8078
8155
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(chain, options, overrideReserve) {
|
|
8079
|
-
var api, destination, assetInfo, destinationChain, isSubBridge, reserveChain,
|
|
8156
|
+
var api, destination, assetInfo, destinationChain, isSubBridge, reserveChain, NO_FEE_ASSET_LOCS, systemAsset, isRelayAsset, destApi, reserveApi;
|
|
8080
8157
|
return _regenerator().w(function (_context) {
|
|
8081
8158
|
while (1) switch (_context.n) {
|
|
8082
8159
|
case 0:
|
|
@@ -8086,7 +8163,7 @@ var createTypeAndThenCallContext = /*#__PURE__*/function () {
|
|
|
8086
8163
|
destinationChain = destination;
|
|
8087
8164
|
isSubBridge = isSubstrateBridge(chain, destinationChain);
|
|
8088
8165
|
reserveChain = resolveReserveChain(chain, destinationChain, assetInfo.location, isSubBridge, overrideReserve);
|
|
8089
|
-
|
|
8166
|
+
NO_FEE_ASSET_LOCS = [RELAY_LOCATION, {
|
|
8090
8167
|
parents: 2,
|
|
8091
8168
|
interior: {
|
|
8092
8169
|
X1: [{
|
|
@@ -8104,9 +8181,16 @@ var createTypeAndThenCallContext = /*#__PURE__*/function () {
|
|
|
8104
8181
|
}
|
|
8105
8182
|
}]
|
|
8106
8183
|
}
|
|
8184
|
+
}, {
|
|
8185
|
+
parents: 1,
|
|
8186
|
+
interior: {
|
|
8187
|
+
X1: [{
|
|
8188
|
+
Parachain: 3369
|
|
8189
|
+
}]
|
|
8190
|
+
}
|
|
8107
8191
|
}];
|
|
8108
8192
|
systemAsset = findNativeAssetInfoOrThrow(getRelayChainOf(chain));
|
|
8109
|
-
isRelayAsset =
|
|
8193
|
+
isRelayAsset = NO_FEE_ASSET_LOCS.some(function (loc) {
|
|
8110
8194
|
return deepEqual(assetInfo.location, loc);
|
|
8111
8195
|
}) || isSubBridge;
|
|
8112
8196
|
destApi = api.clone();
|
|
@@ -8219,8 +8303,8 @@ var createCustomXcm = function createCustomXcm(context, assetCount, isForFeeCalc
|
|
|
8219
8303
|
return [buyExecution, depositInstruction];
|
|
8220
8304
|
}
|
|
8221
8305
|
var destLoc = createDestination(version, origin.chain, destination, paraIdTo);
|
|
8222
|
-
// If destination is a
|
|
8223
|
-
if (
|
|
8306
|
+
// If destination is a trusted chain, use teleport instead of reserve deposit
|
|
8307
|
+
if (isTrustedChain(dest.chain)) {
|
|
8224
8308
|
return [].concat(_toConsumableArray(refundInstruction ? [refundInstruction] : []), [{
|
|
8225
8309
|
InitiateTeleport: {
|
|
8226
8310
|
assets: filter,
|
|
@@ -8261,7 +8345,7 @@ var createRefundInstruction = function createRefundInstruction(api, senderAddres
|
|
|
8261
8345
|
|
|
8262
8346
|
var buildAssets = function buildAssets(chain, asset, feeAmount, isRelayAsset, version) {
|
|
8263
8347
|
var assets = [];
|
|
8264
|
-
var shouldLocalizeAndSort = isRelayChain(chain) || chain.startsWith('AssetHub');
|
|
8348
|
+
var shouldLocalizeAndSort = isRelayChain(chain) || chain.startsWith('AssetHub') || chain === 'Mythos';
|
|
8265
8349
|
if (!isRelayAsset) {
|
|
8266
8350
|
assets.push(createAsset(version, feeAmount, RELAY_LOCATION));
|
|
8267
8351
|
}
|
|
@@ -8632,7 +8716,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
8632
8716
|
key: "transfer",
|
|
8633
8717
|
value: function () {
|
|
8634
8718
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sendOptions) {
|
|
8635
|
-
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, isSubBridge, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, _asset$location2, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHOrigin, isAHDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
8719
|
+
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, supportsTypeThen, isSubBridge, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, _asset$location2, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHOrigin, isAHDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
8636
8720
|
return _regenerator().w(function (_context) {
|
|
8637
8721
|
while (1) switch (_context.n) {
|
|
8638
8722
|
case 0:
|
|
@@ -8650,18 +8734,21 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
8650
8734
|
this.throwIfTempDisabled(sendOptions, destChain);
|
|
8651
8735
|
this.throwIfCantReceive(destChain);
|
|
8652
8736
|
isRelayAsset = deepEqual(asset.location, RELAY_LOCATION) && isSymbolMatch(getRelayChainSymbol(this.chain), asset.symbol);
|
|
8737
|
+
mythAsset = findNativeAssetInfoOrThrow('Mythos');
|
|
8738
|
+
isMythAsset = isAssetXcEqual(mythAsset, asset);
|
|
8739
|
+
assetNeedsTypeThen = isRelayAsset || isMythAsset;
|
|
8653
8740
|
_context.n = 2;
|
|
8654
8741
|
return api.hasMethod('PolkadotXcm', 'transfer_assets_using_type_and_then');
|
|
8655
8742
|
case 2:
|
|
8656
8743
|
supportsTypeThen = _context.v;
|
|
8657
|
-
if (!(
|
|
8744
|
+
if (!(assetNeedsTypeThen && !supportsTypeThen)) {
|
|
8658
8745
|
_context.n = 3;
|
|
8659
8746
|
break;
|
|
8660
8747
|
}
|
|
8661
8748
|
throw new UnsupportedOperationError('Relaychain assets require the type-and-then method which is not supported by this chain.');
|
|
8662
8749
|
case 3:
|
|
8663
8750
|
isSubBridge = !isTLocation(destination) && isSubstrateBridge(this.chain, destination);
|
|
8664
|
-
useTypeAndThen =
|
|
8751
|
+
useTypeAndThen = assetNeedsTypeThen && supportsTypeThen && destChain && !isExternalChain(destChain) && !feeAsset && (!isTrustedChain(this.chain) || !isTrustedChain(destChain)) || isSubBridge;
|
|
8665
8752
|
if (!(supportsXTokens(this) && this.canUseXTokens(sendOptions) && !useTypeAndThen)) {
|
|
8666
8753
|
_context.n = 5;
|
|
8667
8754
|
break;
|
|
@@ -8748,7 +8835,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
8748
8835
|
}
|
|
8749
8836
|
throw new TransferToAhNotSupported('Native asset transfers to or from AssetHub are temporarily disabled');
|
|
8750
8837
|
case 7:
|
|
8751
|
-
if (!(this.chain === 'Astar' &&
|
|
8838
|
+
if (!(this.chain === 'Astar' && assetNeedsTypeThen)) {
|
|
8752
8839
|
_context.n = 8;
|
|
8753
8840
|
break;
|
|
8754
8841
|
}
|
|
@@ -13204,6 +13291,15 @@ var BYPASS_MINT_AMOUNT = '1000';
|
|
|
13204
13291
|
var MIN_AMOUNT = 2n;
|
|
13205
13292
|
var AMOUNT_ALL = 'ALL';
|
|
13206
13293
|
|
|
13294
|
+
var EVM_DEV_PRIVATE_KEYS = {
|
|
13295
|
+
alith: '0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133',
|
|
13296
|
+
baltathar: '0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b',
|
|
13297
|
+
charleth: '0x0b6e18cafb6ed99687ec547bd28139cafdd2bffe70e6b688025de6b445aa5c5b',
|
|
13298
|
+
dorothy: '0x39539ab1876910bbf3a223d84a29e28f1cb4e2e456503e7e91ed39b2e7223d68',
|
|
13299
|
+
ethan: '0x7dce9bc8babb68fec1409be38c8e1a52650206a7ed90ff956ae8a6d15eeaaef4',
|
|
13300
|
+
faith: '0xb9d2ea9a615f3165812e8d44de0d24da9bbd164b65c4f0573e1ce2c8dbd9c8df'
|
|
13301
|
+
};
|
|
13302
|
+
|
|
13207
13303
|
/**
|
|
13208
13304
|
* Retrieves the chain instance for a given chain.
|
|
13209
13305
|
*
|
|
@@ -13413,6 +13509,14 @@ var resolveModuleError = function resolveModuleError(chain, error) {
|
|
|
13413
13509
|
};
|
|
13414
13510
|
};
|
|
13415
13511
|
|
|
13512
|
+
var getEvmPrivateKeyHex = function getEvmPrivateKeyHex(path) {
|
|
13513
|
+
var name = path.slice(2).toLowerCase();
|
|
13514
|
+
if (name in EVM_DEV_PRIVATE_KEYS) {
|
|
13515
|
+
return EVM_DEV_PRIVATE_KEYS[name];
|
|
13516
|
+
}
|
|
13517
|
+
return undefined;
|
|
13518
|
+
};
|
|
13519
|
+
|
|
13416
13520
|
var normalizeAmount = function normalizeAmount(amount) {
|
|
13417
13521
|
return amount < MIN_AMOUNT ? MIN_AMOUNT : amount;
|
|
13418
13522
|
};
|
|
@@ -14111,4 +14215,4 @@ var getMoonbeamErc20Balance = /*#__PURE__*/function () {
|
|
|
14111
14215
|
};
|
|
14112
14216
|
}();
|
|
14113
14217
|
|
|
14114
|
-
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, RELAY_LOCATION, 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$1 as 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 };
|
|
14218
|
+
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, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, UnsupportedOperationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertDerivationPath, 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, getEvmPrivateKeyHex, getFailureInfo$1 as 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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@noble/hashes": "^2.0.1",
|
|
27
27
|
"@scure/base": "^2.0.0",
|
|
28
28
|
"viem": "2.40.3",
|
|
29
|
-
"@paraspell/sdk-common": "12.
|
|
30
|
-
"@paraspell/assets": "12.
|
|
31
|
-
"@paraspell/pallets": "12.
|
|
29
|
+
"@paraspell/sdk-common": "12.2.0",
|
|
30
|
+
"@paraspell/assets": "12.2.0",
|
|
31
|
+
"@paraspell/pallets": "12.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|