LTO Network
Search…
Anchor
Anchoring stores a hash on the blockchain, allowing anyone to verify that data hasn't been tempered with.

JSON

1
{
2
"type": 15,
3
"version": 3,
4
"id": "8M6dgn85eh3bsHrVhWng8FNaHBcHEJD4MPZ5ZzCciyon",
5
"sender": "3Jq8mnhRquuXCiFUwTLZFVSzmQt3Fu6F7HQ",
6
"senderKeyType": "ed25519",
7
"senderPublicKey": "AJVNfYjTvDD2GWKPejHbKPLxdvwXjAnhJzo6KCv17nne",
8
"fee": 35000000,
9
"timestamp": 1610397549043,
10
"anchors": [
11
"5SbkwAekNbaG8P1mTDdAE88mpWtCdET9vTmV2v9vQsCK",
12
...
13
],
14
"proofs": [
15
"4aMwABCZwtXrGGKmBdHdR5VVFqG51v5dPoyfDVZ7jfgD3jqc851ME5QkToQdfSRTqQmvnB9YT4tCBPcMzi59fZye"
16
],
17
"height": 1069662
18
}
Copied!
  • id and height should be omitted when broadcasting. These fields are set by the node.
  • Binary strings are base58 encoded.
  • timestamp is in microseconds since epoch.
  • fee includes 8 digits, so LTO * 10^8

Binary schema

The binary data structure of the unsigned transaction.
V3 (current)
V1
#
Field Name
Type
Length
1
Transaction type
Byte (constant, value=15)
1
2
Version
Byte (constant, value=3)
1
3
Chain id
Byte
1
4
Timestamp
Long
8
5
Sender's key type
KeyType (Byte)
1
6
Sender's public key
PublicKey (Array[Byte])
32 | 33
7
Fee
Long
8
8
Number of anchors
Short
2
9
Anchor 1 length (N)
Byte
2
10
Anchor 1
Array[Byte]
N
...
  • Anchor length and Anchor can be repeated for each anchor hash.
  • Chain id can be obtained by taking the 2nd byte from the sender address.
  • Each key type has a numeric id in addition to the reference from the JSON.
  • Integers (short, int, long) have a big endian byte order.
#
Field Name
Type
Length
1
Transaction type
Byte (constant, value=15)
1
2
Version
Byte (constant, value=1)
1
3
Sender's public key
PublicKey (Array[Byte])
32
4
Number of anchors
Short (constant, value=1)
2
5
Anchor 1 length (N)
Short
2
6
Anchor 1
Array[Byte]
N
...
7
Timestamp
Long
8
8
Fee
Long
8
  • Anchor length and Anchor can be repeated for each anchor hash.
  • Integers (short, int, long) have a big endian byte order.
Last modified 2mo ago
Copy link