Serialize() {
        const buf = new util_1.default.Writer();
        // Version (uint8)
        {
            bytes_1.write(buf, this.version, 'uint8');
        }
        // OutputDescription (string)
        {
            bytes_1.WriteVarChar(buf, this.output_description, 32);
        }
        // Tags ([]uint8)
        {
            // IsNativeTypeArray []uint8
            const type = '[]uint8'.slice(2);
            bytes_1.WriteVariableSize(buf, this.tags.length, 8, 8);
            this.tags.forEach(value => {
                bytes_1.write(buf, value, type); // TODO
            });
        }
        // CustomTags ([]OutputTag)
        {
            bytes_1.WriteVariableSize(buf, this.custom_tags.length, 8, 8);
            this.custom_tags.forEach((value) => {
                buf.write(value.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.write(buf, this.version, 'uint8');
        }
        {
            bytes_1.WriteVarChar(buf, this.output_description, 32);
        }
        {
            const type = '[]uint8'.slice(2);
            bytes_1.WriteVariableSize(buf, this.tags.length, 8, 8);
            this.tags.forEach(value => {
                bytes_1.write(buf, value, type); 
            });
        }
        {
            bytes_1.WriteVariableSize(buf, this.custom_tags.length, 8, 8);
            this.custom_tags.forEach((value) => {
                buf.write(value.Serialize());
            });
        }
        return buf.buf;
    }
Serialize ( ) { const buf = new util_1 . default . Writer ( ) ; { bytes_1 . write ( buf , this . version , 'uint8' ) ; } { bytes_1 . WriteVarChar ( buf , this . output_description , 32 ) ; } { const type = '[]uint8' . slice ( 2 ) ; bytes_1 . WriteVariableSize ( buf , this . tags . length , 8 , 8 ) ; this . tags . forEach ( value => { bytes_1 . write ( buf , value , type ) ; } ) ; } { bytes_1 . WriteVariableSize ( buf , this . custom_tags . length , 8 , 8 ) ; this . custom_tags . forEach ( ( value ) => { buf . write ( value . Serialize ( ) ) ; } ) ; } return buf . buf ; }
Serialize returns the full OP_RETURN payload bytes.
Serialize returns the full OP_RETURN payload bytes .
// Version (uint8) // OutputDescription (string) // Tags ([]uint8) // IsNativeTypeArray []uint8 // TODO // CustomTags ([]OutputTag)