golem-base-sdk
    Preparing search index...

    Type Alias GolemBaseTransaction

    Comprehensive transaction specification for atomic GolemBase operations.

    This type allows combining multiple entity operations (create, update, delete, extend) into a single atomic blockchain transaction. All operations within a transaction either succeed together or fail together, ensuring data consistency.

    const transaction: GolemBaseTransaction = {
    creates: [{
    data: new TextEncoder().encode("New entity 1"),
    btl: 1000,
    stringAnnotations: [new Annotation("type", "document")],
    numericAnnotations: []
    }],
    updates: [{
    entityKey: "0xabcd1234567890ef",
    data: new TextEncoder().encode("Updated content"),
    btl: 1500,
    stringAnnotations: [new Annotation("status", "modified")],
    numericAnnotations: []
    }],
    deletes: ["0x567890abcdef1234", "0x901234567890abcd"],
    extensions: [{
    entityKey: "0xef34567890abcdef",
    numberOfBlocks: 200
    }]
    };
    type GolemBaseTransaction = {
        creates?: GolemBaseCreate[];
        deletes?: Hex[];
        extensions?: GolemBaseExtend[];
        updates?: GolemBaseUpdate[];
    }
    Index

    Properties

    creates?: GolemBaseCreate[]

    Array of entity creation specifications

    deletes?: Hex[]

    Array of entity keys to delete

    extensions?: GolemBaseExtend[]

    Array of BTL extension specifications

    updates?: GolemBaseUpdate[]

    Array of entity update specifications