"use strict";
/**
 * Wire types for the sompi x402 flow.
 *
 * Tab-based by design: KIP-9 storage mass makes sub-KAS on-chain sends pay
 * >1% fees, so clients deposit once (>= minDepositSompi) into a per-tab
 * address and the server charges requests against that credit off-chain.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.X_PAYMENT_RESPONSE_HEADER = exports.X_PAYMENT_HEADER = void 0;
exports.encodePaymentHeader = encodePaymentHeader;
exports.decodePaymentHeader = decodePaymentHeader;
exports.X_PAYMENT_HEADER = "x-payment";
exports.X_PAYMENT_RESPONSE_HEADER = "x-payment-response";
function encodePaymentHeader(p) {
    return Buffer.from(JSON.stringify(p), "utf8").toString("base64");
}
function decodePaymentHeader(value) {
    return JSON.parse(Buffer.from(value, "base64").toString("utf8"));
}
