{
+ pub fn unchecked(author_pub: Pub, slot: Slot) -> Self
+ where
+ P: Pair,
+ P::Public: Codec,
+ P::Signature: Codec,
+ {
+ SlotClaim {
+ author_pub: author_pub.clone(),
+ pre_digest: pre_digest_data::(slot, author_pub),
+ }
+ }
+
+ /// Get the author's public key.
+ pub fn author_pub(&self) -> &Pub {
+ &self.author_pub
+ }
+
+ /// Get the pre-digest.
+ pub fn pre_digest(&self) -> &Vec {
+ &self.pre_digest
+ }
+}
+
+/// Attempt to claim a slot locally.
+pub fn tanssi_claim_slot(
+ authorities: Vec>,
+ slot: Slot,
+ force_authoring: bool,
+ keystore: &KeystorePtr,
+) -> Result