@paraspell/sdk-pjs 13.7.1 → 13.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +7 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ type TPjsEvmBuilderOptions<TApi, TRes, TSigner> = WithApi<TEvmBuilderOptionsBase
|
|
|
51
51
|
*
|
|
52
52
|
* @returns The asset balance as a bigint.
|
|
53
53
|
*/
|
|
54
|
-
declare const getBalance: (options: _paraspell_sdk_core.TGetBalanceCommonOptions & {
|
|
54
|
+
declare const getBalance: (options: _paraspell_sdk_core.TGetBalanceCommonOptions<never> & {
|
|
55
55
|
currency?: _paraspell_sdk_core.TCurrencyCore;
|
|
56
56
|
} & {
|
|
57
57
|
api?: _paraspell_sdk_core.TApiOrUrl<TPjsApi>;
|
|
@@ -209,10 +209,10 @@ declare const transferEthToPolkadot$1: <TApi, TRes, TSigner>({ api, provider, si
|
|
|
209
209
|
|
|
210
210
|
declare const getTokenBalance: (signer: Signer$1, symbol: string) => Promise<bigint>;
|
|
211
211
|
|
|
212
|
-
declare const dryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<Extrinsic> & {
|
|
212
|
+
declare const dryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<Extrinsic, never> & {
|
|
213
213
|
api?: TApiOrUrl<TPjsApi>;
|
|
214
214
|
}) => Promise<_paraspell_sdk_core.TDryRunResult>;
|
|
215
|
-
declare const dryRunOrigin: (options: _paraspell_sdk_core.TDryRunCallBaseOptions<Extrinsic> & {
|
|
215
|
+
declare const dryRunOrigin: (options: _paraspell_sdk_core.TDryRunCallBaseOptions<Extrinsic, never> & {
|
|
216
216
|
api?: TApiOrUrl<TPjsApi>;
|
|
217
217
|
}) => Promise<_paraspell_sdk_core.TDryRunChainResult>;
|
|
218
218
|
declare const transferEthToPolkadot: (options: Omit<TPjsEvmBuilderOptions<TPjsApi, Extrinsic, TPjsSigner>, "api">) => ReturnType<typeof transferEthToPolkadot$1>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNativeAssetSymbol, getOtherAssets, hasJunction, getJunctionValue, getEvmPrivateKeyHex, UnsupportedOperationError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, BatchMode, isConfig, findNativeAssetInfoOrThrowImpl, getChainProvidersImpl, isSenderSigner, PolkadotApi, findAssetInfoOrThrowImpl, hasXcmPaymentApiSupportImpl, resolveModuleError, hasDryRunSupportImpl, RuntimeApiUnavailableError, wrapTxBypass, normalizeLocation, localizeLocation, createAssetId, addXcmVersionHeader, isAssetXcEqual, RELAY_LOCATION, getRelayChainOfImpl, SubmitTransactionError, createChainClient as createChainClient$1, getBalance as getBalance$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, findAssetInfoOrThrow, assertHasId, getParaId, RoutingResolutionError, abstractDecimals, MissingParameterError, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress as validateAddress$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
|
|
1
|
+
import { getNativeAssetSymbol, getOtherAssets, hasJunction, getJunctionValue, getEvmPrivateKeyHex, UnsupportedOperationError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, BatchMode, isConfig, findNativeAssetInfoOrThrowImpl, isCustomChain, getChainProvidersImpl, isSenderSigner, PolkadotApi, findAssetInfoOrThrowImpl, hasXcmPaymentApiSupportImpl, resolveModuleError, hasDryRunSupportImpl, RuntimeApiUnavailableError, wrapTxBypass, normalizeLocation, localizeLocation, createAssetId, addXcmVersionHeader, isAssetXcEqual, RELAY_LOCATION, getRelayChainOfImpl, SubmitTransactionError, createChainClient as createChainClient$1, getBalance as getBalance$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, findAssetInfoOrThrow, assertHasId, getParaId, RoutingResolutionError, abstractDecimals, MissingParameterError, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress as validateAddress$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
|
|
2
2
|
export * from '@paraspell/sdk-core';
|
|
3
3
|
import { Keyring, WsProvider, ApiPromise } from '@polkadot/api';
|
|
4
4
|
import { u8aConcat, compactToU8a, u8aEq, isHex, u8aToHex, hexToU8a, stringToU8a } from '@polkadot/util';
|
|
@@ -1490,9 +1490,10 @@ var PolkadotJsApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1490
1490
|
value: function disconnect() {
|
|
1491
1491
|
var _this$_config$apiOver;
|
|
1492
1492
|
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1493
|
-
|
|
1493
|
+
var chain = this._chain;
|
|
1494
|
+
if (!chain) return Promise.resolve();
|
|
1494
1495
|
if (!force && !this.disconnectAllowed) return Promise.resolve();
|
|
1495
|
-
var api = isConfig(this._config) ? (_this$_config$apiOver = this._config.apiOverrides) === null || _this$_config$apiOver === void 0 ? void 0 : _this$_config$apiOver[
|
|
1496
|
+
var api = isConfig(this._config) ? isCustomChain(chain) ? undefined : (_this$_config$apiOver = this._config.apiOverrides) === null || _this$_config$apiOver === void 0 ? void 0 : _this$_config$apiOver[chain] : this._config;
|
|
1496
1497
|
// Own client provided, destroy only if force true
|
|
1497
1498
|
if (force && _typeof(api) === 'object') {
|
|
1498
1499
|
void this.api.disconnect();
|
|
@@ -1502,7 +1503,7 @@ var PolkadotJsApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1502
1503
|
if (force) {
|
|
1503
1504
|
void this.api.disconnect();
|
|
1504
1505
|
} else {
|
|
1505
|
-
var key = api === undefined ? getChainProvidersImpl(
|
|
1506
|
+
var key = api === undefined ? getChainProvidersImpl(chain, this._customCtx) : api;
|
|
1506
1507
|
releaseClient(key);
|
|
1507
1508
|
}
|
|
1508
1509
|
}
|
|
@@ -2095,8 +2096,9 @@ var EvmBuilder = function EvmBuilder(provider, api) {
|
|
|
2095
2096
|
var dryRun = createPolkadotJsApiCall(dryRun$1);
|
|
2096
2097
|
var dryRunOrigin = createPolkadotJsApiCall(dryRunOrigin$1);
|
|
2097
2098
|
var transferEthToPolkadot = function transferEthToPolkadot(options) {
|
|
2099
|
+
var api = new PolkadotJsApi();
|
|
2098
2100
|
return transferEthToPolkadot$1(_objectSpread2(_objectSpread2({}, options), {}, {
|
|
2099
|
-
api:
|
|
2101
|
+
api: api
|
|
2100
2102
|
}));
|
|
2101
2103
|
};
|
|
2102
2104
|
var getParaEthTransferFees = /*#__PURE__*/function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "13.7.
|
|
3
|
+
"version": "13.7.2",
|
|
4
4
|
"description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@snowbridge/registry": "^1.1.6",
|
|
30
30
|
"ethers": "^6.16.0",
|
|
31
31
|
"viem": "^2.51.3",
|
|
32
|
-
"@paraspell/sdk-core": "13.7.
|
|
32
|
+
"@paraspell/sdk-core": "13.7.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@polkadot/api": ">= 16.0 < 17",
|