Skip to content

Function: selectDeployments() ​

ts
function selectDeployments<TExtra>(
   supported, 
   selectExtra, 
   prefer?
): DeploymentTerms<TExtra>[];

Defined in: packages/x402-core/src/deployment.ts:141

Every set of terms this facilitator offers for the preferred kinds — one per way to pay, which is what a 402's accepts[] carries.

Each entry still needs its own price: a merchant advertising two instruments is quoting two amounts, and 0.05 of one token is not 0.05 of another. That pairing is the merchant's, which is why this returns terms and not quotes.

Nor is there an "exactly one" wrapper, scheme-specific or otherwise. Core reports what is on offer; whether offering several is an error is the merchant layer's call, and only that layer can say how to fix it — it knows the quote is configured as network:/instrument: on a requirements spec, which is not what this function's parameters are called.

Type Parameters ​

TExtra ​

TExtra

Parameters ​

supported ​

extensions ​

string[] = ...

The ids of the extensions the facilitator implements (x402 v2 §7.3.1). A list of ids, not the extensions object an answer carries.

kinds ​

object[] = ...

signers ​

{ [key: string]: string[]; } = ...

The facilitator's signers, keyed by CAIP-2 pattern such as canton:*.

selectExtra ​

DeploymentExtraSelector<TExtra>

prefer? ​

DeploymentPreference = {}

Returns ​

DeploymentTerms<TExtra>[]