serai/processor/bitcoin/src/db.rs

26 lines
536 B
Rust
Raw Normal View History

use ciphersuite::group::GroupEncoding;
2024-09-11 08:54:03 +00:00
use serai_client::validator_sets::primitives::Session;
use serai_db::{Get, DbTxn, create_db, db_channel};
use primitives::EncodableG;
2024-09-11 08:54:03 +00:00
create_db! {
Processor {
ExternalKeyForSessionForSigners: <K: GroupEncoding>(session: Session) -> EncodableG<K>,
}
}
db_channel! {
Processor {
KeyToActivate: <K: GroupEncoding>() -> EncodableG<K>
2024-09-11 08:54:03 +00:00
}
}
create_db! {
BitcoinProcessor {
LatestBlockToYieldAsFinalized: () -> u64,
ScriptPubKey: (tx: [u8; 32], vout: u32) -> Vec<u8>,
}
}