Interface PinOptionsWithCharges

Extended pin options with custom charges support

interface PinOptionsWithCharges {
    customCharges?: {
        estimatedBreakdown?: IPFSCostBreakdown;
        maxCostDem: string;
    };
    duration?: number;
    fileSize?: number;
    metadata?: Record<string, unknown>;
}

Hierarchy (view full)

Properties

customCharges?: {
    estimatedBreakdown?: IPFSCostBreakdown;
    maxCostDem: string;
}

Optional custom charges configuration for cost control

Type declaration

  • OptionalestimatedBreakdown?: IPFSCostBreakdown

    Optional cost breakdown for reference

  • maxCostDem: string

    Maximum cost user agrees to pay (from ipfsQuote response)

duration?: number

Duration in blocks (0 = indefinite)

fileSize?: number

File size in bytes (required when using custom charges)

metadata?: Record<string, unknown>

Optional metadata to associate with the pin