@galacticcouncil/sdk-next 0.27.2 → 0.28.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 +8 -7
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/types/api/Papi.d.ts +2 -2
- package/build/types/api/{ChainWatcher.d.ts → Watcher.d.ts} +2 -2
- package/build/types/api/index.d.ts +2 -2
- package/build/types/api/provider/index.d.ts +2 -0
- package/build/types/api/provider/smoldot.d.ts +1 -0
- package/build/types/client/AssetClient.d.ts +1 -1
- package/build/types/client/BalanceClient.d.ts +8 -13
- package/build/types/farm/LiquidityMiningApi.d.ts +1 -1
- package/build/types/pool/PoolClient.d.ts +3 -1
- package/build/types/staking/StakingApi.d.ts +1 -1
- package/build/types/tx/TxBuilder.d.ts +1 -1
- package/package.json +1 -1
- /package/build/types/api/{client.d.ts → provider/websocket.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -126,10 +126,11 @@ Gracefully cleans up SDK resources. Always call before exiting to avoid memory l
|
|
|
126
126
|
|
|
127
127
|
| Method | Description |
|
|
128
128
|
| :----- | :----------- |
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
129
|
+
| `watchBalance(address: string): Observable<AssetAmount>` | Subscribe account balance. |
|
|
130
|
+
| `watchSystemBalance(address: string): Observable<AssetAmount>` | Subscribe native account balance. |
|
|
131
|
+
| `watchTokenBalance(address: string, assetId: number): Observable<AssetAmount>` | Subscribe token account balance. |
|
|
132
|
+
| `watchTokensBalance(address: string): Observable<AssetAmount[]>` | Subscribe tokens account balances. |
|
|
133
|
+
| `watchErc20Balance(address: string, includeOnly?: number[]): Observable<AssetAmount[]>` | Subscribe erc20 assets balances |
|
|
133
134
|
|
|
134
135
|
➡️ For type definitions visit [types.ts](src/types.ts)<br />
|
|
135
136
|
|
|
@@ -137,7 +138,7 @@ Gracefully cleans up SDK resources. Always call before exiting to avoid memory l
|
|
|
137
138
|
|
|
138
139
|
| Method | Description |
|
|
139
140
|
| :----- | :----------- |
|
|
140
|
-
| `
|
|
141
|
+
| `getSupported(includeInvalid?: boolean, external?: ExternalAsset[]): Promise<Asset[]>` | Returns assets with metadata from registry. |
|
|
141
142
|
|
|
142
143
|
➡️ For type definitions visit [types.ts](src/types.ts)<br />
|
|
143
144
|
|
|
@@ -175,7 +176,7 @@ const { client } = sdk;
|
|
|
175
176
|
|
|
176
177
|
const account = "7L53bUTBbfuj14UpdCNPwmgzzHSsrsTWBHX5pys32mVWM3C1"
|
|
177
178
|
const subscription = client.balance
|
|
178
|
-
.
|
|
179
|
+
.watch(account)
|
|
179
180
|
.subscribe((balances) => {
|
|
180
181
|
console.log(balances);
|
|
181
182
|
});
|
|
@@ -188,7 +189,7 @@ Get default on-chain data.
|
|
|
188
189
|
```typescript
|
|
189
190
|
const { client } = sdk;
|
|
190
191
|
|
|
191
|
-
const assets = await client.asset.
|
|
192
|
+
const assets = await client.asset.getSupported();
|
|
192
193
|
console.log(assets);
|
|
193
194
|
```
|
|
194
195
|
|