Serialize() {
        const buf = new util_1.default.Writer();
        // asset_type (string)
        {
            bytes_1.WriteFixedChar(buf, this.asset_type, 3);
        }
        // asset_code (AssetCode)
        {
            buf.write(this.asset_code.Serialize());
        }
        // asset_index (uint64)
        {
            bytes_1.write(buf, this.asset_index, 'uint64');
        }
        // asset_auth_flags ([]byte)
        {
            bytes_1.WriteVarBin(buf, this.asset_auth_flags, 8);
        }
        // transfers_permitted (bool)
        {
            bytes_1.write(buf, this.transfers_permitted, 'bool');
        }
        // trade_restrictions ([][3]byte)
        {
            // IsNativeTypeArray [][3]byte
            const type = '[][3]byte'.slice(2);
            bytes_1.WriteVariableSize(buf, this.trade_restrictions.length, 16, 8);
            this.trade_restrictions.forEach(value => {
                bytes_1.write(buf, value, type); // TODO
            });
        }
        // enforcement_orders_permitted (bool)
        {
            bytes_1.write(buf, this.enforcement_orders_permitted, 'bool');
        }
        // voting_rights (bool)
        {
            bytes_1.write(buf, this.voting_rights, 'bool');
        }
        // vote_multiplier (uint8)
        {
            bytes_1.write(buf, this.vote_multiplier, 'uint8');
        }
        // administration_proposal (bool)
        {
            bytes_1.write(buf, this.administration_proposal, 'bool');
        }
        // holder_proposal (bool)
        {
            bytes_1.write(buf, this.holder_proposal, 'bool');
        }
        // asset_modification_governance (uint8)
        {
            bytes_1.write(buf, this.asset_modification_governance, 'uint8');
        }
        // token_qty (uint64)
        {
            bytes_1.write(buf, this.token_qty, 'uint64');
        }
        // asset_payload ([]byte)
        {
            bytes_1.WriteVarBin(buf, this.asset_payload, 16);
        }
        // asset_revision (uint32)
        {
            bytes_1.write(buf, this.asset_revision, 'uint32');
        }
        // timestamp (Timestamp)
        {
            buf.write(this.timestamp.Serialize());
        }
        return buf.buf;
    }
// serialize returns the full OP_RETURN payload bytes.
serialize returns the full OP_RETURN payload bytes.
serialize returns the full OP_RETURN payload bytes .
Serialize() {
        const buf = new util_1.default.Writer();
        {
            bytes_1.WriteFixedChar(buf, this.asset_type, 3);
        }
        {
            buf.write(this.asset_code.Serialize());
        }
        {
            bytes_1.write(buf, this.asset_index, 'uint64');
        }
        {
            bytes_1.WriteVarBin(buf, this.asset_auth_flags, 8);
        }
        {
            bytes_1.write(buf, this.transfers_permitted, 'bool');
        }
        {
            const type = '[][3]byte'.slice(2);
            bytes_1.WriteVariableSize(buf, this.trade_restrictions.length, 16, 8);
            this.trade_restrictions.forEach(value => {
                bytes_1.write(buf, value, type); 
            });
        }
        {
            bytes_1.write(buf, this.enforcement_orders_permitted, 'bool');
        }
        {
            bytes_1.write(buf, this.voting_rights, 'bool');
        }
        {
            bytes_1.write(buf, this.vote_multiplier, 'uint8');
        }
        {
            bytes_1.write(buf, this.administration_proposal, 'bool');
        }
        {
            bytes_1.write(buf, this.holder_proposal, 'bool');
        }
        {
            bytes_1.write(buf, this.asset_modification_governance, 'uint8');
        }
        {
            bytes_1.write(buf, this.token_qty, 'uint64');
        }
        {
            bytes_1.WriteVarBin(buf, this.asset_payload, 16);
        }
        {
            bytes_1.write(buf, this.asset_revision, 'uint32');
        }
        {
            buf.write(this.timestamp.Serialize());
        }
        return buf.buf;
    }
Serialize ( ) { const buf = new util_1 . default . Writer ( ) ; { bytes_1 . WriteFixedChar ( buf , this . asset_type , 3 ) ; } { buf . write ( this . asset_code . Serialize ( ) ) ; } { bytes_1 . write ( buf , this . asset_index , 'uint64' ) ; } { bytes_1 . WriteVarBin ( buf , this . asset_auth_flags , 8 ) ; } { bytes_1 . write ( buf , this . transfers_permitted , 'bool' ) ; } { const type = '[][3]byte' . slice ( 2 ) ; bytes_1 . WriteVariableSize ( buf , this . trade_restrictions . length , 16 , 8 ) ; this . trade_restrictions . forEach ( value => { bytes_1 . write ( buf , value , type ) ; } ) ; } { bytes_1 . write ( buf , this . enforcement_orders_permitted , 'bool' ) ; } { bytes_1 . write ( buf , this . voting_rights , 'bool' ) ; } { bytes_1 . write ( buf , this . vote_multiplier , 'uint8' ) ; } { bytes_1 . write ( buf , this . administration_proposal , 'bool' ) ; } { bytes_1 . write ( buf , this . holder_proposal , 'bool' ) ; } { bytes_1 . write ( buf , this . asset_modification_governance , 'uint8' ) ; } { bytes_1 . write ( buf , this . token_qty , 'uint64' ) ; } { bytes_1 . WriteVarBin ( buf , this . asset_payload , 16 ) ; } { bytes_1 . write ( buf , this . asset_revision , 'uint32' ) ; } { buf . write ( this . timestamp . Serialize ( ) ) ; } return buf . buf ; }
serialize returns the full OP_RETURN payload bytes.
serialize returns the full OP_RETURN payload bytes .
// asset_type (string) // asset_code (AssetCode) // asset_index (uint64) // asset_auth_flags ([]byte) // transfers_permitted (bool) // trade_restrictions ([][3]byte) // IsNativeTypeArray [][3]byte // TODO // 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) // asset_revision (uint32) // timestamp (Timestamp)