Skip to content

PqPerennialFacilitator

Defined in: packages/scheme-qorechain/src/perennial.ts:146

x402 SchemeNetworkFacilitator for pq-perennial (docs/spec.md, section 6.2): checks the spend against the position and the beneficiary’s on-chain key, then relays vault.spend(...) and confirms the Spent event.

  • SchemeNetworkFacilitator

new PqPerennialFacilitator(options): PqPerennialFacilitator

Defined in: packages/scheme-qorechain/src/perennial.ts:151

PqPerennialFacilitatorOptions

PqPerennialFacilitator

readonly caipFamily: "eip155:*" = "eip155:*"

Defined in: packages/scheme-qorechain/src/perennial.ts:148

CAIP family pattern that this facilitator supports. Used to group signers by blockchain family in the supported response.

// EVM facilitators
readonly caipFamily = "eip155:*";
// SVM facilitators
readonly caipFamily = "solana:*";

SchemeNetworkFacilitator.caipFamily


readonly scheme: "pq-perennial" = SCHEME_PERENNIAL

Defined in: packages/scheme-qorechain/src/perennial.ts:147

SchemeNetworkFacilitator.scheme

getExtra(_network): Record<string, unknown> | undefined

Defined in: packages/scheme-qorechain/src/perennial.ts:155

Get mechanism-specific extra data needed for the supported kinds endpoint. This method is called when building the facilitator’s supported response.

`${string}:${string}`

Record<string, unknown> | undefined

Extra data object or undefined if no extra data is needed

// EVM schemes return undefined (no extra data needed)
getExtra(network: Network): undefined {
return undefined;
}
// SVM schemes return feePayer address
getExtra(network: Network): Record<string, unknown> | undefined {
return { feePayer: this.signer.address };
}

SchemeNetworkFacilitator.getExtra


getSigners(_network): string[]

Defined in: packages/scheme-qorechain/src/perennial.ts:159

Get signer addresses used by this facilitator for a given network. These are included in the supported response to help clients understand which addresses might sign/pay for transactions.

Supports multiple addresses for load balancing, key rotation, and high availability.

string

string[]

Array of signer addresses (wallet addresses, fee payer addresses, etc.)

// EVM facilitator
getSigners(network: string): string[] {
return [...this.signer.getAddresses()];
}
// SVM facilitator
getSigners(network: string): string[] {
return [...this.signer.getAddresses()];
}

SchemeNetworkFacilitator.getSigners


settle(payload, requirements): Promise<SettleResponse>

Defined in: packages/scheme-qorechain/src/perennial.ts:177

PaymentPayload

PaymentRequirements

Promise<SettleResponse>

SchemeNetworkFacilitator.settle


verify(payload, requirements): Promise<VerifyResponse>

Defined in: packages/scheme-qorechain/src/perennial.ts:163

PaymentPayload

PaymentRequirements

Promise<VerifyResponse>

SchemeNetworkFacilitator.verify