Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic/client
command
|
|
|
basic/server
command
|
|
|
charge-basic
command
|
|
|
charge-basic/client
command
|
|
|
charge-basic/server
command
|
|
|
charge-fee-payer
command
|
|
|
charge-fee-payer/client
command
|
|
|
charge-fee-payer/server
command
|
|
|
charge-hash
command
|
|
|
charge-hash/client
command
|
|
|
charge-hash/server
command
|
|
|
charge-mcp
command
|
|
|
charge-relay
command
|
|
|
chi/server
command
|
|
|
echo/server
command
|
|
|
fiber/server
command
|
|
|
gin/server
command
|
|
|
internal
|
|
|
localnet
Package localnet waits until a Tempo node is ready to accept transactions.
|
Package localnet waits until a Tempo node is ready to accept transactions. |
|
serverevents
Package serverevents lets this module's transports, such as MCP, report a payment event to a server.Mpp's Events hooks without exporting that API from package server.
|
Package serverevents lets this module's transports, such as MCP, report a payment event to a server.Mpp's Events hooks without exporting that API from package server. |
|
pkg
|
|
|
client
Package client provides an HTTP client with automatic 402 Payment Required handling.
|
Package client provides an HTTP client with automatic 402 Payment Required handling. |
|
internal/challengemeta
Package challengemeta names the opaque metadata keys that Challenge issuance reserves, as in mppx's ChallengeMeta, so the server that sets them and the clients that compare Challenges strip the same keys.
|
Package challengemeta names the opaque metadata keys that Challenge issuance reserves, as in mppx's ChallengeMeta, so the server that sets them and the clients that compare Challenges strip the same keys. |
|
internal/mpptest
Package mpptest builds and formats MPP Challenges and Credentials for tests, panicking where the mpp functions return an error.
|
Package mpptest builds and formats MPP Challenges and Credentials for tests, panicking where the mpp functions return an error. |
|
internal/paymentctx
Package paymentctx carries what a client transport knows about the Challenge it asks a payment method to pay, and the error by which a method asks the transport to create the Credential again for the same Challenge.
|
Package paymentctx carries what a client transport knows about the Challenge it asks a payment method to pay, and the error by which a method asks the transport to create the Credential again for the same Challenge. |
|
internal/tempoproof
Package tempoproof holds the rule shared by the HTTP and MCP clients and the Tempo charge client for zero-amount Tempo proofs: a proof authenticates the payer at the realm the challenge names, so a client signs one only for a realm the server that sent the challenge owns.
|
Package tempoproof holds the rule shared by the HTTP and MCP clients and the Tempo charge client for zero-amount Tempo proofs: a proof authenticates the payer at the realm the challenge names, so a client signs one only for a realm the server that sent the challenge owns. |
|
mcp/client
Package client pays for MCP tool calls made with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching mppx's McpClient.wrap.
|
Package client pays for MCP tool calls made with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching mppx's McpClient.wrap. |
|
mcp/internal/payment
Package payment holds the MCP payment flow shared by the MCP SDK and raw JSON-RPC server integrations: reading the Credential from _meta, running the charge, and building the payment error.
|
Package payment holds the MCP payment flow shared by the MCP SDK and raw JSON-RPC server integrations: reading the Credential from _meta, running the charge, and building the payment error. |
|
mcp/jsonrpc
Package jsonrpc charges for MCP tool calls handled as raw JSON-RPC messages, without an MCP SDK, matching mppx's raw MCP server transport (Transport.mcp()):
|
Package jsonrpc charges for MCP tool calls handled as raw JSON-RPC messages, without an MCP SDK, matching mppx's raw MCP server transport (Transport.mcp()): |
|
mcp/server
Package server charges for MCP tools served with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching the mppx/mcp/server transport (Transport.mcpSdk):
|
Package server charges for MCP tools served with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching the mppx/mcp/server transport (Transport.mcpSdk): |
|
mpp
Package mpp implements the Machine Payments Protocol (MPP) types and header serialization for Go.
|
Package mpp implements the Machine Payments Protocol (MPP) types and header serialization for Go. |
|
server
Package server provides the generic challenge-or-verify flow for Payment authentication on the server side.
|
Package server provides the generic challenge-or-verify flow for Payment authentication on the server side. |
|
server/echo
Package echoadapter provides payment middleware for Echo v5.
|
Package echoadapter provides payment middleware for Echo v5. |
|
server/fiber
Package fiberadapter provides Fiber middleware for MPP-protected routes.
|
Package fiberadapter provides Fiber middleware for MPP-protected routes. |
|
server/gin
Package ginadapter provides Gin middleware for MPP-protected routes.
|
Package ginadapter provides Gin middleware for MPP-protected routes. |
|
tempo
Package tempo contains the Tempo-specific charge method built on top of the generic pkg/client and pkg/server HTTP 402 flow, including request helpers, attribution utilities, and replay stores for single-process and Redis-backed deployments.
|
Package tempo contains the Tempo-specific charge method built on top of the generic pkg/client and pkg/server HTTP 402 flow, including request helpers, attribution utilities, and replay stores for single-process and Redis-backed deployments. |
|
tempo/client
Package chargeclient contains the Tempo charge client method for creating Payment Credentials that satisfy Tempo HTTP 402 Challenges.
|
Package chargeclient contains the Tempo charge client method for creating Payment Credentials that satisfy Tempo HTTP 402 Challenges. |
|
tempo/internal/rpccache
Package rpccache reuses the Tempo JSON-RPC clients that the charge client and server build from URLs, so each is built once rather than per request.
|
Package rpccache reuses the Tempo JSON-RPC clients that the charge client and server build from URLs, so each is built once rather than per request. |
|
tempo/internal/txsend
Package txsend classifies eth_sendRawTransaction errors for the Tempo client and server.
|
Package txsend classifies eth_sendRawTransaction errors for the Tempo client and server. |
|
tempo/internal/zone
Package zone holds the Tempo Zone helpers the charge client and server share to pay and verify charges with Zone withdrawals, as mppx's tempo/internal/zone.ts: Zone IDs, portal addresses, sender tags and the ZonePortal and ZoneOutbox ABIs.
|
Package zone holds the Tempo Zone helpers the charge client and server share to pay and verify charges with Zone withdrawals, as mppx's tempo/internal/zone.ts: Zone IDs, portal addresses, sender tags and the ZonePortal and ZoneOutbox ABIs. |
|
tempo/redisstore
Package redisstore provides a Redis-backed replay-protection store for the Tempo charge verifier (tempo.Store and tempo.ExpiringStore).
|
Package redisstore provides a Redis-backed replay-protection store for the Tempo charge verifier (tempo.Store and tempo.ExpiringStore). |
|
tempo/server
Package chargeserver contains the Tempo charge server method and verifier.
|
Package chargeserver contains the Tempo charge server method and verifier. |
|
tempo/sqlstore
Package sqlstore provides a SQL-backed replay-protection store for the Tempo charge verifier (tempo.Store and tempo.ExpiringStore) on database/sql, for Postgres and SQLite 3.35 or later.
|
Package sqlstore provides a SQL-backed replay-protection store for the Tempo charge verifier (tempo.Store and tempo.ExpiringStore) on database/sql, for Postgres and SQLite 3.35 or later. |
|
tempo/tempoparams
Package tempoparams holds the Tempo charge parameter types that the core server package (pkg/server) exposes in server.ChargeParams.
|
Package tempoparams holds the Tempo charge parameter types that the core server package (pkg/server) exposes in server.ChargeParams. |
Click to show internal directories.
Click to hide internal directories.