pub trait HopPromoter:
Send
+ Sync
+ 'static {
// Required methods
fn promote(
&self,
data: Vec<u8>,
signer: MultiSigner,
signature: MultiSignature,
submit_timestamp: u64,
) -> Result<(), Box<dyn Error + Send + Sync>>;
fn is_promoted_on_chain(
&self,
hash: &[u8; 32],
) -> Result<bool, Box<dyn Error + Send + Sync>>;
}Expand description
Trait for promoting HOP data to permanent on-chain storage.
Implemented as a trait object so that HopMaintenanceTask is not generic
over runtime-specific types. The concrete implementation
(RuntimeApiPromoter) uses the HopRuntimeApi runtime API.
Required Methods§
Sourcefn promote(
&self,
data: Vec<u8>,
signer: MultiSigner,
signature: MultiSignature,
submit_timestamp: u64,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn promote( &self, data: Vec<u8>, signer: MultiSigner, signature: MultiSignature, submit_timestamp: u64, ) -> Result<(), Box<dyn Error + Send + Sync>>
Promote a blob of HOP data to permanent on-chain storage.
signer, signature, and submit_timestamp are the user’s hop_submit-time
MultiSigner, signature, and wall-clock timestamp (ms since unix epoch),
carried into the unsigned promotion extrinsic so the runtime pallet can
verify consent on-chain and bound the signature’s validity window.