import { Address } from './../crypto/address' ; import { num2hexstring , StringReader } from './../utils' ; export class TransactionOutput { static deserialize ( hexstring ) { const sr = new StringReader ( hexstring ) ; const output = new TransactionOutput ( ) ; output . assetId = sr . read ( 32 ) ; output . value = sr . readLong ( ) ; output . scriptHash = new Address ( sr . read ( 20 ) ) ; return output ; } /**
     * 32 bytes
     */ assetId : string ; value : number ; scriptHash : Address ; serialize ( ) { let result = '' ; result += this . assetId ; result += num2hexstring ( this . value , 8 , true ) ; result += this . scriptHash . serialize ( ) ; return result ; } }