From 19d076bd4aec53c05573bad57ff1c3b8f20959f7 Mon Sep 17 00:00:00 2001 From: Aryan Jabbari Date: Sat, 14 Mar 2026 15:33:00 -0400 Subject: [PATCH] Add Weave Cash skill --- README.md | 1 + weave/SKILL.md | 181 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 weave/SKILL.md diff --git a/README.md b/README.md index 5e0e644b..a718d771 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Bankr Skills equip builders with plug-and-play tools to build more powerful agen | yoink | [yoink](yoink/) | Social on-chain game. "Yoink" a token from the current holder. Uses Bankr for transaction execution. | | [Neynar](https://neynar.com) | [neynar](neynar/) | Full Farcaster API integration. Post casts, like, recast, follow users, search content, and manage Farcaster identities. | | [Hydrex](https://hydrex.fi) | [hydrex](hydrex/) | Liquidity pools on Base. Lock HYDX for voting power, vote on pool strategies, deposit single-sided liquidity into auto-managed vaults, and claim oHYDX rewards. | +| [Weave Cash](https://www.weavecash.com) | [weave](weave/) | Crypto-to-crypto invoicing and cross-chain payment workflows. Create invoices, generate payment instructions, inspect supported token and network pairs, and monitor settlement with the Weave CLI. | ## Adding a Skill diff --git a/weave/SKILL.md b/weave/SKILL.md new file mode 100644 index 00000000..6f1c4141 --- /dev/null +++ b/weave/SKILL.md @@ -0,0 +1,181 @@ +--- +name: weave +description: Crypto-to-crypto invoicing and cross-chain payment workflows for Weave Cash. Use when the user wants to create an invoice, generate payment instructions, list supported token and network pairs, or monitor invoice settlement with the Weave CLI. +metadata: + { + "clawdbot": + { + "emoji": "🧶", + "homepage": "https://www.weavecash.com", + "requires": { "bins": ["weave"] }, + }, + } +--- + +# Weave + +Use `weave` for Weave Cash invoice workflows: + +1. Create a crypto-to-crypto invoice +2. Generate payment instructions for a buyer +3. Track settlement until terminal status +4. Discover currently supported token and network pairs + +Weave Cash is crypto-to-crypto only. The merchant chooses what crypto and network they want to receive, and the buyer can pay with another supported asset and network. + +## Guardrails + +- Do not introduce fiat pricing, fiat settlement, or fiat-denominated behavior unless the user explicitly asks for it. +- Prefer machine-readable JSON output. Use `--human` only when the user asks for readable terminal output. +- Never print or store secrets, private keys, JWTs, or credential-bearing URLs. +- Always discover current support with `weave tokens` instead of hardcoding token and network lists. +- Treat quote and status requests as network-dependent and failure-prone. Surface command errors clearly. + +## Install + +Preferred install: + +```bash +go install github.com/AryanJ-NYC/weave-cash/apps/cli/cmd/weave@latest +``` + +Fallback install: + +```bash +npm i -g weave-cash-cli +``` + +Verify: + +```bash +weave --help +``` + +## Preflight + +Before choosing assets or networks: + +```bash +weave tokens +``` + +This is the runtime source of truth for: + +- supported tokens +- valid token/network pairings +- accepted network aliases + +## Create An Invoice + +Use `weave create` to generate a new invoice. + +Required inputs: + +- `--receive-token` +- `--amount` +- `--wallet-address` + +Conditionally required: + +- `--receive-network` when the selected receive token supports more than one network + +Optional: + +- `--description` +- `--buyer-name` +- `--buyer-email` +- `--buyer-address` + +Example: + +```bash +weave create \ + --receive-token USDC \ + --receive-network Ethereum \ + --amount 25 \ + --wallet-address 0x1111111111111111111111111111111111111111 +``` + +Typical JSON response: + +```json +{ + "id": "inv_123", + "invoiceUrl": "https://www.weavecash.com/invoice/inv_123" +} +``` + +Save the invoice ID for quoting and status checks. + +## Generate Payment Instructions + +Use `weave quote` after the invoice exists and is still pending. + +Required inputs: + +- invoice ID +- `--pay-token` +- `--pay-network` +- `--refund-address` + +Example: + +```bash +weave quote inv_123 \ + --pay-token USDT \ + --pay-network Ethereum \ + --refund-address 0x2222222222222222222222222222222222222222 +``` + +Expected fields include: + +- `depositAddress` +- `depositMemo` when applicable +- `amountIn` +- `amountOut` +- `timeEstimate` +- `expiresAt` + +## Check Status + +One-shot status: + +```bash +weave status inv_123 +``` + +Watch until terminal state: + +```bash +weave status inv_123 --watch --interval-seconds 5 --timeout-seconds 900 +``` + +Interpretation: + +- exit `0`: terminal success path from the CLI perspective +- exit `1`: command, API, validation, or network failure +- exit `2`: watch timed out before a terminal invoice status + +`weave get ` is an alias for `weave status `. + +## Human Output + +When the user wants readable terminal output instead of JSON: + +```bash +weave tokens --human +weave status inv_123 --human +``` + +## Common Failure Cases + +- Invalid token/network pair: rerun `weave tokens` and choose a supported combination. +- Missing `--receive-network` for a multi-network token: provide an explicit receive network. +- Quote fails for a non-pending invoice: fetch current status first with `weave status `. +- Watch timeout: rerun `weave status ` or extend `--timeout-seconds`. + +## Operator Notes + +- The installed binary can drift from source docs, so trust `weave tokens` over static assumptions. +- Keep examples path-safe and generic; do not reuse real wallet secrets or private operational data. +- If the user asks to install the CLI, ask before running installation commands.