diff --git a/beacon_chain/rpc/validator_api.nim b/beacon_chain/rpc/validator_api.nim index 4c682ee27..440164537 100644 --- a/beacon_chain/rpc/validator_api.nim +++ b/beacon_chain/rpc/validator_api.nim @@ -117,3 +117,12 @@ proc installValidatorApiHandlers*(rpcServer: RpcServer, node: BeaconNode) = validator_pubkey: ValidatorPubKey, slot_signature: ValidatorSig) -> bool: debug "post_v1_validator_beacon_committee_subscriptions" raise newException(CatchableError, "Not implemented") + + rpcServer.rpc("get_v1_validator_attestation_data") do ( + slot: uint64, committee_index: uint64) -> AttestationData: + let ares = node.attestationPool[].getAggregatedAttestation(slot, + committee_index) + if ares.isSome(): + return ares.get().data + else: + raise newException(CatchableError, "Could not create attestation data!")