Vana SDK - v4.1.0
    Preparing search index...

    Function parsePersonalServerPaymentRequired

    • Parse a 402 Payment Required body into a validated payment operation.

      Parameters

      • res: FetchResponseLike

        The 402 response.

      • grantId: string

        The grant id of the read (default legacy grant opId).

      Returns Promise<PersonalServerPaymentOperation>

      The parsed payment requirement.

      Accepts a few field spellings and falls back to the read's own grantId and the native asset when a field is absent from a legacy grant challenge.

      Receipt-bound data_access uses a fail-closed canonical path: one compatible accepts entry must contain the scheme, network, message, and complete receipt. Its positive uint256 paymentNonce is mandatory because the Personal Server encodes challenge freshness in that nonce and checks it on retry. This parser shape-validates the receipt and binds opId to recordId; it does not recover or verify the server signature.