golem-base-sdk
    Preparing search index...

    Type Alias GolemBaseCreate

    Specification for creating new entities in GolemBase.

    This type defines all the parameters needed to create a new entity, including the data payload, time-to-live (BTL), and metadata annotations for efficient querying and categorization.

    const createSpec: GolemBaseCreate = {
    data: new TextEncoder().encode(JSON.stringify({ message: "Hello GolemBase" })),
    btl: 1000,
    stringAnnotations: [
    new Annotation("type", "message"),
    new Annotation("category", "greeting")
    ],
    numericAnnotations: [
    new Annotation("priority", 1),
    new Annotation("timestamp", Date.now())
    ]
    };
    type GolemBaseCreate = {
        btl: number;
        data: Uint8Array;
        numericAnnotations: NumericAnnotation[];
        stringAnnotations: StringAnnotation[];
    }
    Index

    Properties

    btl: number

    Block-to-Live: number of blocks after which the entity expires

    data: Uint8Array

    The binary data to store in the entity

    numericAnnotations: NumericAnnotation[]

    Numeric-valued metadata annotations for indexing and filtering

    stringAnnotations: StringAnnotation[]

    String-valued metadata annotations for querying and categorization