@paraspell/sdk 13.7.0 → 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 +21 -7
- package/dist/index.mjs +5 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ type TSwapEvent = TSwapEvent$1<TPapiApi, TPapiTransaction>;
|
|
|
16
16
|
*
|
|
17
17
|
* @returns The asset balance as a bigint.
|
|
18
18
|
*/
|
|
19
|
-
declare const getBalance: (options: _paraspell_sdk_core.TGetBalanceCommonOptions & {
|
|
19
|
+
declare const getBalance: (options: _paraspell_sdk_core.TGetBalanceCommonOptions<never> & {
|
|
20
20
|
currency?: _paraspell_sdk_core.TCurrencyCore;
|
|
21
21
|
} & {
|
|
22
22
|
api?: _paraspell_sdk_core.TApiOrUrl<TPapiApi>;
|
|
@@ -143,15 +143,22 @@ declare const Builder: <const TOpts extends TBuilderOptions<TApiOrUrl<TPapiApi>>
|
|
|
143
143
|
type GeneralBuilder<T extends Partial<TTransferBaseOptions<TPapiApi, TPapiTransaction, TPapiSigner>> = object, TCustomChain extends string = never> = GeneralBuilder$1<PolkadotClient, TPapiTransaction, PolkadotSigner, T, TCustomChain>;
|
|
144
144
|
/** @deprecated EvmBuilder is deprecated. Please use the Builder class instead. */
|
|
145
145
|
declare const EvmBuilder: (api?: TBuilderOptions<TApiOrUrl<TPapiApi>>) => EvmBuilderCore<unknown, unknown, unknown, {
|
|
146
|
-
api: _paraspell_sdk_core.PolkadotApi<PolkadotClient,
|
|
146
|
+
api: _paraspell_sdk_core.PolkadotApi<PolkadotClient, polkadot_api.Transaction<any, Record<string, {
|
|
147
|
+
value: any;
|
|
148
|
+
additionalSigned: any;
|
|
149
|
+
} | {
|
|
150
|
+
value: any;
|
|
151
|
+
} | {
|
|
152
|
+
additionalSigned: any;
|
|
153
|
+
}> | Partial<any>>, any, never>;
|
|
147
154
|
}>;
|
|
148
155
|
|
|
149
|
-
declare const hydrateCustomChain: (name:
|
|
156
|
+
declare const hydrateCustomChain: <TCustomChain extends string>(name: TCustomChain, input: TCustomChainInput) => Promise<TChainAssetsInfo>;
|
|
150
157
|
|
|
151
|
-
declare const dryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<TPapiTransaction> & {
|
|
158
|
+
declare const dryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<TPapiTransaction, never> & {
|
|
152
159
|
api?: TApiOrUrl<TPapiApi>;
|
|
153
160
|
}) => Promise<_paraspell_sdk_core.TDryRunResult>;
|
|
154
|
-
declare const dryRunOrigin: (options: _paraspell_sdk_core.TDryRunCallBaseOptions<TPapiTransaction> & {
|
|
161
|
+
declare const dryRunOrigin: (options: _paraspell_sdk_core.TDryRunCallBaseOptions<TPapiTransaction, never> & {
|
|
155
162
|
api?: TApiOrUrl<TPapiApi>;
|
|
156
163
|
}) => Promise<_paraspell_sdk_core.TDryRunChainResult>;
|
|
157
164
|
declare const getParaEthTransferFees: (ahApi?: TApiOrUrl<TPapiApi>) => Promise<[bigint, bigint]>;
|
|
@@ -159,11 +166,18 @@ declare const getParaEthTransferFees: (ahApi?: TApiOrUrl<TPapiApi>) => Promise<[
|
|
|
159
166
|
* Gets the Ethereum bridge status.
|
|
160
167
|
*/
|
|
161
168
|
declare const getBridgeStatus: (ahApi?: TApiOrUrl<TPapiApi>) => Promise<_paraspell_sdk_core.TBridgeStatus>;
|
|
162
|
-
declare const getOriginXcmFee: (options: _paraspell_sdk_core.TGetOriginXcmFeeBaseOptions<TPapiTransaction, boolean> & {
|
|
169
|
+
declare const getOriginXcmFee: (options: _paraspell_sdk_core.TGetOriginXcmFeeBaseOptions<TPapiTransaction, boolean, never> & {
|
|
163
170
|
api?: TApiOrUrl<TPapiApi>;
|
|
164
171
|
}) => Promise<_paraspell_sdk_core.TXcmFeeDetailWithForwardedXcm<boolean>>;
|
|
165
172
|
declare const getXcmFee: <TDisableFallback extends boolean>(options: TGetXcmFeeBaseOptions<TPapiTransaction, TDisableFallback>, builderOptions?: TBuilderOptions<TApiOrUrl<TPapiApi>>) => Promise<_paraspell_sdk_core.TGetXcmFeeResult<TDisableFallback>>;
|
|
166
|
-
declare const handleSwapExecuteTransfer: (options: TCreateBaseSwapXcmOptions, builderOptions?: TBuilderOptions<TApiOrUrl<TPapiApi>>) => Promise<
|
|
173
|
+
declare const handleSwapExecuteTransfer: (options: TCreateBaseSwapXcmOptions, builderOptions?: TBuilderOptions<TApiOrUrl<TPapiApi>>) => Promise<polkadot_api.Transaction<any, Record<string, {
|
|
174
|
+
value: any;
|
|
175
|
+
additionalSigned: any;
|
|
176
|
+
} | {
|
|
177
|
+
value: any;
|
|
178
|
+
} | {
|
|
179
|
+
additionalSigned: any;
|
|
180
|
+
}> | Partial<any>>>;
|
|
167
181
|
|
|
168
182
|
declare const transfer_dryRun: typeof dryRun;
|
|
169
183
|
declare const transfer_dryRunOrigin: typeof dryRunOrigin;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNativeAssetSymbol, getOtherAssets, isSenderSigner, getEvmPrivateKeyHex, NumberFormatError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, InvalidAddressError, BatchMode, isConfig, findNativeAssetInfoOrThrowImpl, getChainProvidersImpl, PolkadotApi, Parents, findAssetInfoOrThrowImpl, hasXcmPaymentApiSupportImpl, replaceBigInt, hasDryRunSupportImpl, RuntimeApiUnavailableError, wrapTxBypass, RuntimeApiError, localizeLocation, isAssetXcEqual, createAssetId, addXcmVersionHeader, RELAY_LOCATION, getRelayChainOfImpl, isRelayChain, padValueBy, isAssetEqual, 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, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, CustomChainInvalidError, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, getXcmFee as getXcmFee$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1 } from '@paraspell/sdk-core';
|
|
1
|
+
import { getNativeAssetSymbol, getOtherAssets, isSenderSigner, getEvmPrivateKeyHex, NumberFormatError, createClientCache, MAX_CLIENTS, EXTENSION_MS, createClientPoolHelpers, InvalidAddressError, BatchMode, isConfig, findNativeAssetInfoOrThrowImpl, isCustomChain, getChainProvidersImpl, PolkadotApi, Parents, findAssetInfoOrThrowImpl, hasXcmPaymentApiSupportImpl, replaceBigInt, hasDryRunSupportImpl, RuntimeApiUnavailableError, wrapTxBypass, RuntimeApiError, localizeLocation, isAssetXcEqual, createAssetId, addXcmVersionHeader, RELAY_LOCATION, getRelayChainOfImpl, isRelayChain, padValueBy, isAssetEqual, 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, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, CustomChainInvalidError, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, getXcmFee as getXcmFee$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1 } from '@paraspell/sdk-core';
|
|
2
2
|
export * from '@paraspell/sdk-core';
|
|
3
3
|
import { secp256k1 } from '@noble/curves/secp256k1.js';
|
|
4
4
|
import { keccak_256 } from '@noble/hashes/sha3.js';
|
|
@@ -1861,9 +1861,10 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1861
1861
|
value: function disconnect() {
|
|
1862
1862
|
var _this$_config$apiOver;
|
|
1863
1863
|
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1864
|
-
|
|
1864
|
+
var chain = this._chain;
|
|
1865
|
+
if (!chain) return Promise.resolve();
|
|
1865
1866
|
if (!force && !this.disconnectAllowed) return Promise.resolve();
|
|
1866
|
-
var api = isConfig(this._config) ? (_this$_config$apiOver = this._config.apiOverrides) === null || _this$_config$apiOver === void 0 ? void 0 : _this$_config$apiOver[
|
|
1867
|
+
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;
|
|
1867
1868
|
// Own client provided, destroy only if force true
|
|
1868
1869
|
if (force && _typeof(api) === 'object') {
|
|
1869
1870
|
this.api.destroy();
|
|
@@ -1873,7 +1874,7 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1873
1874
|
if (force) {
|
|
1874
1875
|
this.api.destroy();
|
|
1875
1876
|
} else {
|
|
1876
|
-
var key = api === undefined ? getChainProvidersImpl(
|
|
1877
|
+
var key = api === undefined ? getChainProvidersImpl(chain, this._customCtx) : api;
|
|
1877
1878
|
releaseClient(key);
|
|
1878
1879
|
}
|
|
1879
1880
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "13.7.
|
|
3
|
+
"version": "13.7.2",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@polkadot-labs/hdkd": "^0.0.28",
|
|
28
28
|
"@polkadot-labs/hdkd-helpers": "^0.0.30",
|
|
29
29
|
"viem": "^2.51.3",
|
|
30
|
-
"@paraspell/sdk-core": "13.7.
|
|
30
|
+
"@paraspell/sdk-core": "13.7.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"polkadot-api": ">= 2 < 3"
|