@needmoretruth/nmts-cli 0.34.4 → 0.35.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/CHANGELOG.md +17 -0
- package/README.ko.md +15 -15
- package/README.md +1 -1
- package/dist/arg-options.d.ts +167 -0
- package/dist/arg-options.js +10 -0
- package/dist/args.d.ts +2 -157
- package/dist/args.js +2 -0
- package/dist/artifact-about.d.ts +1 -1
- package/dist/commands/extend.d.ts +2 -0
- package/dist/commands/extend.js +8 -1
- package/dist/commands/push-wallet.js +6 -0
- package/dist/commands/push.d.ts +2 -0
- package/dist/commands/put-payer.d.ts +8 -0
- package/dist/commands/put-payer.js +41 -0
- package/dist/commands/put-wallet.d.ts +9 -3
- package/dist/commands/put-wallet.js +105 -185
- package/dist/commands/put.d.ts +5 -7
- package/dist/commands/put.js +3 -26
- package/dist/commands/wallet-donate.d.ts +3 -0
- package/dist/commands/wallet-donate.js +6 -2
- package/dist/commands/wallet-list.d.ts +18 -0
- package/dist/commands/wallet-list.js +116 -0
- package/dist/commands/wallet-send.d.ts +4 -0
- package/dist/commands/wallet-send.js +6 -2
- package/dist/commands/wallet-use.d.ts +7 -0
- package/dist/commands/wallet-use.js +55 -0
- package/dist/commands/wallet.d.ts +4 -0
- package/dist/commands/wallet.js +20 -8
- package/dist/extend-plan.d.ts +2 -0
- package/dist/help.js +3 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +14 -1
- package/dist/main.js +4 -4
- package/dist/product.d.ts +1 -1
- package/dist/product.js +1 -1
- package/dist/risk.d.ts +4 -0
- package/dist/risk.js +6 -0
- package/dist/shared/lib/drive/manifest-ops.d.ts +8 -30
- package/dist/shared/lib/drive/manifest-ops.js +7 -39
- package/dist/shared/lib/drive/manifest-settings-patch.d.ts +52 -0
- package/dist/shared/lib/drive/manifest-settings-patch.js +110 -0
- package/dist/shared/lib/drive/manifest-settings.d.ts +55 -4
- package/dist/shared/lib/drive/manifest-settings.js +66 -28
- package/dist/shared/lib/wallet/discover.d.ts +54 -0
- package/dist/shared/lib/wallet/discover.js +66 -0
- package/dist/standing-tip.d.ts +3 -0
- package/dist/standing-tip.js +1 -0
- package/dist/upload-wallet-put.d.ts +118 -0
- package/dist/upload-wallet-put.js +221 -0
- package/dist/upload-wallet.d.ts +3 -0
- package/dist/upload-wallet.js +2 -0
- package/dist/wallet-list-chain.d.ts +4 -0
- package/dist/wallet-list-chain.js +21 -0
- package/dist/wallet-pay-index.d.ts +21 -0
- package/dist/wallet-pay-index.js +68 -0
- package/dist/wallet-sign-seams.d.ts +57 -0
- package/dist/wallet-sign-seams.js +16 -0
- package/dist/wallet-sign.d.ts +3 -53
- package/dist/wallet-sign.js +22 -15
- package/dist/wallet.d.ts +13 -13
- package/dist/wallet.js +15 -15
- package/docs/commands/wallet.md +18 -4
- package/package.json +1 -1
package/dist/wallet.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type CryptoGlue } from "./crypto.ts";
|
|
2
2
|
import type { Network } from "./network.ts";
|
|
3
3
|
/**
|
|
4
|
-
* The wallet this NMTS key opens by itself.
|
|
4
|
+
* The wallet this NMTS key opens by itself, when nobody has said which one.
|
|
5
5
|
*
|
|
6
|
-
* ⛔ IT IS WALLET 0 BECAUSE THAT IS THE ONE
|
|
7
|
-
* comes out of `wallet_seed_for` — there is no special case for the first — so the index is
|
|
8
|
-
* whole of the difference between
|
|
6
|
+
* ⛔ IT IS WALLET 0 BECAUSE THAT IS THE ONE EVERY ACCOUNT STARTS WITH. Every wallet, including this
|
|
7
|
+
* one, comes out of `wallet_seed_for` — there is no special case for the first — so the index is
|
|
8
|
+
* the whole of the difference between one wallet of this key and another.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* ⚠ IT IS THE OFFLINE ANSWER, NOT THE PAYING ONE (2026-09-16). `nmts wallet address` asks
|
|
11
|
+
* nothing of anybody and so cannot know which wallet the account pays from; every command that
|
|
12
|
+
* SPENDS reads that number out of the sealed file list first (`wallet-pay-index.ts`) and refuses
|
|
13
|
+
* rather than falling back here — paying from the wrong wallet is not a thing to guess at.
|
|
14
14
|
*/
|
|
15
15
|
export declare const BUILT_IN_WALLET_INDEX = 0;
|
|
16
16
|
/** The chain's own coin. Its type is fixed by the chain itself and takes no network. */
|
|
@@ -50,12 +50,12 @@ export declare function walCoinType(network: Network): string;
|
|
|
50
50
|
*/
|
|
51
51
|
export declare function addressFromSeed(seed: Uint8Array): string;
|
|
52
52
|
/**
|
|
53
|
-
* The address of the
|
|
53
|
+
* The address of one of the wallets this NMTS key derives. Offline: nothing is asked of anybody.
|
|
54
54
|
*
|
|
55
|
-
* The same address on every network —
|
|
56
|
-
* on is a separate question from what it is called.
|
|
55
|
+
* The same address on every network — a wallet is the same wallet on every chain, and which chain
|
|
56
|
+
* it is looked up on is a separate question from what it is called.
|
|
57
57
|
*/
|
|
58
|
-
export declare function walletAddress(code: string): Promise<string>;
|
|
58
|
+
export declare function walletAddress(code: string, index?: number): Promise<string>;
|
|
59
59
|
/**
|
|
60
60
|
* The engine functions this module uses. Narrowed to the one it actually calls.
|
|
61
61
|
*
|
|
@@ -73,7 +73,7 @@ export type WalletGlue = Pick<CryptoGlue, "wallet_seed_for">;
|
|
|
73
73
|
* engine expands from it — are wiped before it returns, on the failing path as well as the
|
|
74
74
|
* good one. Neither one leaves.
|
|
75
75
|
*/
|
|
76
|
-
export declare function addressFromDerived(glue: WalletGlue, derived: Uint8Array): string;
|
|
76
|
+
export declare function addressFromDerived(glue: WalletGlue, derived: Uint8Array, index?: number): string;
|
|
77
77
|
/**
|
|
78
78
|
* How much of one coin an address holds, exactly as the chain reported it — or why nobody knows.
|
|
79
79
|
*
|
package/dist/wallet.js
CHANGED
|
@@ -19,16 +19,16 @@ import { assertUsableCode } from "./account.js";
|
|
|
19
19
|
import { DERIVED, loadCrypto } from "./crypto.js";
|
|
20
20
|
import { NmtsError } from "./errors.js";
|
|
21
21
|
/**
|
|
22
|
-
* The wallet this NMTS key opens by itself.
|
|
22
|
+
* The wallet this NMTS key opens by itself, when nobody has said which one.
|
|
23
23
|
*
|
|
24
|
-
* ⛔ IT IS WALLET 0 BECAUSE THAT IS THE ONE
|
|
25
|
-
* comes out of `wallet_seed_for` — there is no special case for the first — so the index is
|
|
26
|
-
* whole of the difference between
|
|
24
|
+
* ⛔ IT IS WALLET 0 BECAUSE THAT IS THE ONE EVERY ACCOUNT STARTS WITH. Every wallet, including this
|
|
25
|
+
* one, comes out of `wallet_seed_for` — there is no special case for the first — so the index is
|
|
26
|
+
* the whole of the difference between one wallet of this key and another.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
28
|
+
* ⚠ IT IS THE OFFLINE ANSWER, NOT THE PAYING ONE (2026-09-16). `nmts wallet address` asks
|
|
29
|
+
* nothing of anybody and so cannot know which wallet the account pays from; every command that
|
|
30
|
+
* SPENDS reads that number out of the sealed file list first (`wallet-pay-index.ts`) and refuses
|
|
31
|
+
* rather than falling back here — paying from the wrong wallet is not a thing to guess at.
|
|
32
32
|
*/
|
|
33
33
|
export const BUILT_IN_WALLET_INDEX = 0;
|
|
34
34
|
/**
|
|
@@ -83,12 +83,12 @@ export function addressFromSeed(seed) {
|
|
|
83
83
|
return Ed25519Keypair.fromSecretKey(seed).toSuiAddress();
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
* The address of the
|
|
86
|
+
* The address of one of the wallets this NMTS key derives. Offline: nothing is asked of anybody.
|
|
87
87
|
*
|
|
88
|
-
* The same address on every network —
|
|
89
|
-
* on is a separate question from what it is called.
|
|
88
|
+
* The same address on every network — a wallet is the same wallet on every chain, and which chain
|
|
89
|
+
* it is looked up on is a separate question from what it is called.
|
|
90
90
|
*/
|
|
91
|
-
export async function walletAddress(code) {
|
|
91
|
+
export async function walletAddress(code, index = BUILT_IN_WALLET_INDEX) {
|
|
92
92
|
// ⛔ The one refusal text for a malformed code lives in `account.ts`. Checking here means a typo
|
|
93
93
|
// fails the same way it fails everywhere else in this tool rather than as an engine error.
|
|
94
94
|
await assertUsableCode(code);
|
|
@@ -108,7 +108,7 @@ export async function walletAddress(code) {
|
|
|
108
108
|
// everything sliced out of it, on the failing paths as well as the good one.
|
|
109
109
|
const derived = glue.kdf_derive(bytes);
|
|
110
110
|
try {
|
|
111
|
-
return addressFromDerived(glue, derived);
|
|
111
|
+
return addressFromDerived(glue, derived, index);
|
|
112
112
|
}
|
|
113
113
|
finally {
|
|
114
114
|
derived.fill(0);
|
|
@@ -123,12 +123,12 @@ export async function walletAddress(code) {
|
|
|
123
123
|
* engine expands from it — are wiped before it returns, on the failing path as well as the
|
|
124
124
|
* good one. Neither one leaves.
|
|
125
125
|
*/
|
|
126
|
-
export function addressFromDerived(glue, derived) {
|
|
126
|
+
export function addressFromDerived(glue, derived, index = BUILT_IN_WALLET_INDEX) {
|
|
127
127
|
const [from, to] = DERIVED.walletRoot;
|
|
128
128
|
const root = derived.slice(from, to);
|
|
129
129
|
let seed = null;
|
|
130
130
|
try {
|
|
131
|
-
seed = glue.wallet_seed_for(root,
|
|
131
|
+
seed = glue.wallet_seed_for(root, index);
|
|
132
132
|
return addressFromSeed(seed);
|
|
133
133
|
}
|
|
134
134
|
finally {
|
package/docs/commands/wallet.md
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
# nmts wallet — the wallet your NMTS key derives
|
|
2
2
|
|
|
3
3
|
Commands: wallet
|
|
4
|
-
Tiers: wallet=none · wallet.send=high(wallet) · wallet.swap=high(wallet) · wallet.donate=high(donate) · wallet.storage.reshape=high(wallet) · wallet.storage.give=high(wallet) · wallet.hall=none · wallet.hall.set=medium
|
|
4
|
+
Tiers: wallet=none · wallet.use=low · wallet.send=high(wallet) · wallet.swap=high(wallet) · wallet.donate=high(donate) · wallet.storage.reshape=high(wallet) · wallet.storage.give=high(wallet) · wallet.hall=none · wallet.hall.set=medium
|
|
5
5
|
|
|
6
6
|
`wallet` shows the address and its SUI and WAL balances; `wallet address` derives the address
|
|
7
|
-
offline (`--qr` draws it
|
|
8
|
-
proves it; `wallet storage` lists storage
|
|
9
|
-
these signs.
|
|
7
|
+
offline (`--qr` draws it, `--index N` derives another of this key's wallets); `wallet activity`
|
|
8
|
+
lists recent transactions, named only where the chain proves it; `wallet storage` lists storage
|
|
9
|
+
resources (size × time) held outside any file. None of these signs.
|
|
10
|
+
|
|
11
|
+
## One key, many wallets
|
|
12
|
+
|
|
13
|
+
Your NMTS key derives a wallet at every number from 0 upwards, and one of them pays. `wallet list`
|
|
14
|
+
walks them — it shows each number, its address and its balances, marks the one that pays, and stops
|
|
15
|
+
after twenty unused wallets in a row. `wallet use <number>` moves which one pays: the number is
|
|
16
|
+
kept inside your sealed file list, so the browser, this tool and every other device agree on it.
|
|
17
|
+
Numbers come from the key, so a wallet cannot be deleted, and a wallet you leave keeps whatever is
|
|
18
|
+
in it.
|
|
19
|
+
|
|
20
|
+
`put`, `push`, `extend`, `wallet send` and `wallet donate` all pay from that wallet, and each takes
|
|
21
|
+
`--wallet <number>` to pay from a different one for that run only, without changing the setting.
|
|
22
|
+
⛔ If the file list cannot be read, they refuse rather than falling back to wallet 0 — paying from
|
|
23
|
+
a wallet nobody chose is not a thing to guess at.
|
|
10
24
|
|
|
11
25
|
## Where SUI comes from, and why it is SUI
|
|
12
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needmoretruth/nmts-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Command-line and MCP access to NMTS (NeedMoreTruthStorage, https://nmts.me): open-source, end-to-end encrypted storage on the Walrus network. No fee to NMTS; you pay the network from your own wallet. For people and for their agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|