Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changelog/coinflow-credits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
tempo-common: minor
tempo-wallet: minor
---

Add wallet CLI support for checking and spending Coinflow credits, and update shared signer handling so wallet flows can emit the expected Tempo signature format for these transactions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ keys.toml

# Build artifacts
*.tar.gz
.local/

# Eval (promptfoo output and old run artifacts)
eval/runs/
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build release clean check test fix install uninstall run coverage
.PHONY: build release clean check test fix install uninstall run coverage install-moderato-local

build:
cargo build
Expand All @@ -20,6 +20,16 @@ install: release
@$(HOME)/.tempo/bin/tempo-wallet --version
@$(HOME)/.tempo/bin/tempo-request --version

install-moderato-local:
mkdir -p $(HOME)/.local/bin
ln -sf $(PWD)/scripts/tempo-wallet-moderato-local $(HOME)/.local/bin/tempo-wallet-moderato-local
ln -sf $(PWD)/scripts/tempo-request-moderato-local $(HOME)/.local/bin/tempo-request-moderato-local
chmod +x scripts/tempo-wallet-moderato-local scripts/tempo-request-moderato-local
@echo ""
@echo "Installed wrappers:"
@echo " $(HOME)/.local/bin/tempo-wallet-moderato-local"
@echo " $(HOME)/.local/bin/tempo-request-moderato-local"

uninstall:
rm -f $(HOME)/.tempo/bin/tempo-wallet $(HOME)/.tempo/bin/tempo-request

Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,40 @@ tempo wallet sessions list
tempo wallet sessions close https://openrouter.mpp.tempo.xyz
```

## Local Moderato App Dev

If you want a local wallet CLI instance that authenticates and funds against `https://app.moderato.tempo.local/`, install the repo wrappers:

```bash
make build
make install-moderato-local
```

That gives you two commands:

```bash
# Login/fund/spend credits against the local app
tempo-wallet-moderato-local login --no-browser
tempo-wallet-moderato-local fund --credits
tempo-wallet-moderato-local spend-credits --amount-cents 500 --to 0x...

# Open MPP sessions and keep them in an isolated local wallet home
tempo-request-moderato-local -X POST \
--json '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"hello"}]}' \
https://openrouter.mpp.tempo.xyz/v1/chat/completions

# Inspect or leave partially spent sessions open for local testing
tempo-wallet-moderato-local sessions list
```

The wrappers do three things for you automatically:

1. Force the network to `tempo-moderato`.
2. Point `TEMPO_AUTH_URL` at `https://app.moderato.tempo.local/cli-auth`.
3. Keep wallet keys and `channels.db` under `wallet/.local/moderato-wallet`, so your normal wallet state is untouched and unclosed sessions persist for repeat testing.

Reset that local dev wallet by deleting `wallet/.local/moderato-wallet`. If you want to use a different local app origin or RPC, override `TEMPO_MODERATO_APP_URL`, `TEMPO_AUTH_URL`, `TEMPO_HOME`, or `TEMPO_RPC_URL` before running the wrappers.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and workflow.
Expand Down
Loading
Loading