write(b) {
        const buf = new util_1.default.Reader(b);
        // assets ([]AssetTransfer)
        {
            // IsInternalTypeArray
            const size = bytes_1.ReadVariableSize(buf, 8, 8);
            this.assets = [];
            for (let i = 0; i < size; i++) {
                const newValue = new field_types_1.AssetTransfer();
                newValue.Write(buf);
                this.assets.push(newValue);
            }
        }
        // offer_expiry (Timestamp)
        {
            this.offer_expiry = new protocol_types_1.Timestamp();
            this.offer_expiry.Write(buf);
        }
        // exchange_fee (uint64)
        {
            this.exchange_fee = bytes_1.read(buf, 'uint64');
        }
        // exchange_fee_address (PublicKeyHash)
        {
            this.exchange_fee_address = new protocol_types_1.PublicKeyHash();
            this.exchange_fee_address.Write(buf);
        }
        return b.length - buf.length;
    }
// write populates the fields in Transfer from the byte slice
write populates the fields in Transfer from the byte slice
write populates the fields in Transfer from the byte slice
write(b) {
        const buf = new util_1.default.Reader(b);
        {
            const size = bytes_1.ReadVariableSize(buf, 8, 8);
            this.assets = [];
            for (let i = 0; i < size; i++) {
                const newValue = new field_types_1.AssetTransfer();
                newValue.Write(buf);
                this.assets.push(newValue);
            }
        }
        {
            this.offer_expiry = new protocol_types_1.Timestamp();
            this.offer_expiry.Write(buf);
        }
        {
            this.exchange_fee = bytes_1.read(buf, 'uint64');
        }
        {
            this.exchange_fee_address = new protocol_types_1.PublicKeyHash();
            this.exchange_fee_address.Write(buf);
        }
        return b.length - buf.length;
    }
write ( b ) { const buf = new util_1 . default . Reader ( b ) ; { const size = bytes_1 . ReadVariableSize ( buf , 8 , 8 ) ; this . assets = [ ] ; for ( let i = 0 ; i < size ; i ++ ) { const newValue = new field_types_1 . AssetTransfer ( ) ; newValue . Write ( buf ) ; this . assets . push ( newValue ) ; } } { this . offer_expiry = new protocol_types_1 . Timestamp ( ) ; this . offer_expiry . Write ( buf ) ; } { this . exchange_fee = bytes_1 . read ( buf , 'uint64' ) ; } { this . exchange_fee_address = new protocol_types_1 . PublicKeyHash ( ) ; this . exchange_fee_address . Write ( buf ) ; } return b . length - buf . length ; }
write populates the fields in Transfer from the byte slice
write populates the fields in Transfer from the byte slice
// assets ([]AssetTransfer) // IsInternalTypeArray // offer_expiry (Timestamp) // exchange_fee (uint64) // exchange_fee_address (PublicKeyHash)