Mapped Anchor
Mapped Anchoring stores hashes as key / value pairs on the blockchain.
The mapped anchor transaction is part of the Titanium release.
JSON
id
andheight
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, soLTO * 10^8
Batch transaction
Up to 100 pairs can be anchored in a single transaction. Bundling multiple pairs in 1 transaction can help reduce transaction fees.
The Mapped Anchor fee is made up of two amounts: a fixed one plus a per-anchor one. The fees are calculated as:
where N
is the number of anchor pairs in the transaction. The total is rounded up to the nearest 100_000.
Binary schema
The binary data structure of the unsigned transaction.
1
Transaction type
Byte (constant, value=15)
1
2
Version
Byte (constant, value=3)
1
3
Network 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 key length (N)
Short
2
10
Anchor 1 key
Array[Byte]
N
11
Anchor 1 value length (M)
Short
2
12
Anchor 1 value
Array[Byte]
N
...
Anchor key length, Anchor key, Anchor value length, and Anchor value are repeated for each anchor hash.
The maximum length of an anchor is 100 bytes.
Network 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.
Last updated