Add gRPC transport specification
Description
This PR adds native gRPC transport support to the x402 specification.
The gRPC transport enables x402 payments over native gRPC protocol using metadata for payment signaling and gRPC status codes for error handling. This is distinct from the HTTP transport used with grpc-gateway reverse proxies.
Key Design Decisions:
-
Status Code: Uses
RESOURCE_EXHAUSTED(8) to signal payment required, following the precedent set by Google Cloud Platform for billing and quota enforcement. Semantically represents "you have exhausted your quota of free access." -
Metadata Keys:
x402-payment-requirements: Payment requirements (in error message)x402-payment: Payment payload (initial metadata)x402-payment-response: Settlement response (trailing metadata)
-
Data Format: All payment data is base64-encoded JSON, consistent with other x402 transports (HTTP, MCP, A2A).
Use Cases:
- Service-to-service communication in microservice architectures
- Native gRPC clients (mobile apps, CLIs, backend services)
- High-performance scenarios requiring binary protobuf
- Service mesh environments (Istio, Linkerd, etc.)
Reference Implementation: A complete Go implementation is available at https://github.com/becomeliminal/grpc-gateway-x402
Tests
This PR adds a specification document only. No code changes to test.
The spec follows the same structure and format as the existing HTTP, MCP, and A2A transport specifications.
Checklist
- [x] I have formatted and linted my code
- [x] All new and existing tests pass (N/A - spec only)
- [x] My commits are signed (required for merge)
@jackmarsh is attempting to deploy a commit to the Coinbase Team on Vercel.
A member of the Team first needs to authorize it.
🟡 Heimdall Review Status
| Requirement | Status | More Info | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reviews |
🟡
0/1
|
Denominator calculation
|