@paraspell/sdk-pjs 10.10.11 → 10.11.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 +33 -4
- package/dist/index.cjs +231 -211
- package/dist/index.mjs +232 -212
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -69,16 +69,17 @@ import { Native, Foreign, ForeignAbstract } from '@paraspell/sdk-pjs'; //Only ne
|
|
|
69
69
|
|
|
70
70
|
```
|
|
71
71
|
NOTES:
|
|
72
|
-
- Local transfers are now available for every currency and every chain. To try them, simply use same origin and destination parameters.
|
|
72
|
+
- Local transfers are now available for every currency and every chain. To try them, simply use the same origin and destination parameters.
|
|
73
|
+
- Transfer info queries are now all in the Builder pattern and don't require any imports other than the builder.
|
|
74
|
+
- You can now query Ethereum asset balances on Ethereum via balance query
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
```
|
|
76
78
|
Latest news:
|
|
77
|
-
-
|
|
78
|
-
- You can now query Ethereum asset balances on Ethereum via balance query
|
|
79
|
+
- The Builder() now accepts an optional configuration object (To enhance localhost experience and testing). This object can contain apiOverrides and a development flag. More information in the "Localhost test setup" section.
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
### Sending XCM
|
|
82
|
+
### Sending XCM
|
|
82
83
|
|
|
83
84
|
For full documentation with examples on this feature head over to [official documentation](https://paraspell.github.io/docs/sdk/xcmPallet.html).
|
|
84
85
|
|
|
@@ -270,6 +271,30 @@ import { hasDryRunSupport } from "@paraspell/sdk-pjs";
|
|
|
270
271
|
const result = hasDryRunSupport(node)
|
|
271
272
|
```
|
|
272
273
|
|
|
274
|
+
### Localhost test setup
|
|
275
|
+
|
|
276
|
+
SDK offers enhanced localhost support. You can pass an object containing overrides for all WS endpoints (Including hops) used in the test transfer. This allows for advanced localhost testing such as localhost dry-run or xcm-fee queries. More information about available options can be found in the [official documentation](https://paraspell.github.io/docs/sdk/xcmPallet.html#localhost-testing-setup).
|
|
277
|
+
|
|
278
|
+
```ts
|
|
279
|
+
const builder = await Builder({
|
|
280
|
+
development: true, // Optional: Enforces overrides for all chains used
|
|
281
|
+
apiOverrides: {
|
|
282
|
+
Hydration: // "wsEndpointString" | papiClient
|
|
283
|
+
BridgeHubPolkadot: // "wsEndpointString" | papiClient
|
|
284
|
+
//ChainName: ...
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
.from(CHAIN)
|
|
288
|
+
.to(CHAIN)
|
|
289
|
+
.currency({id: currencyID, amount: amount} | {symbol: currencySymbol, amount: amount} | {symbol: Native('currencySymbol'), amount: amount} | {symbol: Foreign('currencySymbol'), amount: amount} | {symbol: ForeignAbstract('currencySymbol'), amount: amount} | {multilocation: AssetMultilocationString, amount: amount | AssetMultilocationJson, amount: amount} | {multilocation: Override('Custom Multilocation'), amount: amount} | {multiasset: {currencySelection /* for example symbol: symbol or id: id, or multilocation: multilocation*/, amount: amount}})
|
|
290
|
+
.address(address)
|
|
291
|
+
|
|
292
|
+
const tx = await builder.build()
|
|
293
|
+
|
|
294
|
+
//Disconnect API after TX
|
|
295
|
+
await builder.disconnect()
|
|
296
|
+
```
|
|
297
|
+
|
|
273
298
|
### XCM Fee queries
|
|
274
299
|
|
|
275
300
|
For full documentation with examples on this feature head over to [official documentation](https://paraspell.github.io/docs/sdk/xcmUtils.html).
|
|
@@ -474,6 +499,10 @@ console.log(SUPPORTED_PALLETS)
|
|
|
474
499
|
|
|
475
500
|
XCM SDK can be tested in [Playground](https://playground.paraspell.xyz/xcm-sdk/xcm-transfer).
|
|
476
501
|
|
|
502
|
+
## Contribute to XCM Tools and earn rewards 💰
|
|
503
|
+
|
|
504
|
+
We run an open Bug Bounty Program that rewards contributors for reporting and fixing bugs in the project. More information on bug bounty can be found in the [official documentation](https://paraspell.github.io/docs/contribution.html).
|
|
505
|
+
|
|
477
506
|
## Get Support 🚑
|
|
478
507
|
|
|
479
508
|
- Contact form on our [landing page](https://paraspell.xyz/#contact-us).
|