@dashevo/wallet-lib
Version:
Light wallet library for Dash
17 lines (15 loc) • 310 B
JavaScript
const cbor = require('cbor');
/**
* Allow to decode an input
* Useful for encryption.
* @param {string} method
* @param {any} data
* @return {any}
*/
const decode = function decode(method, data) {
switch (method) {
default:
return cbor.decodeFirstSync(data);
}
};
module.exports = decode;