@bit-gpt/h402
Version:
BitGPT's 402 open protocol for blockchain-native payments
24 lines • 1.71 kB
TypeScript
import { Network, PaymentRequirements } from "../types/index.js";
/**
* Default selector for payment requirements.
* Default behavior is to select the first payment requirement that has a stablecoin (USDT/USDC).
* If no stablecoin payment requirement is found, the first payment requirement is selected.
*
* @param paymentRequirements - The payment requirements to select from.
* @param namespace - The namespace to check against ("evm" or "solana"). If not provided, any namespace is accepted.
* @param network - The network to check against. If not provided, the network will not be checked.
* @param scheme - The scheme to check against. If not provided, the scheme will not be checked.
* @returns The payment requirement that is the most appropriate for the user.
*/
export declare function selectPaymentRequirements(paymentRequirements: PaymentRequirements[], namespace?: "evm" | "solana", network?: Network, scheme?: "exact"): PaymentRequirements;
/**
* Selector for payment requirements.
*
* @param paymentRequirements - The payment requirements to select from.
* @param namespace - The namespace to check against ("evm" or "solana"). If not provided, any namespace is accepted.
* @param network - The network to check against. If not provided, the network will not be checked.
* @param scheme - The scheme to check against. If not provided, the scheme will not be checked.
* @returns The payment requirement that is the most appropriate for the user.
*/
export type PaymentRequirementsSelector = (paymentRequirements: PaymentRequirements[], namespace?: "evm" | "solana", network?: Network, scheme?: "exact") => PaymentRequirements;
//# sourceMappingURL=selectPaymentRequirements.d.ts.map