UNPKG

@bit-gpt/h402

Version:

BitGPT's 402 open protocol for blockchain-native payments

29 lines 1.58 kB
import { SolanaClient } from "../../types/shared/client.js"; import { SolanaPaymentPayload, PaymentRequirements, SettleResponse, VerifyResponse } from "../../types/index.js"; /** * Verifies a payment payload against the required payment details regardless of the scheme * this function wraps all verify functions for each specific scheme * * @param payload - The signed payment payload containing transfer parameters and signature * @param paymentRequirements - The payment requirements that the payload must satisfy * @returns A VerifyResponse indicating if the payment is valid and any invalidation reason */ export declare function verify(payload: SolanaPaymentPayload, paymentRequirements: PaymentRequirements): Promise<VerifyResponse>; /** * Settles a payment payload against the required payment details regardless of the scheme * this function wraps all settle functions for each specific scheme * * @param client - The Solana client used for blockchain interactions * @param payload - The signed payment payload containing transfer parameters and signature * @param paymentRequirements - The payment requirements that the payload must satisfy * @returns A SettleResponse indicating if the payment is settled and any settlement reason */ export declare function settle(client: SolanaClient, payload: SolanaPaymentPayload, paymentRequirements: PaymentRequirements): Promise<SettleResponse>; export type Supported = { h402Version: number; kind: { scheme: string; networkId: string; }[]; }; //# sourceMappingURL=facilitator.d.ts.map