@glyphteck/veyl 0.62.0 → 0.63.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/LICENSE +1 -1
- package/dist/account.js +134 -26
- package/dist/auth.js +30 -9
- package/dist/cli.js +15632 -15316
- package/dist/index.js +15677 -15361
- package/dist/kdf-worker-thread.js +8 -119
- package/docs/agents.md +1 -1
- package/docs/api.md +2 -2
- package/docs/cli.md +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -404,7 +406,6 @@ import { parentPort } from "node:worker_threads";
|
|
|
404
406
|
init__u64();
|
|
405
407
|
|
|
406
408
|
// ../../node_modules/.bun/@noble+hashes@2.3.0/node_modules/@noble/hashes/_blake.js
|
|
407
|
-
init_utils();
|
|
408
409
|
var BSIGMA = /* @__PURE__ */ Uint8Array.from([
|
|
409
410
|
0,
|
|
410
411
|
1,
|
|
@@ -663,23 +664,8 @@ var BSIGMA = /* @__PURE__ */ Uint8Array.from([
|
|
|
663
664
|
1,
|
|
664
665
|
9
|
|
665
666
|
]);
|
|
666
|
-
function G1s(a, b, c, d, x) {
|
|
667
|
-
a = a + b + x | 0;
|
|
668
|
-
d = rotr(d ^ a, 16);
|
|
669
|
-
c = c + d | 0;
|
|
670
|
-
b = rotr(b ^ c, 12);
|
|
671
|
-
return { a, b, c, d };
|
|
672
|
-
}
|
|
673
|
-
function G2s(a, b, c, d, x) {
|
|
674
|
-
a = a + b + x | 0;
|
|
675
|
-
d = rotr(d ^ a, 8);
|
|
676
|
-
c = c + d | 0;
|
|
677
|
-
b = rotr(b ^ c, 7);
|
|
678
|
-
return { a, b, c, d };
|
|
679
|
-
}
|
|
680
667
|
|
|
681
668
|
// ../../node_modules/.bun/@noble+hashes@2.3.0/node_modules/@noble/hashes/blake2.js
|
|
682
|
-
init__md();
|
|
683
669
|
init__u64();
|
|
684
670
|
init_utils();
|
|
685
671
|
var B2B_IV = /* @__PURE__ */ Uint32Array.from([
|
|
@@ -1013,103 +999,6 @@ class _BLAKE2b extends _BLAKE2 {
|
|
|
1013
999
|
}
|
|
1014
1000
|
}
|
|
1015
1001
|
var blake2b = /* @__PURE__ */ createHasher((opts) => new _BLAKE2b(opts));
|
|
1016
|
-
function _compress(s, offset, msg, rounds, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) {
|
|
1017
|
-
let j = 0;
|
|
1018
|
-
for (let i = 0;i < rounds; i++) {
|
|
1019
|
-
({ a: v0, b: v4, c: v8, d: v12 } = G1s(v0, v4, v8, v12, msg[offset + s[j++]]));
|
|
1020
|
-
({ a: v0, b: v4, c: v8, d: v12 } = G2s(v0, v4, v8, v12, msg[offset + s[j++]]));
|
|
1021
|
-
({ a: v1, b: v5, c: v9, d: v13 } = G1s(v1, v5, v9, v13, msg[offset + s[j++]]));
|
|
1022
|
-
({ a: v1, b: v5, c: v9, d: v13 } = G2s(v1, v5, v9, v13, msg[offset + s[j++]]));
|
|
1023
|
-
({ a: v2, b: v6, c: v10, d: v14 } = G1s(v2, v6, v10, v14, msg[offset + s[j++]]));
|
|
1024
|
-
({ a: v2, b: v6, c: v10, d: v14 } = G2s(v2, v6, v10, v14, msg[offset + s[j++]]));
|
|
1025
|
-
({ a: v3, b: v7, c: v11, d: v15 } = G1s(v3, v7, v11, v15, msg[offset + s[j++]]));
|
|
1026
|
-
({ a: v3, b: v7, c: v11, d: v15 } = G2s(v3, v7, v11, v15, msg[offset + s[j++]]));
|
|
1027
|
-
({ a: v0, b: v5, c: v10, d: v15 } = G1s(v0, v5, v10, v15, msg[offset + s[j++]]));
|
|
1028
|
-
({ a: v0, b: v5, c: v10, d: v15 } = G2s(v0, v5, v10, v15, msg[offset + s[j++]]));
|
|
1029
|
-
({ a: v1, b: v6, c: v11, d: v12 } = G1s(v1, v6, v11, v12, msg[offset + s[j++]]));
|
|
1030
|
-
({ a: v1, b: v6, c: v11, d: v12 } = G2s(v1, v6, v11, v12, msg[offset + s[j++]]));
|
|
1031
|
-
({ a: v2, b: v7, c: v8, d: v13 } = G1s(v2, v7, v8, v13, msg[offset + s[j++]]));
|
|
1032
|
-
({ a: v2, b: v7, c: v8, d: v13 } = G2s(v2, v7, v8, v13, msg[offset + s[j++]]));
|
|
1033
|
-
({ a: v3, b: v4, c: v9, d: v14 } = G1s(v3, v4, v9, v14, msg[offset + s[j++]]));
|
|
1034
|
-
({ a: v3, b: v4, c: v9, d: v14 } = G2s(v3, v4, v9, v14, msg[offset + s[j++]]));
|
|
1035
|
-
}
|
|
1036
|
-
return { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 };
|
|
1037
|
-
}
|
|
1038
|
-
var B2S_IV = /* @__PURE__ */ SHA256_IV.slice();
|
|
1039
|
-
|
|
1040
|
-
class _BLAKE2s extends _BLAKE2 {
|
|
1041
|
-
v0 = B2S_IV[0] | 0;
|
|
1042
|
-
v1 = B2S_IV[1] | 0;
|
|
1043
|
-
v2 = B2S_IV[2] | 0;
|
|
1044
|
-
v3 = B2S_IV[3] | 0;
|
|
1045
|
-
v4 = B2S_IV[4] | 0;
|
|
1046
|
-
v5 = B2S_IV[5] | 0;
|
|
1047
|
-
v6 = B2S_IV[6] | 0;
|
|
1048
|
-
v7 = B2S_IV[7] | 0;
|
|
1049
|
-
constructor(opts = {}) {
|
|
1050
|
-
opts = checkOpts({}, opts);
|
|
1051
|
-
const olen = opts.dkLen === undefined ? 32 : opts.dkLen;
|
|
1052
|
-
super(64, olen);
|
|
1053
|
-
checkBlake2Opts(olen, opts, 32, 8, 8);
|
|
1054
|
-
let { key, personalization, salt } = opts;
|
|
1055
|
-
let keyLength = 0;
|
|
1056
|
-
if (key !== undefined) {
|
|
1057
|
-
abytes(key, undefined, "key");
|
|
1058
|
-
keyLength = key.length;
|
|
1059
|
-
}
|
|
1060
|
-
this.v0 ^= this.outputLen | keyLength << 8 | 1 << 16 | 1 << 24;
|
|
1061
|
-
if (salt !== undefined) {
|
|
1062
|
-
abytes(salt, undefined, "salt");
|
|
1063
|
-
const slt = u32(copyBytes(salt));
|
|
1064
|
-
this.v4 ^= swap8IfBE(slt[0]);
|
|
1065
|
-
this.v5 ^= swap8IfBE(slt[1]);
|
|
1066
|
-
}
|
|
1067
|
-
if (personalization !== undefined) {
|
|
1068
|
-
abytes(personalization, undefined, "personalization");
|
|
1069
|
-
const pers = u32(copyBytes(personalization));
|
|
1070
|
-
this.v6 ^= swap8IfBE(pers[0]);
|
|
1071
|
-
this.v7 ^= swap8IfBE(pers[1]);
|
|
1072
|
-
}
|
|
1073
|
-
if (key !== undefined) {
|
|
1074
|
-
const tmp = new Uint8Array(this.blockLen);
|
|
1075
|
-
tmp.set(key);
|
|
1076
|
-
this.update(tmp);
|
|
1077
|
-
clean(tmp);
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
get() {
|
|
1081
|
-
const { v0, v1, v2, v3, v4, v5, v6, v7 } = this;
|
|
1082
|
-
return [v0, v1, v2, v3, v4, v5, v6, v7];
|
|
1083
|
-
}
|
|
1084
|
-
set(v0, v1, v2, v3, v4, v5, v6, v7) {
|
|
1085
|
-
this.v0 = v0 | 0;
|
|
1086
|
-
this.v1 = v1 | 0;
|
|
1087
|
-
this.v2 = v2 | 0;
|
|
1088
|
-
this.v3 = v3 | 0;
|
|
1089
|
-
this.v4 = v4 | 0;
|
|
1090
|
-
this.v5 = v5 | 0;
|
|
1091
|
-
this.v6 = v6 | 0;
|
|
1092
|
-
this.v7 = v7 | 0;
|
|
1093
|
-
}
|
|
1094
|
-
compress(msg, offset, isLast) {
|
|
1095
|
-
const l = fromNumL(this.length);
|
|
1096
|
-
const h = fromNumH(this.length);
|
|
1097
|
-
const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = _compress(BSIGMA, offset, msg, 10, this.v0, this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7, B2S_IV[0], B2S_IV[1], B2S_IV[2], B2S_IV[3], l ^ B2S_IV[4], h ^ B2S_IV[5], isLast ? ~B2S_IV[6] : B2S_IV[6], B2S_IV[7]);
|
|
1098
|
-
this.v0 ^= v0 ^ v8;
|
|
1099
|
-
this.v1 ^= v1 ^ v9;
|
|
1100
|
-
this.v2 ^= v2 ^ v10;
|
|
1101
|
-
this.v3 ^= v3 ^ v11;
|
|
1102
|
-
this.v4 ^= v4 ^ v12;
|
|
1103
|
-
this.v5 ^= v5 ^ v13;
|
|
1104
|
-
this.v6 ^= v6 ^ v14;
|
|
1105
|
-
this.v7 ^= v7 ^ v15;
|
|
1106
|
-
}
|
|
1107
|
-
destroy() {
|
|
1108
|
-
this.destroyed = true;
|
|
1109
|
-
clean(this.buffer32);
|
|
1110
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
1002
|
|
|
1114
1003
|
// ../../node_modules/.bun/@noble+hashes@2.3.0/node_modules/@noble/hashes/argon2.js
|
|
1115
1004
|
init_utils();
|
package/docs/agents.md
CHANGED
|
@@ -6,7 +6,7 @@ The SDK is not a privileged backend. It authenticates, decrypts the vault, signs
|
|
|
6
6
|
|
|
7
7
|
## Setup
|
|
8
8
|
|
|
9
|
-
Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/
|
|
9
|
+
Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/terms#terms), which include the community rules.
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
12
|
import { open } from '@glyphteck/veyl';
|
package/docs/api.md
CHANGED
|
@@ -188,7 +188,7 @@ An unknown Spark send, payment-request payment, invoice payment, or withdrawal o
|
|
|
188
188
|
|
|
189
189
|
## Account
|
|
190
190
|
|
|
191
|
-
Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/
|
|
191
|
+
Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/terms#terms), which include the community rules.
|
|
192
192
|
|
|
193
193
|
```js
|
|
194
194
|
const accountKey = await veyl.account.create({
|
|
@@ -210,7 +210,7 @@ await veyl.account.delete({ confirm: true });
|
|
|
210
210
|
- `login({ username?, key?, saveKey? })` authenticates with an account key. The key can instead come from `open({ accountKey })` or `VEYL_ACCOUNT_KEY`.
|
|
211
211
|
- `loginPasskey({ username?, webUrl?, onUrl? })` authenticates through the browser-assisted passkey flow.
|
|
212
212
|
- `me` returns the local account summary without forcing login.
|
|
213
|
-
- `terms` reports the canonical Terms
|
|
213
|
+
- `terms` reports the canonical Terms link, whether the account's acceptance is current, and when it last accepted the Terms.
|
|
214
214
|
- `acceptTerms()` records the current agreement through the shared user owner without forcing a vault unlock.
|
|
215
215
|
- `logout` signs out and tears down only this runtime.
|
|
216
216
|
- `logoutAll` revokes every product session generation, tears down this runtime locally, and stops a persistent CLI owner after its in-flight work drains.
|
package/docs/cli.md
CHANGED
|
@@ -32,7 +32,7 @@ veyl vault lock
|
|
|
32
32
|
veyl vault export [--key VALUE]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/
|
|
35
|
+
Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/terms#terms), which include the community rules. `account accept-terms` accepts the current Terms for an existing account. `account terms` reports the canonical link and whether the account's acceptance is current without unlocking the vault.
|
|
36
36
|
|
|
37
37
|
`vault export` returns the Spark mnemonic. Treat its JSON output as a secret.
|
|
38
38
|
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -34,7 +34,7 @@ await veyl.close();
|
|
|
34
34
|
|
|
35
35
|
To store the keys in your own secret manager, pass `saveKey: false` to both creation calls and provide them later through `open({ accountKey, vaultKey })`, `VEYL_ACCOUNT_KEY`, and `VEYL_VAULT_KEY`. Never log or commit either key.
|
|
36
36
|
|
|
37
|
-
Use `REGTEST` for development and disposable accounts. `MAINNET` uses real funds. Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/
|
|
37
|
+
Use `REGTEST` for development and disposable accounts. `MAINNET` uses real funds. Creating an account accepts Veyl's [Terms](https://veyl.glyphteck.com/terms#terms), which include the community rules.
|
|
38
38
|
|
|
39
39
|
## CLI
|
|
40
40
|
|