b4n1-secrets 0.0.0-stage → 0.1.4

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/EULA.txt ADDED
@@ -0,0 +1,87 @@
1
+ B4N1-SECRETS — END USER LICENSE AGREEMENT (BINARIES)
2
+ ==================================================
3
+
4
+ Version: 1.0 | Effective: 2026-11-23 | Applies to: b4n1-secrets 0.1.3+
5
+
6
+ This End User License Agreement ("EULA") governs your use of the B4N1
7
+ BINARY ARTIFACTS of b4n1-secrets — the bundled per-platform `b4n1secrets`
8
+ executables (`b4n1secrets-linux-amd64`, `b4n1secrets-linux-arm64`,
9
+ `b4n1secrets-linux-ia32`, `b4n1secrets-macos-x64`,
10
+ `b4n1secrets-macos-arm64`, `b4n1secrets-windows-amd64.exe`,
11
+ `b4n1secrets-windows-ia32.exe` and the remaining platform builds
12
+ shipped under each SDK's `bin/` directory), the packaged
13
+ per-language bindings (`*.whl`, npm tarball, `*.jar`, `*.nupkg`,
14
+ gem, composer package, Go module), and the `b4n1secrets` standalone
15
+ executable.
16
+
17
+ The SDK wrapper source files (the thin per-language bindings) are licensed
18
+ separately under the Business Source License 1.1 — see the `LICENSE` file
19
+ and each registry's license metadata.
20
+
21
+ 1. DEFINITIONS
22
+ "Binaries" means the compiled artifacts described above.
23
+ "SDK" means the BUSL-1.1 licensed wrapper source distributed for each language.
24
+ "Source" means the Rust implementation, vault format, build scripts,
25
+ internal tests and internal documentation of the B4N1 engine. Source is
26
+ NOT distributed under this EULA or any other license and remains
27
+ proprietary.
28
+
29
+ 2. GRANT OF LICENSE
30
+ Subject to your compliance with this EULA and payment of any applicable
31
+ subscription, B4N1 grants you a limited, non-exclusive, non-transferable,
32
+ revocable license to install and use the Binaries within your own products
33
+ and internal tooling, in object form only.
34
+
35
+ 3. RESTRICTIONS (strictly enforced)
36
+ a. NO REDISTRIBUTION OF SOURCE. You may not publish, disclose, sublicense
37
+ or otherwise make the B4N1 Rust Source available, in whole or in part,
38
+ modified or unmodified, by any means, including in public repositories.
39
+ b. NO DECOMPILATION OR REVERSE ENGINEERING. You may not decompile,
40
+ disassemble, deobfuscate, or otherwise reverse engineer the Binaries
41
+ except to the extent such restriction is prohibited by applicable law
42
+ that cannot be waived.
43
+ c. NO REMOVAL OF NOTICES. You may not remove, alter, or obscure any
44
+ copyright, license, watermark, or proprietary notices in the Binaries.
45
+ d. NO RESALE AS A STANDALONE PRODUCT. The Binaries may not be resold,
46
+ sublicensed, or offered as a competing product.
47
+ e. NO VAULT-FORMAT DISCLOSURE AS A PRODUCT. You may interoperate
48
+ with the Binaries under this EULA, but you may not publish the
49
+ vault format, key-derivation scheme or storage layout as a
50
+ specification or as the basis of a competing vault.
51
+ f. COMPLIANCE AND AUDIT. You will cooperate with reasonable verification of
52
+ license status, including honoring embedded license validation.
53
+
54
+ 4. SUBSCRIPTION TIERS
55
+ The Binaries operate under the applicable tier, validated offline against a
56
+ license file (`.b4n1lic`):
57
+ - Community: free, with attribution/watermark obligations.
58
+ - Pro / Corporate / Enterprise: paid tiers, no watermark, per the
59
+ commercial license purchased from B4N1.
60
+ License files are validated fully offline; no network calls are made at
61
+ runtime to verify entitlement.
62
+
63
+ 5. TERMINATION
64
+ This EULA terminates automatically if you breach any term. Upon
65
+ termination you must cease all use and destroy the Binaries and copies.
66
+
67
+ 6. DISCLAIMER OF WARRANTY
68
+ The Binaries are provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or
69
+ implied, including merchantability, fitness for a particular purpose, and
70
+ non-infringement. B4N1 does not warrant that the Binaries will be
71
+ uninterrupted or error-free.
72
+
73
+ 7. LIMITATION OF LIABILITY
74
+ To the maximum extent permitted by law, B4N1 shall not be liable for any
75
+ indirect, incidental, special, consequential, or punitive damages, or for
76
+ any loss of profits, revenue, data, or goodwill, arising out of your use
77
+ of the Binaries, regardless of the legal theory, even if advised of the
78
+ possibility of such damages.
79
+
80
+ 8. GOVERNING LAW AND SEVERABILITY
81
+ This EULA is governed by applicable law. If any provision is held
82
+ unenforceable, the remaining provisions stay in full force.
83
+
84
+ 9. CONTACT
85
+ Licensing questions: licensing@b4n1.com | https://b4n1.com
86
+
87
+ B4N1 — All rights reserved. Proprietary source: private and secret.
package/LICENSE ADDED
@@ -0,0 +1,95 @@
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
5
+
6
+ -----------------------------------------------------------------------------
7
+
8
+ Parameters
9
+
10
+ Licensor: B4N1 (b4n1.com)
11
+ Licensed Work: b4n1-secrets — Offline committable secret vault (XChaCha20-Poly1305 + Argon2id),
12
+ testing, and AI-powered browsing tasks.
13
+ Additional Use Grant: You may use the Licensed Work in production, free of
14
+ charge, provided that your organization's total annual
15
+ gross revenue does not exceed USD $100,000. Organizations
16
+ whose annual gross revenue exceeds USD $100,000 must
17
+ obtain a commercial license from the Licensor before any
18
+ production use. You may not resell or provide the
19
+ Licensed Work as a managed commercial service without
20
+ authorization from the Licensor.
21
+ Change Date: Four years after the first publicly available
22
+ distribution of the Licensed Work under this License.
23
+ Change License: Apache License, Version 2.0
24
+
25
+ For information about alternative licensing arrangements for the Licensed
26
+ Work, please contact b4n1@b4n1.com.
27
+
28
+ -----------------------------------------------------------------------------
29
+
30
+ Terms
31
+
32
+ The Licensor hereby grants you the right to copy, modify, create derivative
33
+ works, redistribute, and make non-production use of the Licensed Work. The
34
+ Licensor may make an Additional Use Grant, above, permitting limited
35
+ production use.
36
+
37
+ Effective on the Change Date, or the fourth anniversary of the first publicly
38
+ available distribution of a specific version of the Licensed Work under this
39
+ License, whichever comes first, the Licensor hereby grants you rights under
40
+ the terms of the Change License, and the rights granted in the paragraph
41
+ above terminate.
42
+
43
+ If your use of the Licensed Work does not comply with the requirements
44
+ currently in effect as described in this License, you must purchase a
45
+ commercial license from the Licensor, its affiliated entities, or authorized
46
+ resellers, or you must refrain from using the Licensed Work.
47
+
48
+ All copies of the original and modified Licensed Work, and derivative works
49
+ of the Licensed Work, are subject to this License. This License applies
50
+ separately for each version of the Licensed Work and the Change Date may vary
51
+ for each version of the Licensed Work released by Licensor.
52
+
53
+ You must conspicuously display this License on each original or modified copy
54
+ of the Licensed Work. If you receive the Licensed Work in original or
55
+ modified form from a third party, the terms and conditions set forth in this
56
+ License apply to your use of that work.
57
+
58
+ Any use of the Licensed Work in violation of this License will automatically
59
+ terminate your rights under this License for the current and all other
60
+ versions of the Licensed Work.
61
+
62
+ This License does not grant you any right in any trademark or logo of
63
+ Licensor or its affiliates (provided that you may use a trademark or logo of
64
+ Licensor as expressly required by this License).
65
+
66
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
67
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
68
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
69
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
70
+ TITLE. MariaDB hereby grants you permission to use this License's text to
71
+ license your works, and to refer to it using the trademark "Business Source
72
+ License", as long as you comply with the Covenants of Licensor below.
73
+
74
+ Covenants of Licensor
75
+
76
+ In consideration of the right to use this License's text and the "Business
77
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
78
+ other recipients of the licensed work to be provided by Licensor:
79
+
80
+ To specify as the Change License a license that is compatible with GPL
81
+ Version 2.0 or a later version, where "compatible" means that software
82
+ provided under the Change License can be included in a program with software
83
+ provided under GPL Version 2.0 or a later version. Licensor may specify
84
+ additional Change Licenses without limitation.
85
+
86
+ To either: (a) specify an additional grant of rights to use that does not
87
+ impose any additional restriction on the right granted in this License, as
88
+ the Additional Use Grant; or (b) insert the text "None" to specify a Change
89
+ License. Not to modify this License in any other way.
90
+
91
+ Notice
92
+
93
+ The Business Source License (this document, or the "License") is not an Open
94
+ Source license. However, the Licensed Work will eventually be made available
95
+ under an Open Source License, as stated in this License.
package/README.md CHANGED
@@ -1,3 +1,51 @@
1
- # Temporary Holding Version
1
+ # b4n1-secrets — Node.js SDK
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Sovereign offline vault: named secrets sealed in one committable file, with
4
+ per-key metadata, expiry and a closed/open lock model. Each key is encrypted
5
+ individually; opening the vault proves the passphrase before any value is
6
+ returned.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install b4n1-secrets
12
+ ```
13
+
14
+ The package ships the engine for Linux x64/arm64, macOS x64/arm64 and Windows
15
+ x64. Point `B4N1SECRETS_BIN_PATH` at your own copy to use another build.
16
+
17
+ ## Quick start
18
+
19
+ ```js
20
+ const { SecretsClient } = require("b4n1-secrets");
21
+
22
+ const vault = new SecretsClient();
23
+
24
+ console.log(vault.version());
25
+
26
+ vault.set(".secrets", "API_KEY", "s3cr3t", { tags: ["prod"] });
27
+ console.log(vault.get(".secrets", "API_KEY"));
28
+
29
+ console.log(vault.list(".secrets")); // names only
30
+ vault.close(".secrets"); // drop the key from memory
31
+ ```
32
+
33
+ ## API
34
+
35
+ | Method | Purpose |
36
+ |---|---|
37
+ | `version()` | engine version |
38
+ | `list(dir, meta?)` | key names, with metadata when `meta` is true |
39
+ | `get(dir, key)` | one value |
40
+ | `set(dir, key, value, opts?)` | create or replace a key (`force`, `tags`, `expiresEpoch`) |
41
+ | `remove(dir, key)` | delete one key |
42
+ | `close(dir)` | close the vault |
43
+ | `help()` | the engine's own usage text |
44
+
45
+ Every call shells out to the bundled engine, so a fix in the engine reaches this
46
+ wrapper without a new release.
47
+
48
+ ## License
49
+
50
+ Business Source License 1.1 — see `LICENSE`. Binary use is covered by
51
+ `EULA.txt`, which ships inside the package.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/index.js ADDED
@@ -0,0 +1,52 @@
1
+ const { execFileSync } = require("child_process");
2
+ const path = require("path");
3
+ const fs = require("fs");
4
+
5
+ const PLATFORMS = {
6
+ "linux-x64": "b4n1secrets-linux-amd64",
7
+ "linux-arm64": "b4n1secrets-linux-arm64",
8
+ "darwin-x64": "b4n1secrets-macos-x64",
9
+ "darwin-arm64": "b4n1secrets-macos-arm64",
10
+ "win32-x64": "b4n1secrets-windows-amd64.exe",
11
+ };
12
+
13
+ function getBinaryPath() {
14
+ if (process.env.B4N1SECRETS_BIN_PATH) return process.env.B4N1SECRETS_BIN_PATH;
15
+ const key = `${process.platform}-${process.arch}`;
16
+ const name = PLATFORMS[key];
17
+ if (!name) throw new Error(`Unsupported platform: ${key}`);
18
+ const bundled = path.join(__dirname, "bin", name);
19
+ if (fs.existsSync(bundled)) return bundled;
20
+ if (process.env.B4N1SECRETS_BINARY) return process.env.B4N1SECRETS_BINARY;
21
+ return "b4n1secrets";
22
+ }
23
+
24
+ function run(...args) {
25
+ const binary = getBinaryPath();
26
+ return execFileSync(binary, args, { encoding: "utf-8" });
27
+ }
28
+
29
+ class SecretsClient {
30
+ constructor(binaryPath) {
31
+ this.binary = binaryPath || getBinaryPath();
32
+ }
33
+ version() { return run("--version").trim(); }
34
+ list(dir, meta = false) {
35
+ const args = ["list", dir];
36
+ if (meta) args.push("--meta");
37
+ return run(...args).trim();
38
+ }
39
+ get(dir, key) { return run("get", dir, key).trim(); }
40
+ set(dir, key, value, opts = {}) {
41
+ const args = ["set", dir, key, "--value", value];
42
+ if (opts.expiresEpoch) args.push("--expires-epoch", String(opts.expiresEpoch));
43
+ if (opts.tags) args.push("--tags", opts.tags.join(","));
44
+ if (opts.force) args.push("--force");
45
+ return run(...args).trim();
46
+ }
47
+ remove(dir, key) { return run("remove", dir, key).trim(); }
48
+ close(dir) { return run("close", dir).trim(); }
49
+ help() { return run("--help").trim(); }
50
+ }
51
+
52
+ module.exports = { SecretsClient, getBinaryPath, run };
package/package.json CHANGED
@@ -1,6 +1,20 @@
1
1
  {
2
2
  "name": "b4n1-secrets",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.4",
4
+ "description": "Sovereign offline vault — committable encrypted secrets",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "bin": {
8
+ "b4n1-secrets": "bin/b4n1secrets.js"
9
+ },
10
+ "files": ["index.js", "index.d.ts", "bin/", "README.md", "LICENSE", "EULA.txt"],
11
+ "license": "BUSL-1.1",
12
+ "author": "Bani Montoya",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/B4N1-com/b4n1-secrets"
16
+ },
17
+ "engines": {
18
+ "node": ">=14"
19
+ }
6
20
  }