pow/pow.js
function _createMiningInputBufferFromObject( objInput )
{
	let objInputCpy;
	let sInput;
	let bufSha512;
	let bufMd5;
	let bufRmd160;
	let bufSha384;

	if ( 'object' !== typeof objInput )
	{
		return null;
	}

	//	...
	objInputCpy	= {
		roundIndex		: objInput.roundIndex,
		firstTrustMEBall	: objInput.firstTrustMEBall,
		bits			: objInput.bits,
		publicSeed		: objInput.publicSeed,
		superNodeAuthor		: objInput.superNodeAuthor,
	};
	sInput		= JSON.stringify( objInputCpy );
	bufSha512	= _crypto.createHash( 'sha512' ).update( sInput, 'utf8' ).digest();
	bufMd5		= _crypto.createHash( 'md5' ).update( sInput, 'utf8' ).digest();
	bufRmd160	= _crypto.createHash( 'rmd160' ).update( sInput, 'utf8' ).digest();
	bufSha384	= _crypto.createHash( 'sha384' ).update( sInput, 'utf8' ).digest();

	return Buffer.concat( [ bufSha512, bufMd5, bufRmd160, bufSha384 ], 140 );
}
function _createMiningInputBufferFromObject( objInput )
{
	let objInputCpy;
	let sInput;
	let bufSha512;
	let bufMd5;
	let bufRmd160;
	let bufSha384;

	if ( 'object' !== typeof objInput )
	{
		return null;
	}

	//	...
	objInputCpy	= {
		roundIndex		: objInput.roundIndex,
		firstTrustMEBall	: objInput.firstTrustMEBall,
		bits			: objInput.bits,
		publicSeed		: objInput.publicSeed,
		superNodeAuthor		: objInput.superNodeAuthor,
	};
	sInput		= JSON.stringify( objInputCpy );
	bufSha512	= _crypto.createHash( 'sha512' ).update( sInput, 'utf8' ).digest();
	bufMd5		= _crypto.createHash( 'md5' ).update( sInput, 'utf8' ).digest();
	bufRmd160	= _crypto.createHash( 'rmd160' ).update( sInput, 'utf8' ).digest();
	bufSha384	= _crypto.createHash( 'sha384' ).update( sInput, 'utf8' ).digest();

	return Buffer.concat( [ bufSha512, bufMd5, bufRmd160, bufSha384 ], 140 );
}
function _createMiningInputBufferFromObject ( objInput ) { let objInputCpy ; let sInput ; let bufSha512 ; let bufMd5 ; let bufRmd160 ; let bufSha384 ; if ( 'object' !== typeof objInput ) { return null ; } //	... objInputCpy = { roundIndex : objInput . roundIndex , firstTrustMEBall : objInput . firstTrustMEBall , bits : objInput . bits , publicSeed : objInput . publicSeed , superNodeAuthor : objInput . superNodeAuthor , } ; sInput = JSON . stringify ( objInputCpy ) ; bufSha512 = _crypto . createHash ( 'sha512' ) . update ( sInput , 'utf8' ) . digest ( ) ; bufMd5 = _crypto . createHash ( 'md5' ) . update ( sInput , 'utf8' ) . digest ( ) ; bufRmd160 = _crypto . createHash ( 'rmd160' ) . update ( sInput , 'utf8' ) . digest ( ) ; bufSha384 = _crypto . createHash ( 'sha384' ) . update ( sInput , 'utf8' ) . digest ( ) ; return Buffer . concat ( [ bufSha512 , bufMd5 , bufRmd160 , bufSha384 ] , 140 ) ; }
create an input buffer with length of 140 from Js plain object
@public
@param	{object}	objInput
@return	{Buffer}
create an input buffer with length of 140 from Js plain object