Skip to content

feat(cli): add escrow operator command - #194

Open
nasirudeenbadirudeen87-cloud wants to merge 4 commits into
DocForum:mainfrom
nasirudeenbadirudeen87-cloud:fix/issue-88
Open

nasirudeenbadirudeen87-cloud wants to merge 4 commits into
DocForum:mainfrom
nasirudeenbadirudeen87-cloud:fix/issue-88

Conversation

@nasirudeenbadirudeen87-cloud

Copy link
Copy Markdown

Summary

  • Add the docforum-escrow CLI for create, status, show, release, refund, and contract event listing.
  • Support key files, selected environment variables, hidden interactive key entry, and Stellar SDK Signer objects. Secrets are rejected in argv; state changes require confirmation; --dry-run, --json, and explicit mainnet opt-in are supported.
  • Add parser tests, run them in CI, bump the SDK package to 0.4.0, and document the CLI and its testnet recipes.

Closes #88

Verification

  • npm ci — passed
  • npm run typecheck — passed
  • npm run build — passed
  • npm test — 3 parser tests passed
  • npm pack --dry-run — passed; CLI is included in the package
  • Base branch npm ci, npm run typecheck, and npm run build — passed before the CI change
  • npm run test:integration — 2 of 5 live testnet tests failed after Friendbot/RPC connection timeouts; 3 passed
  • Local-network CLI E2E could not run because the Docker daemon is unavailable (~/.docker/run/docker.sock is missing)

The local-network E2E run remains the verification gap; the CLI is ready for that check once a local Stellar container can start.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nasirudeenbadirudeen87-cloud

Copy link
Copy Markdown
Author

@afeezorobsco-cyber, please review and merge once the checks pass. The local-network E2E run is noted in the PR as blocked by the unavailable Docker daemon.

@afeezorobsco-cyber

Copy link
Copy Markdown
Contributor

@nasirudeenbadirudeen87-cloud

This PR has merge conflicts with main, which has moved on since this branch was created. Please rebase onto the latest main (or merge main into your branch), resolve the conflicts, and push. CI will then re-run, and the PR can be merged once it's conflict-free, CI is green and it's been reviewed. Thanks!

@afeezorobsco-cyber

Copy link
Copy Markdown
Contributor

@nasirudeenbadirudeen87-cloud Thanks for the PR. It can't be merged yet. To unblock it:

CI is failing. Here's what broke:

TypeScript SDK (typecheck + build):

src/index.ts(18,38): error TS2304: Cannot find name 'Signer'.

Please fix these errors and run the same steps locally before pushing (npm run typecheck && npm test && npm run build, or cargo test for contracts).

Merge conflicts: this branch conflicts with main. Please rebase onto the latest main (git fetch upstream && git rebase upstream/main), resolve the conflicts (often ROADMAP.md, ARCHITECTURE*.md or prisma/schema.prisma), and force-push.

Push to this same branch and CI will re-run. Once it's green and conflict-free, it'll be reviewed for merge.

@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Malware scan: clean

The earlier findings are resolved as of 418c84f.

@github-actions github-actions Bot removed the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 25, 2026
@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 26, 2026
@github-actions

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud This PR now has merge conflicts with main, most likely because #244 (feat(sdk): token-aware amount parsing and formatting) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

@github-actions

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud This PR now has merge conflicts with main, most likely because #261 (test(fuzz): add cargo-fuzz lifecycle harness) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

1 similar comment
@github-actions

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud This PR now has merge conflicts with main, most likely because #261 (test(fuzz): add cargo-fuzz lifecycle harness) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

Upstream already ships EscrowSigner/signerAddress, so the index.ts changes
from this branch are dropped in favour of main's. Pass the new
notify_payee/refund_to fields from the CLI's create path. Compile the
Node-only CLI through tsconfig.cli.json so @types/node does not leak into
the cross-runtime library build, and run tests/cli-args.test.ts as part of
test:unit now that CI calls the explicit test scripts.
@github-actions

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud This PR now has merge conflicts with main, most likely because #261 (test(fuzz): add cargo-fuzz lifecycle harness) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

@zeemscript

Copy link
Copy Markdown

@afeezorobsco-cyber I merged current main and adapted the operator CLI package to the dual ESM/CJS build: the executable now targets dist/esm/cli.js, and the latest create_escrow fee options are supplied. The PR is now mergeable; CI was triggered and the malware scan passes. CLI typecheck and argument tests pass locally. Full SDK build currently stops at two factory.ts type errors in the pre-existing SDK sources under the local Node 26 / TypeScript 5.9 environment; I left those unrelated sources untouched.

@github-actions github-actions Bot removed the needs-rebase Has merge conflicts with main; the author needs to rebase label Oct 27, 2026
@nasirudeenbadirudeen87-cloud

Copy link
Copy Markdown
Author

@afeezorobsco-cyber PR #194 is current-main mergeable and its malware scan passed. The CLI-specific typecheck and argument tests passed locally. The full SDK build still reports two TypeScript errors in existing factory.ts under the local Node 26 / TypeScript 5.9 toolchain; please check the required CI workflow state and review the CLI changes.

@afeezorobsco-cyber

Copy link
Copy Markdown
Contributor

@nasirudeenbadirudeen87-cloud (cc @Ruruxy, who pushed the latest merge) Every TypeScript SDK job now fails at the build step:

src/factory.ts(112,21): error TS2345: Argument of type 'Uint8Array<ArrayBuffer>' is not assignable to parameter of type 'string | Buffer<ArrayBufferLike>'.
src/factory.ts(116,9): error TS2740: Type 'Uint8Array<ArrayBuffer>' is missing the following properties from type 'Buffer<ArrayBufferLike>': write, toJSON, equals, compare, and 66 more.

Merge 418c84f dropped this branch's "types": [] and its exclude of src/cli.ts / src/cli-args.ts from sdk/tsconfig.json. Now @types/node, which only the CLI needs, leaks into the library build and changes Buffer typing in factory.ts. Please restore those two settings and keep Node types confined to tsconfig.cli.json. The same merge also dropped the branch's CLI additions to test:unit and typecheck in sdk/package.json. Then run npm run build && npm run typecheck && npm test in sdk/ and push.

@github-actions github-actions Bot added the needs-rebase Has merge conflicts with main; the author needs to rebase label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud This PR now has merge conflicts with main, most likely because #271 (chore(contract): fold contract changes into 2.5.0 and fold changelog) was just merged, so it can't be merged until it's rebased:

git fetch upstream            # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-lease

The usual culprits are shared docs like ROADMAP.md and ARCHITECTURE*.md. If the conflict is in the ROADMAP.md changelog, move your entry into a new file under changelog.d/ (see changelog.d/README.md) rather than resolving it in place, so it can't conflict again. CI re-runs when you push, and the needs-rebase label is removed automatically once the conflicts are resolved.

Automated message. It won't repeat unless the PR conflicts again after your next push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Has merge conflicts with main; the author needs to rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase E6] Operator CLI for creating, inspecting and settling escrows

4 participants