Skip to content

docs: add Foundry MPP integration guide#275

Open
decofe wants to merge 5 commits intomainfrom
rusowsky/foundry-mpp-docs
Open

docs: add Foundry MPP integration guide#275
decofe wants to merge 5 commits intomainfrom
rusowsky/foundry-mpp-docs

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Apr 10, 2026

Adds a new page under Make Agentic Payments → Foundry integration documenting how tempo-foundry's built-in MPP transport works.

Changes

  • New page guide/machine-payments/foundry.mdx covering setup, usage (cast/forge/anvil/chisel), configuration (deposit, key discovery, channel persistence), testnet, and troubleshooting
  • Added sidebar entry under Make Agentic Payments
  • Added Foundry card + SDK table row to the machine-payments overview page

References

Prompted by: rusowsky

Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d76b5-e92a-7588-87bc-4969a2f98a2d
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tempo-docs Ready Ready Preview, Comment Apr 10, 2026 2:26pm

Request Review

Co-Authored-By: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d76b5-e92a-7588-87bc-4969a2f98a2d
decofe and others added 2 commits April 10, 2026 09:52
Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d76b5-e92a-7588-87bc-4969a2f98a2d
Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d76b5-e92a-7588-87bc-4969a2f98a2d
2. **402 challenge** — The server responds with `402 Payment Required` and a `WWW-Authenticate: Payment` header describing the price.
3. **Key discovery** — Foundry reads your signing key from `$TEMPO_HOME/wallet/keys.toml` (default `~/.tempo/wallet/keys.toml`) or the `TEMPO_PRIVATE_KEY` env var.
4. **Channel open** — If no payment channel exists, Foundry opens one on-chain with a deposit (default: `100,000` base units). This is a one-time on-chain lockup — unused balance remains in the channel.
5. **Voucher payment** — Foundry signs an off-chain voucher against the open channel and retries the request with an `Authorization: Payment` header.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth mentioning that it automatically top up

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in c7deab0 (this PR)


1. **First request** — Foundry sends a normal JSON-RPC request to the endpoint.
2. **402 challenge** — The server responds with `402 Payment Required` and a `WWW-Authenticate: Payment` header describing the price.
3. **Key discovery** — Foundry reads your signing key from `$TEMPO_HOME/wallet/keys.toml` (default `~/.tempo/wallet/keys.toml`) or the `TEMPO_PRIVATE_KEY` env var.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add also the fact that if multiple payment challenges then will pick up the one for proper challenge and spending allowance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in c7deab0 (this PR)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants