wative-core 2.5.6 → 2.5.7
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/CHANGELOG.md +11 -0
- package/README.md +5 -6
- package/dist/artifacts/evm/index.cjs +1 -1
- package/dist/artifacts/evm/index.d.cts +2 -2
- package/dist/artifacts/evm/index.d.ts +2 -2
- package/dist/artifacts/evm/index.js +1 -1
- package/dist/artifacts/svm/index.cjs +1 -1
- package/dist/artifacts/svm/index.d.cts +3 -3
- package/dist/artifacts/svm/index.d.ts +3 -3
- package/dist/artifacts/svm/index.js +1 -1
- package/dist/{container-provider-BOFF5wqv.d.ts → container-provider-CqpIaus8.d.ts} +1 -1
- package/dist/{container-provider-QvO3JYFb.d.cts → container-provider-sRxvigzk.d.cts} +1 -1
- package/dist/{evm-BWORcsia.d.ts → evm-KpZ3cLDe.d.ts} +1 -1
- package/dist/{evm-DaLCh_ce.d.cts → evm-hYUvjm9n.d.cts} +1 -1
- package/dist/{file-sink-DJEWW4yu.d.cts → file-sink-B94nIe1u.d.cts} +2 -2
- package/dist/{file-sink-bJzTrooq.d.ts → file-sink-Di2hJA5x.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/index.node.cjs +1 -1
- package/dist/index.node.d.cts +5 -5
- package/dist/index.node.d.ts +5 -5
- package/dist/index.node.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +1 -1
- package/dist/{svm-BYbTqW4J.d.cts → svm-B88JqNxb.d.cts} +1 -1
- package/dist/{svm-5rQU53_9.d.ts → svm-DYpcdzPR.d.ts} +1 -1
- package/dist/{workspace-D7nb3-cO.d.cts → workspace-g-1DGOHJ.d.cts} +37 -2
- package/dist/{workspace-D7nb3-cO.d.ts → workspace-g-1DGOHJ.d.ts} +37 -2
- package/examples/05-asset-management.test.cjs +135 -36
- package/examples/08-persistence.test.cjs +6 -6
- package/examples/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `wative-core` are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [2.5.7] — 2026-10-12
|
|
6
|
+
|
|
7
|
+
Lets you add, edit, reorder and remove a network's tokens, and save the changes.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- A network's tokens are now an editable list — `network.assets` — with `add`, `update`, `drop`, `move` and `byId`.
|
|
11
|
+
- Edit a token with `workspace.updateAsset(id, changes)` or `asset.save()`, and add one from its details with `workspace.addAsset(...)`; new types `AssetAddInit`, `AssetUpdate` and `NetworkAssetCollection`.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- A built-in token may change only its display settings and cannot be removed; a user-added token may change every detail and be removed, and a token's id, contract address and network never change. `workspace.addAsset(asset)`, `workspace.dropAsset` and `workspace.moveAsset` are deprecated in favour of a network's token list.
|
|
15
|
+
|
|
5
16
|
## [2.5.6] — 2026-10-11
|
|
6
17
|
|
|
7
18
|
Adds the Ink network and a portable, password-protected backup of an account's seed phrase, and tightens the rules for account and network names.
|
package/README.md
CHANGED
|
@@ -607,22 +607,21 @@ await hd.setDefaultNetwork(Network.Base);
|
|
|
607
607
|
### Asset — pre-loaded tokens + custom tokens
|
|
608
608
|
|
|
609
609
|
```ts
|
|
610
|
-
import {
|
|
610
|
+
import { Network } from "wative-core";
|
|
611
611
|
|
|
612
612
|
const ethAssets = await ws.assets(Network.Ethereum);
|
|
613
613
|
console.log(ethAssets.map((a) => a.symbol));
|
|
614
614
|
|
|
615
|
-
const
|
|
616
|
-
|
|
615
|
+
const eth = ws.networks.bySlug("ethereum");
|
|
616
|
+
const pepe = await eth.assets.add({
|
|
617
617
|
symbol: "PEPE",
|
|
618
618
|
name: "Pepe",
|
|
619
619
|
decimals: 18,
|
|
620
620
|
contractAddress: "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
|
|
621
|
-
network: Network.Ethereum,
|
|
622
621
|
});
|
|
623
|
-
await ws.addAsset(myToken);
|
|
624
622
|
|
|
625
|
-
await
|
|
623
|
+
await eth.assets.update(pepe.id, { displayStatus: false });
|
|
624
|
+
await eth.assets.drop(pepe.id);
|
|
626
625
|
|
|
627
626
|
const found = await ws.filter("USDC", "Asset");
|
|
628
627
|
const byAddr = await ws.filter("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "Asset");
|