JavaScript implementation of the IPLD spec.
console.log(ipld.context)
# { merkleweb: { mlink: 'http://merkle-link' } }
console.log(ipld.type)
# { mlink: 'http://merkle-link' }
var node = {
data: 'aaah the data',
mlink: 'QmdasdSHJKDADHAgimethehasssssh' // should be a valid IPFS hash
}
node['@context'] = ipld.context.merkleweb
console.log(ipld.expand(node))
# { data: 'aaah the data', 'http://merkle-link': 'QmdasdSHJKDADHAgimethehasssssh'}
var encoded = ipld.marshal(obj) // returns Buffer with CBOR encoded obj
var decoded = ipld.unmarshal(encoded)
ipld.unmarshalAsync(buf, function (err, decoded) {})