import { DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF } from "@lodestar/params";
import { SignatureSetType, computeSigningRoot, } from "@lodestar/state-transition";
import { ssz } from "@lodestar/types";
export function getSyncCommitteeSelectionProofSignatureSet(config, state, contributionAndProof) {
    const slot = contributionAndProof.contribution.slot;
    const domain = config.getDomain(state.slot, DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF, slot);
    const signingData = {
        slot,
        subcommitteeIndex: contributionAndProof.contribution.subcommitteeIndex,
    };
    return {
        type: SignatureSetType.indexed,
        index: contributionAndProof.aggregatorIndex,
        signingRoot: computeSigningRoot(ssz.altair.SyncAggregatorSelectionData, signingData, domain),
        signature: contributionAndProof.selectionProof,
    };
}
//# sourceMappingURL=syncCommitteeSelectionProof.js.map