Type alias Storage<A, ID>

Storage<A, ID>: {
    del: TaskEither<Error, void, [ID]>;
    get: TaskEither<Error, IOption<A>, [ID]>;
    put: TaskEither<Error, ID, [data: A]>;
}

A generic metadata type for on chain objects that has metadata stored in some external storage like IPFS.

Type Parameters

  • A extends object

  • ID = CID

Type declaration

  • del: TaskEither<Error, void, [ID]>

    delete item from storage

    Generic

    ID - id type

  • get: TaskEither<Error, IOption<A>, [ID]>

    Get item from storage

    Generic

    ID - id type

    Generic

    T - type of data

  • put: TaskEither<Error, ID, [data: A]>

    Put item to storage

    Generic

    ID - id type

    Generic

    T - type of data

Generated using TypeDoc