GTV
Generic Transfer Value (GTV) is a general-purpose protocol for sending and decoding any data structure in a way that postchain can understand it.
GTV is used to express data in:
- Primitive types (integers, strings, byte arrays, etc.)
- Complex types (only array and dictionary)
GTV gets converted to ASN.1 DER when it's sent.
GtvMessages DEFINITIONS ::= BEGIN
DictPair ::= SEQUENCE {
name UTF8String,
value RawGtv
}
RawGtv ::= CHOICE {
null [0] NULL,
byteArray [1] OCTET STRING,
string [2] UTF8String,
integer [3] INTEGER,
dict [4] SEQUENCE OF DictPair,
array [5] SEQUENCE OF RawGtv,
bigInteger [6] INTEGER
}
END