x402z-facilitator
v0.1.2
Published
Facilitator service for the erc7984-mind-v1 x402 scheme.
Downloads
87
Readme
x402z-facilitator
Facilitator service for the erc7984-mind-v1 x402 scheme.
Install
pnpm add x402z-facilitatorFolder map
src/service/: HTTP service + bootstrapsrc/scheme/: scheme implementation + registrationsrc/index.ts: public exports
Run (service)
Set env vars used by the configured networks in FACILITATOR_NETWORK_CONFIG (defined in this package):
FACILITATOR_SEPOLIA_RPC_URLFACILITATOR_SEPOLIA_PRIVATE_KEYFACILITATOR_BASE_RPC_URL(for Base mainnet, if enabled)FACILITATOR_BASE_PRIVATE_KEY(for Base mainnet, if enabled)FACILITATOR_PORTFACILITATOR_BATCH_INTERVAL_MSFACILITATOR_GAS_MULTIPLIERFACILITATOR_FEE_MULTIPLIERFACILITATOR_RECEIPT_TIMEOUT_MSFACILITATOR_RECEIPT_CONFIRMATIONSFACILITATOR_RECEIPT_POLLING_INTERVAL_MS
Then run:
pnpm -C packages/x402z-facilitator build
pnpm -C packages/x402z-facilitator startExamples
See examples/README.md for the full-process facilitator + server setup.
Notes
- This service receives
/verifyand/settleHTTP calls from the server. - It queues settle requests and submits
batchConfidentialTransferWithAuthorizationon an interval. - It validates per-item results from batch events and reports them back to the server.
- Scheme/token/network defaults are sourced from
x402z-scheme-config.
API surface
Exports:
X402zEvmFacilitator: facilitator scheme implementation for erc7984-mind-v1.registerX402zEvmFacilitatorScheme: registers the scheme with facilitator.createFacilitatorService: builds the facilitator HTTP service.startFacilitatorService: starts the service with a config.startFacilitator: CLI/bootstrap entrypoint.
Types:
X402zFacilitatorSchemeOptions: scheme config for facilitator registration.X402zFacilitatorRegistrationOptions: registration options for the scheme.FacilitatorServiceOptions: service configuration options.
