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

    Interface X402TokenResource

    The protected resource a token is minted for.

    Load-bearing from token v3 on: url is inside the EIP-712 signature, so a v3 token only settles against the seller endpoint it names.

    Outside the v1/v2 signature, which covers from / sessionKeysProvider / sessionKeys / planId only — but not inert there: the backend compares this URL against the one the seller advertises in its paymentRequired (origin + path; an exact string comparison when either side is not a parseable URL) for any token that carries a resource. Binding a token to a URL the seller does not advertise verbatim therefore fails verification with BCK.X402.0013. Sellers built on this SDK's paymentMiddleware advertise req.originalUrl — a relative path — so for such a seller bind to that string, not to the absolute URL you fetch. See X402TokenResource.url for a seller that advertises the absolute form, which this SDK's own A2A server does.

    interface X402TokenResource {
        description?: string;
        mimeType?: string;
        url: string;
    }
    Index

    Properties

    description?: string

    Human-readable description.

    mimeType?: string

    Expected response MIME type (e.g. application/json).

    url: string

    The protected resource URL, as the seller advertises it — e.g. /api/v1/tasks from a paymentMiddleware seller, or the absolute https://seller.example/api/v1/tasks from one that advertises it that way (this SDK's A2A server does).