Helia
    Preparing search index...

    Interface Pins

    interface Pins {
        add(
            cid: CID,
            options?: AddOptions,
        ): AsyncGenerator<CID<unknown, number, number, Version>, void, undefined>;
        get(cid: CID, options?: AbortOptions): Promise<Pin>;
        isPinned(cid: CID, options?: IsPinnedOptions): Promise<boolean>;
        ls(options?: LsOptions): AsyncGenerator<Pin, void, undefined>;
        rm(
            cid: CID,
            options?: RmOptions,
        ): AsyncGenerator<CID<unknown, number, number, Version>, void, undefined>;
        setMetadata(
            cid: CID,
            metadata: undefined | Record<string, string | number | boolean>,
            options?: AbortOptions,
        ): Promise<void>;
    }
    Index

    Methods

    • Pin a block in the blockstore. It will not be deleted when garbage collection is run.

      Parameters

      Returns AsyncGenerator<CID<unknown, number, number, Version>, void, undefined>

    • Unpin the block that corresponds to the passed CID. The block will be deleted when garbage collection is run.

      Parameters

      Returns AsyncGenerator<CID<unknown, number, number, Version>, void, undefined>

    • If the CID is pinned, update the metadata associated with the pin, otherwise throw an error

      Parameters

      Returns Promise<void>