TypeScript implementation of Veriform: a cryptographically verifiable data serialization format inspired by Protocol Buffers, useful for things like credentials, transparency logs, and "blockchain" applications.
For more information, see the toplevel README.md.
Help and Discussion
Have questions? Want to suggest a feature or change?
Requirements
veriform.js is presently targeting ES2017. This is because we soon plan on making use of the TC39 BigInt type when it becomes available, and want to make sure users of this library can handle modern ECMAScript versions.
Please make sure your JS runtime is ES2017 compliant, or use a transpiler like babel support older versions of ECMAScript.
Installation
Via npm:
npm install veriform
Via Yarn:
yarn install veriform
Import veriform into your project with:
;
API
Veriform.parse()
The Veriform.parse()
method parses a Uint8Array
containing a serialized
veriform message into a corresponding self-describing object representation.
Parameters
- message: The
Uint8Array
containing a veriform message to parse
Example
let message = 0x15 0x07 0x02 0x03 0x55;Veriform;// Object { 1: Object { 24: 42 } }
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/zcred/veriform
Copyright
Copyright (c) 2017 The Zcred Developers. See LICENSE.txt for further details.