IPFS custom charges configuration

Included in transaction content to specify maximum cost user agrees to pay. Node will validate that actual cost does not exceed max_cost_dem.

interface IPFSCustomCharges {
    duration_blocks?: number;
    estimated_breakdown?: IPFSCostBreakdown;
    file_size_bytes: number;
    max_cost_dem: string;
    operation: "IPFS_ADD" | "IPFS_PIN" | "IPFS_UNPIN";
}

Properties

duration_blocks?: number

Optional duration in blocks (for PIN operations)

estimated_breakdown?: IPFSCostBreakdown

Optional cost breakdown from ipfsQuote (for reference)

file_size_bytes: number

File size in bytes - used for cost calculation validation

max_cost_dem: string

Maximum cost user is willing to pay (in DEM wei as string for BigInt safety)

operation: "IPFS_ADD" | "IPFS_PIN" | "IPFS_UNPIN"

IPFS operation type