arkiv-sdk
    Preparing search index...

    Type Alias ArkivTransaction

    Comprehensive transaction specification for atomic Arkiv 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: ArkivTransaction = {
    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 ArkivTransaction = {
        creates?: ArkivCreate[];
        deletes?: Hex[];
        extensions?: ArkivExtend[];
        updates?: ArkivUpdate[];
    }
    Index

    Properties

    creates?: ArkivCreate[]

    Array of entity creation specifications

    deletes?: Hex[]

    Array of entity keys to delete

    extensions?: ArkivExtend[]

    Array of BTL extension specifications

    updates?: ArkivUpdate[]

    Array of entity update specifications