XDR

XDR, also known as External Data Representation, is used extensively in the DigitalBits Network, especially in the core protocol. The ledger, transactions, results, history, and even the messages passed between computers running digitalbits-core are encoded using XDR.

XDR is specified in RFC 4506.

Since XDR is a binary format and not known as widely as JSON for example, we try to hide most of it from Frontier. Instead, we opt to interpret the XDR for you and present the values as JSON attributes. That said, we also expose the XDR to you so you can get access to the raw, canonical data.

In general, Frontier will encode the XDR structures in base64 so that they can be transmitted within a json body. You should decode the base64 string into a byte stream, then decode the XDR into an in-memory data structure.

.X files

Data structures in XDR are specified in an interface definition file (IDL). The IDL files used for the DigitalBits Network are available on GitHub.


Edit this doc in GitHub

THE FUTURE OF LOYALTY STARTS HERE

Stay up to date on the latest happenings at DigitalBits. Get the latest news.