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_os.

interface IPFSCustomCharges {
    duration_blocks?: number;
    estimated_breakdown?: IPFSCostBreakdown;
    file_size_bytes: number;
    max_cost_os: 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_os: string

Maximum cost user is willing to pay, decimal-string OS (BigInt-safe).

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

IPFS operation type