helia
    Preparing search index...

    Interface PublishOptions

    interface PublishOptions {
        data?: Record<string, any>;
        lifetime?: number;
        offline?: boolean;
        onProgress?: ProgressEventListener<
            IPNSRoutingProgressEvents
            | PublishProgressEvents,
        >;
        signal?: AbortSignal;
        ttl?: number;
        v1Compatible?: boolean;
    }

    Hierarchy

    Index
    data?: Record<string, any>

    Extensible data that will be added to the IPNS record data and signed to verify it's integrity.

    Note that this data will be encoded as DAG-CBOR so it must be valid.

    It is recommended that any custom fields set here are prefixed with _ to avoid collision with any mandatory fields added to future versions of the IPNS specification.

    lifetime?: number

    Time duration of the signature validity in ms - after this many ms have expired the record will be invalidated.

    172_800_000
    
    offline?: boolean

    Only publish to a local datastore

    false
    
    signal?: AbortSignal
    ttl?: number

    The TTL of the record in ms - after this many ms have expired, resolving the record will query the routing for an updated version.

    Before this many ms have expired any locally stored copy will be treated as the latest version and the routing will not be queried.

    300_000
    
    v1Compatible?: boolean

    By default a IPNS V1 and a V2 signature is added to every record. Pass false here to only add a V2 signature.

    true