Skip to content

Commit

Permalink
Document raw data pointer serialization (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanssv authored Apr 15, 2024
1 parent b83b5ad commit c98caac
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion serializations.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ Note: From Ceres protocol version `contract` can be a name (where the
]
```

#### Name service update transaction
#### Name service update transaction (version 1, until Ceres release)
```
[ <account> :: id()
, <nonce> :: int()
Expand All @@ -546,6 +546,26 @@ Note: From Ceres protocol version `contract` can be a name (where the
]
```

#### Name service update transaction (version 2, from Ceres release)
```
[ <account> :: id()
, <nonce> :: int()
, <hash> :: id()
, <name_ttl> :: int()
, <pointers> :: [{binary(), binary()}]
, <client_ttl> :: int()
, <fee> :: int()
, <ttl> :: int()
]
```

In Erlang notation, the `binary()` for pointer value have the following pattern:
```
<<Tag:1/unsigned-integer-unit:8, Data/binary>>
```
Where `Tag == 1` means it is a serialized `id()` and `Tag == 2` means it is a
raw binary array.

#### Name service revoke transaction
```
[ <account> :: id()
Expand Down

0 comments on commit c98caac

Please sign in to comment.