UNPKG

minterjs-tx

Version:

A simple module for creating, manipulating and signing Minter transactions

42 lines (39 loc) 1.1 kB
import defineProperties from '../define-properties.js'; export default class TxDataCreateCoin { constructor(data, options) { // Define Properties const fields = [ { name: 'name', default: Buffer.from([]), }, { name: 'symbol', length: 10, }, { name: 'initialAmount', length: 32, allowLess: true, }, { name: 'maxSupply', length: 32, allowLess: true, }, { name: 'mintable', length: 1, allowLess: true, }, { name: 'burnable', length: 1, allowLess: true, }]; /** * Returns the rlp encoding of the transaction * @method serialize * @return {Buffer} * @memberof Transaction * @name serialize */ // attached serialize defineProperties(this, fields, data, options); } }