@nevermined-io/payments
    Preparing search index...

    Interface X402TokenOptions

    Options for x402 token generation that control scheme and delegation behavior.

    interface X402TokenOptions {
        delegationConfig?: DelegationConfig;
        httpVerb?: string;
        network?: string;
        resource?: X402TokenResource;
        scheme?: X402SchemeType;
        tokenVersion?: X402TokenVersion;
    }
    Index

    Properties

    delegationConfig?: DelegationConfig

    Delegation configuration for both erc4337 and card-delegation schemes

    httpVerb?: string

    HTTP verb of the protected resource (e.g. POST). Signed into a v3 token alongside X402TokenOptions.resource, and compared against the verb the seller advertises. Upper-cased by the SDK before it is sent, so 'post' and 'POST' are equivalent.

    network?: string

    Network identifier (auto-derived from scheme if omitted)

    The protected resource the token is minted for. Signed into a v3 token, which then only settles against this URL. Without it the backend has nothing to bind to and skips endpoint validation, so tokenVersion: 3 alone yields a single-use token bound to nothing — a supported mode, but not the seller binding.

    Must be the exact string the seller advertises; see X402TokenResource. Supplying it without tokenVersion: 3 is refused: only a v3 signature covers the binding, while the resource still arms the backend's endpoint allowlist and is compared against what the seller advertises — so it can only cost you a BCK.PROTOCOL.0031 or a BCK.X402.0013.

    The x402 scheme to use (defaults to 'nvm:erc4337')

    tokenVersion?: X402TokenVersion

    Request a specific EIP-712 token version. Omitted means the backend default (currently 2). Requesting 3 is a request, not a guarantee — always read the version back off the minted token.