コンテンツにスキップ

Facilitator

このコンテンツはまだ日本語訳がありません。

Defined in: src/x402/types.ts:300

A facilitator endpoint kawasekit can talk to.

Two implementations live in src/x402/facilitator.ts:

  • createHttpFacilitator() — proxies /verify & /settle over HTTP to any x402 v2-compliant endpoint (Coinbase CDP, a self-hosted mirror, etc.)
  • createSelfFacilitator() — runs transferWithAuthorization from a private key kawasekit holds locally (testnet / self-host case)

createX402Handler() accepts any object satisfying this interface and is agnostic to the underlying transport (HTTPS, in-process, mocked).

Methods

settle()

settle(request): Promise<X402SettlementResponse>

Defined in: src/x402/types.ts:304

Settle a verified payment — broadcasts to the chain.

Parameters

request

X402VerifyRequest

Returns

Promise<X402SettlementResponse>


supported()

supported(): Promise<X402SupportedResponse>

Defined in: src/x402/types.ts:306

List supported (scheme, network) pairs.

Returns

Promise<X402SupportedResponse>


verify()

verify(request): Promise<X402VerifyResponse>

Defined in: src/x402/types.ts:302

Verify a payment payload without broadcasting.

Parameters

request

X402VerifyRequest

Returns

Promise<X402VerifyResponse>