golem-base-sdk
    Preparing search index...

    Type Alias GolemBaseUpdate

    Specification for updating existing entities in GolemBase.

    Updates replace the entire entity content including data and annotations. The entity owner can modify the BTL to extend or reduce the entity's lifetime. Only the entity owner can perform update operations.

    const updateSpec: GolemBaseUpdate = {
    entityKey: "0x1234567890abcdef12345678",
    data: new TextEncoder().encode(JSON.stringify({ message: "Updated content" })),
    btl: 2000,
    stringAnnotations: [
    new Annotation("status", "updated"),
    new Annotation("version", "2.0")
    ],
    numericAnnotations: [
    new Annotation("last_modified", Date.now())
    ]
    };
    type GolemBaseUpdate = {
        btl: number;
        data: Uint8Array;
        entityKey: Hex;
        numericAnnotations: NumericAnnotation[];
        stringAnnotations: StringAnnotation[];
    }
    Index

    Properties

    btl: number

    New Block-to-Live value for the entity

    data: Uint8Array

    The new binary data to store in the entity

    entityKey: Hex

    The hexadecimal key of the entity to update

    numericAnnotations: NumericAnnotation[]

    New numeric-valued metadata annotations

    stringAnnotations: StringAnnotation[]

    New string-valued metadata annotations