Skip to content

feat(cli): iln submit interactive, cancel, marketplace, fund, and status rich output#261

Merged
Levi-Ojukwu merged 31 commits into
Invoice-Liquidity-Network:mainfrom
Jaydbrown:feat/issues-229-233-230-231
Jun 28, 2026
Merged

feat(cli): iln submit interactive, cancel, marketplace, fund, and status rich output#261
Levi-Ojukwu merged 31 commits into
Invoice-Liquidity-Network:mainfrom
Jaydbrown:feat/issues-229-233-230-231

Conversation

@Jaydbrown

@Jaydbrown Jaydbrown commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #233


Closes #231


Closes #230


Closes #229


Summary

  • Implement iln submit command with interactive prompts #229iln submit interactive prompts: Refactored submit.ts to support both flag-based (--payer, --amount, --token, --rate, --due) and interactive (@inquirer/prompts wizard) modes. Added --dry-run flag that serialises the transaction payload as JSON without signing. Prints a receipt table on success. Both modes are injection-testable via makeSubmitCommand(prompter, submitter).

  • Implement iln cancel command #233iln cancel: New cancel.ts command that fetches the invoice, guards against non-Pending state, shows a confirmation prompt ("Cancel Invoice #X (100 USDC, due 2025-12-31)? This cannot be undone. [y/N]"), and prints the TX hash on success. --yes skips the prompt for scripting.

  • Implement iln fund command with marketplace listing #230iln marketplace + iln fund confirm: New marketplace.ts command lists Pending invoices in a terminal table with --sort yield|amount|due and --filter token=USDC flags. Updated fund.ts adds a confirmation prompt ("Fund invoice #X (500 USDC, 3.2% yield)? [y/N]") with --yes to skip.

  • Implement iln status command with rich output #231iln status rich output: Refactored status.ts to display a full invoice summary (ID, colour-coded state badge, submitter, payer, LP, token, amount, discount rate, effective yield, due date, time-to-expiry countdown, mini status timeline). --json outputs raw JSON for piping; --watch polls every 10 seconds until a terminal state (Paid, Cancelled, Expired) is reached.

Test plan

  • iln submit --payer G... --amount 100 --token USDC --rate 300 --due 2025-12-31 prints receipt table with invoice ID and TX hash
  • iln submit --dry-run prints JSON payload and exits cleanly without calling the submitter
  • iln submit (no flags) calls the prompter wizard and passes answers to the submitter
  • iln cancel --id X on a Pending invoice shows confirm prompt; y cancels, n aborts cleanly
  • iln cancel --id X on a Funded/Paid invoice prints an error and exits 1
  • iln cancel --id X --yes skips the prompt and cancels immediately
  • iln marketplace prints a table of Pending invoices sorted by yield descending
  • iln marketplace --sort amount sorts by amount descending
  • iln marketplace --filter token=USDC shows only USDC invoices
  • iln fund --id X shows confirmation with amount, token, and yield; y funds, n aborts
  • iln fund --id X --yes skips confirmation
  • iln status --id X prints full detail table and timeline
  • iln status --id X --json outputs valid parseable JSON with all fields
  • iln status --id X --watch polls every 10 s and stops when state reaches Paid/Cancelled/Expired

Jaydbrown added 30 commits June 27, 2026 21:19
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Jaydbrown 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

Merged commands from main (reputation, completion) with PR branch
(submit, cancel, marketplace, fund, status).
@Levi-Ojukwu Levi-Ojukwu merged commit 766a660 into Invoice-Liquidity-Network:main Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants