chained-obj
Builder and parser for objects stored by Tradle on chain. Currently uses multipart to store arbitrary JSON data + attachments. These objects are later encrypted and put on-chain.
this module is used by Tradle
Usage
var ChainedObj = require('chained-obj')
var Builder = ChainedObj.Builder
var Parser = ChainedObj.Parser
var b = new Builder()
.data({
some: 'json'
})
.attach([
{ name: 'headshot', path: './path/to/attachment1' },
{ name: 'passport', path: './path/to/attachment2' }
])
.signWith(key)
.build(function (err, result) {
})
var p = new Parser()
.verifyWith(key)
.parse(formBuf, function (err, parsed) {
})