nl_tokens: FormatData under strict conditions hex prefix
pl_tokens: function formatData ( value , byteLength ) { var output = value ; // eslint-disable-line var outputByteLength = 0 ; // eslint-disable-line // prefix only under strict conditions, else bypass if ( typeof value === 'string' ) { output = ` ${ padToEven ( stripHexPrefix ( <mask> ) ) } ` ; outputByteLength = getBinarySize ( output ) ; } // format double padded zeros. if ( output === '0x00' ) { output = '0x0' ; } // throw if bytelength is not correct if ( typeof byteLength === 'number' && value !== null && output !== '0x' && output !== '0x0' // support empty values && ( ! / ^[0-9A-Fa-f]+$ / . test ( stripHexPrefix ( output ) ) || outputByteLength !== 2 + byteLength * 2 ) ) { throw new Error ( ` ${ output } ${ 2 + byteLength * 2 } ${ outputByteLength } ` ) ; } return output ; }