src/encoder.js
function encodeAttachmentMSTTransfer(buffer, offset, symbol, quantity) {
    if (symbol == undefined)
        throw Error('Specify output asset');
    if (quantity == undefined)
        throw Error('Specify output quanity');
    offset = buffer.writeUInt32LE(Constants.MST.STATUS.TRANSFER, offset);
    offset += encodeString(buffer, symbol, offset);
    offset = bufferutils.writeUInt64LE(buffer, quantity, offset);
    return offset;
}
function encodeAttachmentMSTTransfer(buffer, offset, symbol, quantity) {
    if (symbol == undefined)
        throw Error('Specify output asset');
    if (quantity == undefined)
        throw Error('Specify output quanity');
    offset = buffer.writeUInt32LE(Constants.MST.STATUS.TRANSFER, offset);
    offset += encodeString(buffer, symbol, offset);
    offset = bufferutils.writeUInt64LE(buffer, quantity, offset);
    return offset;
}
function encodeAttachmentMSTTransfer ( buffer , offset , symbol , quantity ) { if ( symbol == undefined ) throw Error ( 'Specify output asset' ) ; if ( quantity == undefined ) throw Error ( 'Specify output quanity' ) ; offset = buffer . writeUInt32LE ( Constants . MST . STATUS . TRANSFER , offset ) ; offset += encodeString ( buffer , symbol , offset ) ; offset = bufferutils . writeUInt64LE ( buffer , quantity , offset ) ; return offset ; }
Helper function to encode the attachment for an asset transfer.
@param {Buffer} buffer
@param {Number} offset
@param {String} symbol
@param {Number} quantity
@returns {Number} New offset
@throws {Error}
Helper function to encode the attachment for an asset transfer .