@txfence/cli 0.1.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 ADDED
@@ -0,0 +1,17 @@
1
+ # @txfence/cli
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Initial public release — policy engine, intent execution, formal verification, adversarial stress testing, cryptographic provenance chains, temporal rules, and MEV protection across EVM, Solana, and Cosmos
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @txfence/audit@0.1.0
13
+ - @txfence/core@0.1.0
14
+ - @txfence/evm@0.1.0
15
+ - @txfence/mcp@0.1.0
16
+ - @txfence/provenance@0.1.0
17
+ - @txfence/verify@0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aditya Chauhan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @txfence/cli
2
+
3
+ Command-line interface for [txfence](https://github.com/AdityaChauhanX07/txfence). Drives the same pipeline as the SDK: simulation, policy checks, dry-runs, submission, replay, intent execution, formal verification, and provenance.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @txfence/cli
9
+ # or use one-off
10
+ npx @txfence/cli init
11
+ ```
12
+
13
+ A `txfence.config.ts` in the working directory wires up chains, adapters, RPC URLs, signer, and the base policy. Run `txfence init` to scaffold one.
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ # Setup and receipts
19
+ txfence init # scaffold txfence.config.ts
20
+ txfence receipt --store ./receipts.jsonl [--filter chain=ethereum]
21
+
22
+ # Policy and simulation
23
+ txfence simulate --kind transfer --chain ethereum --to 0x... --token ETH --amount 1e18
24
+ txfence check-policy --kind transfer --chain ethereum --to 0x... --token ETH --amount 1e18
25
+ txfence submit --kind transfer --chain ethereum --to 0x... --token ETH --amount 1e18
26
+ txfence dry-run --config ./txfence.config.ts --kind transfer --chain ethereum ...
27
+ txfence diff --config-a ./current.ts --config-b ./proposed.ts --generate-actions
28
+
29
+ # Policy versioning and replay
30
+ txfence policy-snapshot --config ./txfence.config.ts --label v3 --author alice
31
+ txfence replay --audit-log ./audit.jsonl --config ./proposed.ts --only-changed
32
+
33
+ # Intent execution
34
+ txfence intent validate --config ./txfence.config.ts --intent ./intent.json
35
+ txfence intent submit --config ./txfence.config.ts --intent ./intent.json [--dry-run]
36
+ txfence intent fork-simulate --config ./txfence.config.ts --intent ./intent.json --from 0x... --chain ethereum
37
+
38
+ # Formal verification
39
+ txfence verify rolling-window --config ./txfence.config.ts --agents 10 --transactions 20 --cap 50000 --window 3600000 --token USDC
40
+ txfence verify absolute-cap --config ./txfence.config.ts --agents 10 --transactions 10 --cap 50000 --token USDC
41
+ txfence verify policy-contains --inner ./strict.ts --outer ./permissive.ts
42
+ txfence stress-test --config ./txfence.config.ts --agents 10 --transactions 20
43
+
44
+ # Provenance
45
+ txfence provenance verify --chain ./provenance.jsonl
46
+ txfence provenance proof --chain ./provenance.jsonl --hash <entryHash>
47
+ ```
48
+
49
+ 13 commands in total.
50
+
51
+ ## CI-friendly exit codes
52
+
53
+ `txfence replay` exits non-zero if any historical transaction would be newly rejected under the proposed policy — drop it into CI as a policy regression gate.
54
+
55
+ `txfence verify` and `txfence stress-test` exit non-zero on counterexample / low survival rate, suitable for blocking PRs that weaken the policy.
56
+
57
+ Full project README: https://github.com/AdityaChauhanX07/txfence
58
+
59
+ ## License
60
+
61
+ MIT
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node