@galacticcouncil/sdk-next 0.22.0 → 0.23.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/README.md +3 -2
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/types/api/client.d.ts +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,13 +37,14 @@ Use `createSdkContext` to quickly set up all components of the SDK — pool cont
|
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
39
|
import { api, createSdkContext } from '@galacticcouncil/sdk-next';
|
|
40
|
+
import { createClient } from 'polkadot-api';
|
|
40
41
|
|
|
41
|
-
const
|
|
42
|
+
const provider = api.getWs('wss://hydradx-rpc.dwellir.com');
|
|
43
|
+
const client = createClient(provider);
|
|
42
44
|
const sdk = await createSdkContext(client);
|
|
43
45
|
|
|
44
46
|
// Don't forget to cleanup resources when DONE
|
|
45
47
|
sdk.destroy();
|
|
46
|
-
client.destroy();
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
It handles all necessary setup under the hood. Just plug in your PolkadotClient, and you're ready to interact with registry, accounts, pools, router, and more.
|