static ReadAuthFlags(authFlags, fields, votingSystems) {
        const stream = new BitReader(Buffer.from(authFlags));
        const result = [...Array(fields)]
            .map(() => {
            const permission = new Permission();
            // Permitted
            permission.permitted = stream.read();
            // AdministrationProposal
            permission.administration_proposal = stream.read();
            // HolderProposal
            permission.holder_proposal = stream.read();
            // Voting Systems
            if (permission.administration_proposal || permission.holder_proposal) {
                permission.voting_systems_allowed = [...Array(votingSystems)]
                    .map(() => stream.read());
            }
            return permission;
        });
        if (!stream.eof) {
            throw new Error('Bytes remaining');
        }
        return result;
    }
// ReadAuthFlags reads raw auth flag data into an array of permission structs.
ReadAuthFlags reads raw auth flag data into an array of permission structs.
ReadAuthFlags reads raw auth flag data into an array of permission structs .
static ReadAuthFlags(authFlags, fields, votingSystems) {
        const stream = new BitReader(Buffer.from(authFlags));
        const result = [...Array(fields)]
            .map(() => {
            const permission = new Permission();
            permission.permitted = stream.read();
            permission.administration_proposal = stream.read();
            permission.holder_proposal = stream.read();
            if (permission.administration_proposal || permission.holder_proposal) {
                permission.voting_systems_allowed = [...Array(votingSystems)]
                    .map(() => stream.read());
            }
            return permission;
        });
        if (!stream.eof) {
            throw new Error('Bytes remaining');
        }
        return result;
    }
static ReadAuthFlags ( authFlags , fields , votingSystems ) { const stream = new BitReader ( Buffer . from ( authFlags ) ) ; const result = [ ... Array ( fields ) ] . map ( ( ) => { const permission = new Permission ( ) ; permission . permitted = stream . read ( ) ; permission . administration_proposal = stream . read ( ) ; permission . holder_proposal = stream . read ( ) ; if ( permission . administration_proposal || permission . holder_proposal ) { permission . voting_systems_allowed = [ ... Array ( votingSystems ) ] . map ( ( ) => stream . read ( ) ) ; } return permission ; } ) ; if ( ! stream . eof ) { throw new Error ( 'Bytes remaining' ) ; } return result ; }
ReadAuthFlags reads raw auth flag data into an array of permission structs.
ReadAuthFlags reads raw auth flag data into an array of permission structs .
// Permitted // AdministrationProposal // HolderProposal // Voting Systems