Response from ipfsQuote nodeCall

Provides cost estimation before transaction is built and signed. Use this to populate custom_charges in the transaction.

interface IpfsQuoteResponse {
    breakdown: {
        base_cost: string;
        chargeable_bytes: number;
        free_tier_bytes: number;
        size_cost: string;
    };
    cost_dem: string;
    file_size_bytes: number;
    is_genesis: boolean;
    operation: string;
}

Properties

breakdown: {
    base_cost: string;
    chargeable_bytes: number;
    free_tier_bytes: number;
    size_cost: string;
}

Detailed cost breakdown

Type declaration

  • base_cost: string

    Base cost component

  • chargeable_bytes: number

    Bytes that will be charged

  • free_tier_bytes: number

    Bytes covered by free tier (genesis only)

  • size_cost: string

    Cost for file size

cost_dem: string

Estimated cost in DEM (as string for BigInt safety)

file_size_bytes: number

File size used for calculation

is_genesis: boolean

Whether sender is a genesis account

operation: string

Operation quoted for