Payload for IPFS_PIN operation

Pins an existing CID to the sender's account. Used when content already exists on IPFS and user wants to ensure availability.

interface IPFSPinPayload {
    cid: string;
    custom_charges?: CustomCharges;
    duration?:
        | number
        | "permanent"
        | "week"
        | "month"
        | "quarter"
        | "year";
    metadata?: Record<string, unknown>;
    operation: "IPFS_PIN";
}

Properties

cid: string

Content Identifier to pin

custom_charges?: CustomCharges

Optional custom charges configuration (from ipfsQuote)

duration?:
    | number
    | "permanent"
    | "week"
    | "month"
    | "quarter"
    | "year"

Optional pin duration

  • Preset string: 'permanent' | 'week' | 'month' | 'quarter' | 'year'
  • Custom number: duration in seconds (min 1 day, max 10 years)
  • undefined or 'permanent': pin never expires
metadata?: Record<string, unknown>

Optional metadata to associate with the pin

operation

The IPFS operation type