build: add cli-up, cli-stop and cli-clear for the terminal-only path - #54
Open
Dunsin-cyber wants to merge 2 commits into
Open
Dunsin-cyber wants to merge 2 commits into
Dunsin-cyber wants to merge 2 commits into
Conversation
Driving the wallet from the CLI had no working entry point. `up` builds the Android FFI, so it needs the NDK at ~/Android/Sdk/ndk/<version> and ends by telling you to run Flutter. `runtime-run` skips the NDK but starts the cosigner without ASP_URL or WEBAUTH_TOKEN_SECRET: without the first, every Ark call comes back UNAVAILABLE; without the second, the runtime rejects the session tokens the CLI mints for the group-key-authenticated ark/* routes. Neither failure names its cause, so you get a server that looks healthy and refuses everything. cli-up brings up regtest and arkd, funds the ASP, mines every 10s, and runs the cosigner in the foreground with the environment it actually needs. cli-stop pauses. It uses `docker compose stop` rather than `down` because arkd and arkd-wallet mount no volume, so their data lives in the container's writable layer. `down` would delete arkd's VTXO records while leaving the chain intact, which is worse than a clean wipe: the keystore and the cosigner would still believe in coins arkd has no record of. cli-clear is the clean slate: containers, volumes, the cosigner's SQLite and the CLI keystore. It does not reuse `down`, which sudo-prompts to delete root-owned paths this flow never creates, and whose `pkill -f "bitcoin.sh mine"` matches the shell running it and kills itself, surfacing as "Terminated (ignored)". The bracketed first letter avoids the self-match. Also points the CLI comment at cli-up rather than regtest-ark, which is `runtime-stop arkd-up bitcoin-init arkd-init` and never starts a cosigner at all.
Author
|
is this good to go? @aruokhai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a Rust CLI for driving the wallet, but no way to start a stack it can talk to without the Android toolchain:
make upbuilds the Android FFI, andmake runtime-runstarts the cosigner withoutASP_URLorWEBAUTH_TOKEN_SECRET, which leaves a server that looks healthy but rejects every Ark call.make cli-up: regtest, arkd, a funded ASP, a mine loop, and the cosigner with the environment it actually needs, in the foregroundmake cli-stop: pause, keeping the chain, arkd's records, the cosigner database and your wallets. Usesdocker compose stoprather thandown, because arkd and arkd-wallet mount no volume anddownwould delete their VTXO records while leaving the chain intactmake cli-clear: clean slate. Containers, volumes, cosigner SQLite and CLI keystore. Does not reusedown, which sudo-prompts for root-owned paths this flow never creates, and whosepkill -fpatterns match and kill their own shellcli/to the component tree and a short section on the CLI workflow, after the app onemake regtest-ark, a target that never starts a cosignerVerified end to end on regtest: DKG onboarding, boarding 100k sats, a 25k off-chain send to a second wallet, contacts, and a payment request through approve.