Xdr-js-serialize is a library for facilitating (de)serialization between the XDR format and Javascript Dictionaries.
This repository is best used in tandom with xdr-codegen for anything beyond basic xdr manipulation.
This library can be added to your project by using npm to install the xdr-js-serialize package.
npm install xdr-js-serialize
import types from 'xdr-js-serialize'
const string = new types.Str('asdf')
console.log(string.toJSON())
console.log(string.toXDR('hex'))
// console:
// asdf
// 0000000461736466
- The XDR Quad type is currently not supported