@keyring/cbor-plugin
v0.2.1
Published
Plugin for storing data in a transaction with cbor encoding
Downloads
4
Readme
@keyring/cbor-plugin
This plugin allows you to easily insert CBOR encoded data into a transaction. When using this plugin a cbor method is added to the Keyring Transaction class.
Usage
const BSV = require('@keyring/bsv');
const cborPlugin = require('@keyring/cbor-plugin');
const Transaction = BSV.Transaction;
Transaction.use(new cborPlugin());
let tx = new Transaction();
tx.cbor({ hello: 'world' });
console.log('data', tx.data()[0]);