Interface SmartCheckoutParams

Interface representing the parameters for Checkout.smartCheckout

interface SmartCheckoutParams {
    provider: Web3Provider;
    itemRequirements: (
        | ERC20ItemRequirement
        | ERC721ItemRequirement
        | NativeItemRequirement
        | ERC1155ItemRequirement)[];
    transactionOrGasAmount?: FulfillmentTransaction | GasAmount;
    routingOptions?: AvailableRoutingOptions;
    onComplete?: ((result: SmartCheckoutResult) => void);
    onFundingRoute?: ((fundingRoute: FundingRoute) => void);
    fundingRouteFullAmount?: boolean;
}

Properties

provider: Web3Provider
itemRequirements: (
    | ERC20ItemRequirement
    | ERC721ItemRequirement
    | NativeItemRequirement
    | ERC1155ItemRequirement)[]
transactionOrGasAmount?: FulfillmentTransaction | GasAmount
routingOptions?: AvailableRoutingOptions

The overrides for funding routes to consider

onComplete?: ((result: SmartCheckoutResult) => void)

The callback to be executed once all funding routes are found

onFundingRoute?: ((fundingRoute: FundingRoute) => void)

The callback to be executed on each funding route found

fundingRouteFullAmount?: boolean

A flag to get funding routes based on full or partial amount