supra-ts-sdk - v2.0.0
    Preparing search index...

    Type Alias WriteSetChangeBeta

    WriteSetChange:
        | {
            type: "write_resource";
            address: string;
            state_key_hash: string;
            data: MoveResource;
        }
        | {
            type: "delete_resource";
            address: string;
            state_key_hash: string;
            resource: string;
        }
        | {
            type: "write_module";
            address: string;
            state_key_hash: string;
            data: { bytecode: string; abi?: MoveModule
            | null };
        }
        | {
            type: "delete_module";
            address: string;
            state_key_hash: string;
            module: string;
        }
        | {
            type: "write_table_item";
            state_key_hash: string;
            handle: string;
            key: string;
            value: string;
            data?: | {
                key: MoveValue;
                key_type: string;
                value: MoveValue;
                value_type: string;
            }
            | null;
        }
        | {
            type: "delete_table_item";
            state_key_hash: string;
            handle: string;
            key: string;
            data?: { key: MoveValue; key_type: string }
            | null;
        }

    A change that a simulated transaction would make to one Move state key, in the Aptos API's WriteSetChange representation. A written resource group is one write_resource per member, each with the group's state_key_hash; a deleted resource group is one delete_resource whose resource is the group's own tag.

    Preview: wraps an API added in supra_node_v12.0.0, which may change until that release reaches Testnet.

    Type Declaration

    • {
          type: "write_resource";
          address: string;
          state_key_hash: string;
          data: MoveResource;
      }
    • {
          type: "delete_resource";
          address: string;
          state_key_hash: string;
          resource: string;
      }
    • {
          type: "write_module";
          address: string;
          state_key_hash: string;
          data: { bytecode: string; abi?: MoveModule | null };
      }
    • {
          type: "delete_module";
          address: string;
          state_key_hash: string;
          module: string;
      }
    • {
          type: "write_table_item";
          state_key_hash: string;
          handle: string;
          key: string;
          value: string;
          data?:
              | {
                  key: MoveValue;
                  key_type: string;
                  value: MoveValue;
                  value_type: string;
              }
              | null;
      }
      • type: "write_table_item"
      • state_key_hash: string
      • handle: string

        The table handle, hex encoded.

      • key: string

        The BCS bytes of the item's key, hex encoded.

      • value: string

        The BCS bytes of the item's value, hex encoded.

      • Optionaldata?:
            | {
                key: MoveValue;
                key_type: string;
                value: MoveValue;
                value_type: string;
            }
            | null

        The decoded key and value; absent for a table the node's table-info index has no entry for.

    • {
          type: "delete_table_item";
          state_key_hash: string;
          handle: string;
          key: string;
          data?: { key: MoveValue; key_type: string } | null;
      }
      • type: "delete_table_item"
      • state_key_hash: string
      • handle: string
      • key: string
      • Optionaldata?: { key: MoveValue; key_type: string } | null

        The decoded key; absent for a table the node's table-info index has no entry for.