write(b) {
        const buf = new util_1.default.Reader(b);
        // asset_type (string)
        {
            this.asset_type = bytes_1.ReadFixedChar(buf, 3);
        }
        // asset_auth_flags ([]byte)
        {
            this.asset_auth_flags = bytes_1.ReadVarBin(buf, 8);
        }
        // transfers_permitted (bool)
        {
            this.transfers_permitted = bytes_1.read(buf, 'bool');
        }
        // trade_restrictions ([][3]byte)
        {
            const size = bytes_1.ReadVariableSize(buf, 16, 8);
            const type = '[][3]byte'.slice(2);
            this.trade_restrictions = [...Array(size)].map(() => bytes_1.read(buf, type));
        }
        // enforcement_orders_permitted (bool)
        {
            this.enforcement_orders_permitted = bytes_1.read(buf, 'bool');
        }
        // voting_rights (bool)
        {
            this.voting_rights = bytes_1.read(buf, 'bool');
        }
        // vote_multiplier (uint8)
        {
            this.vote_multiplier = bytes_1.read(buf, 'uint8');
        }
        // administration_proposal (bool)
        {
            this.administration_proposal = bytes_1.read(buf, 'bool');
        }
        // holder_proposal (bool)
        {
            this.holder_proposal = bytes_1.read(buf, 'bool');
        }
        // asset_modification_governance (uint8)
        {
            this.asset_modification_governance = bytes_1.read(buf, 'uint8');
        }
        // token_qty (uint64)
        {
            this.token_qty = bytes_1.read(buf, 'uint64');
        }
        // asset_payload ([]byte)
        {
            this.asset_payload = bytes_1.ReadVarBin(buf, 16);
        }
        return b.length - buf.length;
    }
// write populates the fields in AssetDefinition from the byte slice
write populates the fields in AssetDefinition from the byte slice
write populates the fields in AssetDefinition from the byte slice
write(b) {
        const buf = new util_1.default.Reader(b);
        {
            this.asset_type = bytes_1.ReadFixedChar(buf, 3);
        }
        {
            this.asset_auth_flags = bytes_1.ReadVarBin(buf, 8);
        }
        {
            this.transfers_permitted = bytes_1.read(buf, 'bool');
        }
        {
            const size = bytes_1.ReadVariableSize(buf, 16, 8);
            const type = '[][3]byte'.slice(2);
            this.trade_restrictions = [...Array(size)].map(() => bytes_1.read(buf, type));
        }
        {
            this.enforcement_orders_permitted = bytes_1.read(buf, 'bool');
        }
        {
            this.voting_rights = bytes_1.read(buf, 'bool');
        }
        {
            this.vote_multiplier = bytes_1.read(buf, 'uint8');
        }
        {
            this.administration_proposal = bytes_1.read(buf, 'bool');
        }
        {
            this.holder_proposal = bytes_1.read(buf, 'bool');
        }
        {
            this.asset_modification_governance = bytes_1.read(buf, 'uint8');
        }
        {
            this.token_qty = bytes_1.read(buf, 'uint64');
        }
        {
            this.asset_payload = bytes_1.ReadVarBin(buf, 16);
        }
        return b.length - buf.length;
    }
write ( b ) { const buf = new util_1 . default . Reader ( b ) ; { this . asset_type = bytes_1 . ReadFixedChar ( buf , 3 ) ; } { this . asset_auth_flags = bytes_1 . ReadVarBin ( buf , 8 ) ; } { this . transfers_permitted = bytes_1 . read ( buf , 'bool' ) ; } { const size = bytes_1 . ReadVariableSize ( buf , 16 , 8 ) ; const type = '[][3]byte' . slice ( 2 ) ; this . trade_restrictions = [ ... Array ( size ) ] . map ( ( ) => bytes_1 . read ( buf , type ) ) ; } { this . enforcement_orders_permitted = bytes_1 . read ( buf , 'bool' ) ; } { this . voting_rights = bytes_1 . read ( buf , 'bool' ) ; } { this . vote_multiplier = bytes_1 . read ( buf , 'uint8' ) ; } { this . administration_proposal = bytes_1 . read ( buf , 'bool' ) ; } { this . holder_proposal = bytes_1 . read ( buf , 'bool' ) ; } { this . asset_modification_governance = bytes_1 . read ( buf , 'uint8' ) ; } { this . token_qty = bytes_1 . read ( buf , 'uint64' ) ; } { this . asset_payload = bytes_1 . ReadVarBin ( buf , 16 ) ; } return b . length - buf . length ; }
write populates the fields in AssetDefinition from the byte slice
write populates the fields in AssetDefinition from the byte slice
// asset_type (string) // asset_auth_flags ([]byte) // transfers_permitted (bool) // trade_restrictions ([][3]byte) // enforcement_orders_permitted (bool) // voting_rights (bool) // vote_multiplier (uint8) // administration_proposal (bool) // holder_proposal (bool) // asset_modification_governance (uint8) // token_qty (uint64) // asset_payload ([]byte)