wative-core 2.5.5 → 2.5.6
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 +17 -0
- package/README.md +43 -5
- 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-DeEiua4J.d.ts → container-provider-BOFF5wqv.d.ts} +1 -1
- package/dist/{container-provider-BGXrTnGa.d.cts → container-provider-QvO3JYFb.d.cts} +1 -1
- package/dist/{evm-D3zji6gT.d.ts → evm-BWORcsia.d.ts} +1 -1
- package/dist/{evm-TSU9rVlb.d.cts → evm-DaLCh_ce.d.cts} +1 -1
- package/dist/{file-sink-BsfIT5JJ.d.cts → file-sink-DJEWW4yu.d.cts} +2 -2
- package/dist/{file-sink-DAitYVxc.d.ts → file-sink-bJzTrooq.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +36 -7
- package/dist/index.d.ts +36 -7
- package/dist/index.js +1 -1
- package/dist/index.node.cjs +1 -1
- package/dist/index.node.d.cts +6 -6
- package/dist/index.node.d.ts +6 -6
- 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-B66vNECq.d.ts → svm-5rQU53_9.d.ts} +1 -1
- package/dist/{svm-DuJBblmu.d.cts → svm-BYbTqW4J.d.cts} +1 -1
- package/dist/{workspace-_8Ed5yFS.d.cts → workspace-D7nb3-cO.d.cts} +6 -2
- package/dist/{workspace-_8Ed5yFS.d.ts → workspace-D7nb3-cO.d.ts} +6 -2
- package/examples/04-network-management.test.cjs +5 -5
- package/examples/07-custom-provider.test.cjs +1 -1
- package/examples/README.md +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Address, a5 as SvmTxBuildParams, a4 as SvmTransaction, N as Network, a2 as SvmAddressLookupTable } from './workspace-
|
|
1
|
+
import { c as Address, a5 as SvmTxBuildParams, a4 as SvmTransaction, N as Network, a2 as SvmAddressLookupTable } from './workspace-D7nb3-cO.js';
|
|
2
2
|
|
|
3
3
|
declare function svmResolveAddressLookupTables(network: Network, addresses: readonly string[]): Promise<SvmAddressLookupTable[]>;
|
|
4
4
|
interface SvmInstruction {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Address, a5 as SvmTxBuildParams, a4 as SvmTransaction, N as Network, a2 as SvmAddressLookupTable } from './workspace-
|
|
1
|
+
import { c as Address, a5 as SvmTxBuildParams, a4 as SvmTransaction, N as Network, a2 as SvmAddressLookupTable } from './workspace-D7nb3-cO.cjs';
|
|
2
2
|
|
|
3
3
|
declare function svmResolveAddressLookupTables(network: Network, addresses: readonly string[]): Promise<SvmAddressLookupTable[]>;
|
|
4
4
|
interface SvmInstruction {
|
|
@@ -119,6 +119,7 @@ declare class Network {
|
|
|
119
119
|
static readonly HyperEVMTestnet: Network;
|
|
120
120
|
static readonly Robinhood: Network;
|
|
121
121
|
static readonly RobinhoodTestnet: Network;
|
|
122
|
+
static readonly Ink: Network;
|
|
122
123
|
static builtin(slug: Slug): Network | null;
|
|
123
124
|
static all(): readonly Network[];
|
|
124
125
|
static isBuiltinSlug(slug: Slug): boolean;
|
|
@@ -801,6 +802,7 @@ declare class Wallet {
|
|
|
801
802
|
clearTags(): Promise<void>;
|
|
802
803
|
|
|
803
804
|
dumpPrivateKey(vm: ChainVM): string;
|
|
805
|
+
|
|
804
806
|
drop(): Promise<void>;
|
|
805
807
|
readonly _account: Account;
|
|
806
808
|
}
|
|
@@ -844,7 +846,10 @@ declare class Account {
|
|
|
844
846
|
readonly organizationType: AccountOrgType;
|
|
845
847
|
encryptionAlgorithm: string;
|
|
846
848
|
signature: string;
|
|
847
|
-
|
|
849
|
+
|
|
850
|
+
get ppCiphertext(): string | undefined;
|
|
851
|
+
|
|
852
|
+
set ppCiphertext(_value: string | undefined);
|
|
848
853
|
readonly hasOwnPassword: boolean;
|
|
849
854
|
readonly _workspace: Workspace;
|
|
850
855
|
readonly wallets: WalletCollection;
|
|
@@ -939,7 +944,6 @@ interface WalletCollection extends ReadonlyArray<Wallet> {
|
|
|
939
944
|
drop(wallet: Wallet): Promise<void>;
|
|
940
945
|
byId(id: number): Wallet | null;
|
|
941
946
|
}
|
|
942
|
-
|
|
943
947
|
declare function newMnemonic(wordCount?: 12 | 15 | 18 | 21 | 24): string;
|
|
944
948
|
|
|
945
949
|
type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
@@ -119,6 +119,7 @@ declare class Network {
|
|
|
119
119
|
static readonly HyperEVMTestnet: Network;
|
|
120
120
|
static readonly Robinhood: Network;
|
|
121
121
|
static readonly RobinhoodTestnet: Network;
|
|
122
|
+
static readonly Ink: Network;
|
|
122
123
|
static builtin(slug: Slug): Network | null;
|
|
123
124
|
static all(): readonly Network[];
|
|
124
125
|
static isBuiltinSlug(slug: Slug): boolean;
|
|
@@ -801,6 +802,7 @@ declare class Wallet {
|
|
|
801
802
|
clearTags(): Promise<void>;
|
|
802
803
|
|
|
803
804
|
dumpPrivateKey(vm: ChainVM): string;
|
|
805
|
+
|
|
804
806
|
drop(): Promise<void>;
|
|
805
807
|
readonly _account: Account;
|
|
806
808
|
}
|
|
@@ -844,7 +846,10 @@ declare class Account {
|
|
|
844
846
|
readonly organizationType: AccountOrgType;
|
|
845
847
|
encryptionAlgorithm: string;
|
|
846
848
|
signature: string;
|
|
847
|
-
|
|
849
|
+
|
|
850
|
+
get ppCiphertext(): string | undefined;
|
|
851
|
+
|
|
852
|
+
set ppCiphertext(_value: string | undefined);
|
|
848
853
|
readonly hasOwnPassword: boolean;
|
|
849
854
|
readonly _workspace: Workspace;
|
|
850
855
|
readonly wallets: WalletCollection;
|
|
@@ -939,7 +944,6 @@ interface WalletCollection extends ReadonlyArray<Wallet> {
|
|
|
939
944
|
drop(wallet: Wallet): Promise<void>;
|
|
940
945
|
byId(id: number): Wallet | null;
|
|
941
946
|
}
|
|
942
|
-
|
|
943
947
|
declare function newMnemonic(wordCount?: 12 | 15 | 18 | 21 | 24): string;
|
|
944
948
|
|
|
945
949
|
type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
@@ -8,15 +8,15 @@ const { join } = require("node:path");
|
|
|
8
8
|
|
|
9
9
|
const { Workspace, Network } = require("wative-core");
|
|
10
10
|
|
|
11
|
-
test("network —
|
|
11
|
+
test("network — the pre-loaded networks ship at workspace open", async () => {
|
|
12
12
|
const root = mkdtempSync(join(tmpdir(), "wative-net-builtin-"));
|
|
13
13
|
const ws = await Workspace.open({ path: root, password: "wsp-pwd" });
|
|
14
14
|
|
|
15
15
|
const slugs = ws.networks.map((n) => n.slug).sort();
|
|
16
16
|
assert.deepStrictEqual(slugs, [
|
|
17
17
|
"arbitrum", "arbitrum-sepolia", "base", "bnbchain", "ethereum",
|
|
18
|
-
"hyperevm", "hyperevm-testnet", "
|
|
19
|
-
"sepolia", "solana", "solana-devnet", "solana-testnet",
|
|
18
|
+
"hyperevm", "hyperevm-testnet", "ink", "optimism", "robinhood",
|
|
19
|
+
"robinhood-testnet", "sepolia", "solana", "solana-devnet", "solana-testnet",
|
|
20
20
|
]);
|
|
21
21
|
|
|
22
22
|
assert.strictEqual(Network.ArbitrumSepolia.chainId, 421614);
|
|
@@ -43,7 +43,7 @@ test("network — add a brand-new user network", async () => {
|
|
|
43
43
|
});
|
|
44
44
|
await ws.networks.add(monad);
|
|
45
45
|
|
|
46
|
-
assert.strictEqual(ws.networks.length,
|
|
46
|
+
assert.strictEqual(ws.networks.length, 16);
|
|
47
47
|
assert.strictEqual(ws.networks.bySlug("monad-testnet").chainId, 10143);
|
|
48
48
|
await assert.rejects(ws.networks.add(monad), (err) => err.code === "DUPLICATE_IDENTITY");
|
|
49
49
|
|
|
@@ -65,7 +65,7 @@ test("network — override a pre-loaded RPC URL via update()", async () => {
|
|
|
65
65
|
ws.networks.bySlug("ethereum").rpcUrl,
|
|
66
66
|
"https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
|
|
67
67
|
);
|
|
68
|
-
assert.strictEqual(ws.networks.length,
|
|
68
|
+
assert.strictEqual(ws.networks.length, 15);
|
|
69
69
|
|
|
70
70
|
await ws.lock();
|
|
71
71
|
});
|
|
@@ -128,7 +128,7 @@ test("custom provider — full lifecycle against an in-memory backend", async ()
|
|
|
128
128
|
assert.strictEqual(ws.locked, false);
|
|
129
129
|
|
|
130
130
|
const slugs = ws.networks.map((n) => n.slug).sort();
|
|
131
|
-
assert.strictEqual(slugs.length,
|
|
131
|
+
assert.strictEqual(slugs.length, 15);
|
|
132
132
|
assert.ok(slugs.includes("ethereum"));
|
|
133
133
|
assert.ok(slugs.includes("arbitrum-sepolia"));
|
|
134
134
|
|
package/examples/README.md
CHANGED
|
@@ -34,8 +34,8 @@ All tests work fully offline — no RPC calls, no real networks. Each test creat
|
|
|
34
34
|
| [01-quick-start.test.cjs](01-quick-start.test.cjs) | Open a workspace, create an HD account, derive 5 wallets, inspect EVM + Solana addresses, lock. |
|
|
35
35
|
| [02-hd-account.test.cjs](02-hd-account.test.cjs) | HD-specific flows — deriving / slicing wallets, dumping the mnemonic, account-level passwords with `resetPassword`, round-trip across lock + reopen. |
|
|
36
36
|
| [03-pk-account.test.cjs](03-pk-account.test.cjs) | PK accounts — creating from a private key, importing more keys, and the three key formats accepted (EVM hex, Solana base58, `solana-keygen` JSON) with the chain inferred from the key. Also shows each import producing an address on both chains, duplicate-import rejection, and dropping wallets. |
|
|
37
|
-
| [04-network-management.test.cjs](04-network-management.test.cjs) | The
|
|
38
|
-
| [05-asset-management.test.cjs](05-asset-management.test.cjs) | The
|
|
37
|
+
| [04-network-management.test.cjs](04-network-management.test.cjs) | The 15 pre-loaded networks, adding a brand-new network, overriding a pre-loaded RPC URL via `update()`, dropping user networks, the built-in protection guard. |
|
|
38
|
+
| [05-asset-management.test.cjs](05-asset-management.test.cjs) | The 32 pre-loaded tokens, adding a custom user token, id collision rejection, contract-address collision rejection, dropping user tokens, `workspace.filter(q, "Asset")` search. |
|
|
39
39
|
| [06-address-signing.test.cjs](06-address-signing.test.cjs) | Personal-message signing on EVM and Solana, building a transaction fully offline (no RPC). |
|
|
40
40
|
| [07-custom-provider.test.cjs](07-custom-provider.test.cjs) | Taking over the record layer as well, by extending `Provider` rather than `ContainerProvider` — for storage that has its own encryption or its own idea of a record. Longer than [19](19-simple-provider.test.cjs); start there unless you need this. |
|
|
41
41
|
| [08-persistence.test.cjs](08-persistence.test.cjs) | Round-trip across `lock()` + reopen — multiple accounts, user networks, custom assets, and logger configuration. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wative-core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "Hyperscale crypto wallet management library — multi-workspace, multi-chain, originally designed for on-chain market makers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.node.cjs",
|
|
@@ -102,6 +102,6 @@
|
|
|
102
102
|
"tweetnacl": "1.0.3"
|
|
103
103
|
},
|
|
104
104
|
"optionalDependencies": {
|
|
105
|
-
"@node-rs/argon2": "
|
|
105
|
+
"@node-rs/argon2": "2.0.2"
|
|
106
106
|
}
|
|
107
107
|
}
|