@paraspell/sdk-pjs 11.4.2 → 11.5.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/README.md +12 -0
- package/dist/index.d.ts +5 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -344,6 +344,18 @@ const transferable = await Builder(/*chain api/builder_config/ws_url_string/ws_u
|
|
|
344
344
|
.getTransferableAmount()
|
|
345
345
|
```
|
|
346
346
|
|
|
347
|
+
#### Minimal transferable amount
|
|
348
|
+
```ts
|
|
349
|
+
const transferable = await Builder(/*chain api/builder_config/ws_url_string/ws_url_array - optional*/)
|
|
350
|
+
.from(ORIGIN_CHAIN)
|
|
351
|
+
.to(DESTINATION_CHAIN)
|
|
352
|
+
.currency(CURRENCY)
|
|
353
|
+
/*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.*/
|
|
354
|
+
.address(RECIPIENT_ADDRESS)
|
|
355
|
+
.senderAddress(SENDER_ADDRESS)
|
|
356
|
+
.getMinTransferableAmount()
|
|
357
|
+
```
|
|
358
|
+
|
|
347
359
|
#### Verify ED on destination
|
|
348
360
|
```ts
|
|
349
361
|
const ed = await Builder(/*chain api/builder_config/ws_url_string/ws_url_array - optional*/)
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ type TEvmBuilderOptionsBase = {
|
|
|
42
42
|
type TPjsEvmBuilderOptions<TApi, TRes> = WithApi<TEvmBuilderOptionsBase, TApi, TRes> & {
|
|
43
43
|
provider?: AbstractProvider;
|
|
44
44
|
};
|
|
45
|
+
type TBalanceResponse = {
|
|
46
|
+
free?: string;
|
|
47
|
+
balance?: string;
|
|
48
|
+
};
|
|
45
49
|
|
|
46
50
|
/**
|
|
47
51
|
* Retrieves the native balance for a given account on a specified chain.
|
|
@@ -280,4 +284,4 @@ declare namespace transfer {
|
|
|
280
284
|
declare const createChainClient: (chain: TSubstrateChain) => Promise<_polkadot_api.ApiPromise>;
|
|
281
285
|
|
|
282
286
|
export { Builder, EvmBuilder, approveToken, assets, claimAssets, convertSs58, createChainClient, depositToken, dryRun, dryRunOrigin, getAssetBalance, getBalanceForeign, getBalanceNative, getBridgeStatus, getOriginFeeDetails, getParaEthTransferFees, getTokenBalance, send, transferEthToPolkadot, transfer as xcmPallet };
|
|
283
|
-
export type { Extrinsic, GeneralBuilder, TPjsApi, TPjsApiOrUrl, TPjsEvmBuilderOptions };
|
|
287
|
+
export type { Extrinsic, GeneralBuilder, TBalanceResponse, TPjsApi, TPjsApiOrUrl, TPjsEvmBuilderOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.5.1",
|
|
4
4
|
"description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@snowbridge/contract-types": "0.2.0",
|
|
28
28
|
"ethers": "^6.15.0",
|
|
29
29
|
"viem": "^2.36.0",
|
|
30
|
-
"@paraspell/sdk-core": "11.
|
|
30
|
+
"@paraspell/sdk-core": "11.5.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@polkadot/api": ">= 16.0 < 17",
|