waves_logo Docs
  • About Waves blockchain
    About Waves blockchain
  • Account
    • Account balance
      Account balance
    • Account data storage
      Account data storage
    • Address
      Address
    • Alias
      Alias
    • dApp
      dApp
    • Smart account
      Smart account
    Account
  • Token (Asset)
    • Non-fungible token
      Non-fungible token
    • Smart asset
      Smart asset
    • Token ID
      Token ID
    • WAVES
      WAVES
    • WAVELET
      WAVELET
    • WCT
      WCT
    Token (Asset)
  • Transaction
    • Transaction ID
      Transaction ID
    • Transaction body bytes
      Transaction body bytes
    • Transaction fee
      • Sponsored fee
        Sponsored fee
      Transaction fee
    • Transaction proof
      Transaction proof
    • Transaction signature
      Transaction signature
    • Transaction timestamp
      Transaction timestamp
    • Transaction validation
      Transaction validation
    • Transaction version
      Transaction version
    Transaction
  • Transaction type
    • Burn transaction
      Burn transaction
    • Create alias transaction
      Create alias transaction
    • Data transaction
      Data transaction
    • Exchange transaction
      Exchange transaction
    • Genesis transaction
      Genesis transaction
    • Invoke script transaction
      Invoke script transaction
    • Issue transaction
      Issue transaction
    • Lease cancel transaction
      Lease cancel transaction
    • Lease transaction
      Lease transaction
    • Mass transfer transaction
      Mass transfer transaction
    • Reissue transaction
      Reissue transaction
    • Set asset script transaction
      Set asset script transaction
    • Set script transaction
      Set script transaction
    • Transfer transaction
      Transfer transaction
    • Update asset info transaction
      Update asset info transaction
    Transaction type
  • Mainnet, Testnet, Stagenet
    Mainnet, Testnet, Stagenet
  • Node
    • Mining node
      Mining node
    • Validating node
      Validating node
    • Leased Proof of Stake
      Leased Proof of Stake
    Node
  • Mining
    • Miner
      Miner
    • Mining account
      Mining account
    • Mining reward
      Mining reward
    Mining
  • Block
    • Block generation
      • Base target
        Base target
      • Generation signature
        Generation signature
      Block generation
    • Block height
      Block height
    • Block signature
      Block signature
    • Block timestamp
      Block timestamp
    • Transations Root Hash
      Transations Root Hash
    • Genesis block
      Genesis block
    Block
  • Oracle
    Oracle
  • Order
    Order
  • Protocols & Data formats
    • Cryptographic practical details
      Cryptographic practical details
    • Waves-NG solution
      Waves-NG solution
    • Waves-NG protocol
      Waves-NG protocol
    • Fair Proof of Stake
      Fair Proof of Stake
    • Blockchain data types
      Blockchain data types
    • Binary format
      • Address binary format
        Address binary format
      • Alias binary format
        Alias binary format
      • Block binary format
        Block binary format
      • Network message binary format
        • Block message binary format
          Block message binary format
        • Checkpoint message binary format
          Checkpoint message binary format
        • Get block message binary format
          Get block message binary format
        • Get peers message binary format
          Get peers message binary format
        • Get signatures message binary format
          Get signatures message binary format
        • Handshake message binary format
          Handshake message binary format
        • Peers message binary format
          Peers message binary format
        • Score message binary format
          Score message binary format
        • Signatures message binary format
          Signatures message binary format
        • Transaction message binary format
          Transaction message binary format
        Network message binary format
      • Order binary format
        Order binary format
      • Transaction binary format
        • Burn transaction binary format
          Burn transaction binary format
        • Create alias transaction binary format
          Create alias transaction binary format
        • Data transaction binary format
          Data transaction binary format
        • Exchange transaction binary format
          Exchange transaction binary format
        • Genesis transaction binary format
          Genesis transaction binary format
        • Invoke script transaction binary format
          Invoke script transaction binary format
        • Issue transaction binary format
          Issue transaction binary format
        • Lease cancel transaction binary format
          Lease cancel transaction binary format
        • Lease transaction binary format
          Lease transaction binary format
        • Mass transfer transaction binary format
          Mass transfer transaction binary format
        • Reissue transaction binary format
          Reissue transaction binary format
        • Set asset script transaction binary format
          Set asset script transaction binary format
        • Set script transaction binary format
          Set script transaction binary format
        • Sponsor fee transaction binary format
          Sponsor fee transaction binary format
        • Transfer transaction binary format
          Transfer transaction binary format
        • Update asset info transaction binary format
          Update asset info transaction binary format
        Transaction binary format
      • Transaction proof binary format
        Transaction proof binary format
      Binary format
    • Validation rules
      Validation rules
    Protocols & Data formats
  • Glossary
    Glossary
      • English
      • Русский
      On this page
        • Data array of a data transaction
        • The key field
        • The type field
        • The value field
        • Binary format
      waves_logo Docs

          # Data transaction

          Data transaction is a transaction that writes data to an account data storage.

          Each data transaction has a data array that contains data to be written. In JSON representation of a transaction the data array is the field data.

          # Data array of a data transaction

          The maximum length of an array is 100 elements.

          The maximum size of an array is 150 kilobytes.

          Each element of an array is an object that has 3 fields: key, type, value.

          An array cannot contain two elements with the same key field.

          # The key field

          The key field is a non-empty UTF-8 string.

          At the stage of transaction validation, the key field is converted from UTF-8 to UTF-16 encoding. The size of the resulting array of 16-bit words must not exceed 100 elements. Thus, the size of the key must be from 1 to 200 bytes inclusive.

          The key is being deleted when its type and value are not specified.

          This functionality becomes available since node version 1.2.0, after activation of feature #15 “Ride V4, VRF, Protobuf, Failed transactions”. Versions 1.2.x are currently available on Stagenet only.

          When deleting a key using the JSON representation of a transaction, null is used as the type and value of the key. In one data transaction, keys can be used both for writing and deleting records. The maximum number of keys to be deleted in one transaction cannot exceed 100.

          # The type field

          The type field specifies the type of the value field:

          • binary
          • boolean
          • integer
          • string

          # The value field

          The size of value field can be from 0 to 32767 bytes.

          # Binary format

          See the page Data transaction binary format.

          Create alias transaction
          Exchange transaction
          Create alias transaction
          Exchange transaction