2020-03-16 22:28:54 +00:00
import
2020-05-22 17:04:52 +00:00
# Standard library
2020-03-16 22:28:54 +00:00
options ,
2020-05-22 17:04:52 +00:00
# Local modules
.. / [ datatypes , digest , crypto ] ,
json_rpc / jsonmarshal ,
2020-06-19 09:21:17 +00:00
callsigs_types
2020-03-16 22:28:54 +00:00
2020-06-19 09:21:17 +00:00
# calls that return a bool are actually without a return type in the main REST API
# spec but nim-json-rpc requires that all RPC calls have a return type.
2020-05-27 17:06:28 +00:00
2020-06-29 17:30:19 +00:00
proc get_v1_validator_block ( slot : Slot , graffiti : GraffitiBytes , randao_reveal : ValidatorSig ) : BeaconBlock
2020-06-05 09:57:40 +00:00
2020-07-08 10:11:22 +00:00
proc post_v1_validator_block ( body : SignedBeaconBlock ) : bool
2020-03-16 22:28:54 +00:00
2020-07-08 10:11:22 +00:00
proc get_v1_validator_attestation ( slot : Slot , committee_index : CommitteeIndex ) : AttestationData
2020-03-16 22:28:54 +00:00
2020-06-10 10:30:57 +00:00
# TODO at the time of writing (10.06.2020) the API specifies this call to have a hash of
# the attestation data instead of the object itself but we also need the slot.. see here:
# https://docs.google.com/spreadsheets/d/1kVIx6GvzVLwNYbcd-Fj8YUlPf4qGrWUlS35uaTnIAVg/edit?disco=AAAAGh7r_fQ
2020-07-08 10:11:22 +00:00
proc get_v1_validator_aggregate_and_proof ( attestation_data : AttestationData ) : Attestation
2020-03-16 22:28:54 +00:00
2020-06-05 09:57:40 +00:00
proc post_v1_validator_aggregate_and_proof ( payload : SignedAggregateAndProof ) : bool
2020-03-16 22:28:54 +00:00
2020-06-05 09:57:40 +00:00
# this is a POST instead of a GET because of this: https://docs.google.com/spreadsheets/d/1kVIx6GvzVLwNYbcd-Fj8YUlPf4qGrWUlS35uaTnIAVg/edit?disco=AAAAJk5rbKA
2020-06-19 09:21:17 +00:00
# TODO epoch is part of the REST path
2020-05-22 17:04:52 +00:00
proc post_v1_validator_duties_attester ( epoch : Epoch , public_keys : seq [ ValidatorPubKey ] ) : seq [ AttesterDuties ]
2020-03-16 22:28:54 +00:00
2020-06-19 09:21:17 +00:00
# TODO epoch is part of the REST path
2020-05-22 17:04:52 +00:00
proc get_v1_validator_duties_proposer ( epoch : Epoch ) : seq [ ValidatorPubkeySlotPair ]
2020-06-19 09:21:17 +00:00
proc post_v1_validator_beacon_committee_subscriptions ( committee_index : CommitteeIndex ,
slot : Slot ,
aggregator : bool ,
validator_pubkey : ValidatorPubKey ,
slot_signature : ValidatorSig ) : bool