Skip to content

kochavalabs/xdr-js-serialize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XDR JS Serialize

CircleCI

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.

Installation

This library can be added to your project by using npm to install the xdr-js-serialize package.

npm install xdr-js-serialize

Usage

import types from 'xdr-js-serialize'

const string = new types.Str('asdf')

console.log(string.toJSON())
console.log(string.toXDR('hex'))

// console:
// asdf
// 0000000461736466

Notes

  • The XDR Quad type is currently not supported