#![cfg_attr(not(feature = "std"), no_std)]
mod apis;
pub mod constants;
pub mod entities;
pub mod fees;
pub mod handlers;
mod pallets_config;
pub mod providers;
pub mod weights;
pub use pallet_duniter_account::GenesisAccountData;
pub use pallet_identity::{GenesisIdty, IdtyName, IdtyStatus, IdtyValue};
pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
pub type Balance = u64;
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
pub type BlockId = sp_runtime::generic::BlockId<Block>;
pub type BlockNumber = u32;
pub type Hash = sp_core::H256;
pub type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
pub type Index = u32;
pub type Signature = sp_runtime::MultiSignature;
pub type IdtyIndex = u32;
pub type Moment = u64;
pub struct FullIdentificationOfImpl;
impl sp_runtime::traits::Convert<AccountId, Option<entities::ValidatorFullIdentification>>
for FullIdentificationOfImpl
{
fn convert(_: AccountId) -> Option<entities::ValidatorFullIdentification> {
Some(entities::ValidatorFullIdentification)
}
}
pub struct GetCurrentEpochIndex<Runtime>(core::marker::PhantomData<Runtime>);
impl<Runtime: pallet_babe::Config> frame_support::pallet_prelude::Get<u64>
for GetCurrentEpochIndex<Runtime>
{
fn get() -> u64 {
pallet_babe::Pallet::<Runtime>::epoch_index()
}
}
pub struct IdtyNameValidatorImpl;
impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorImpl {
fn validate(idty_name: &pallet_identity::IdtyName) -> bool {
duniter_primitives::validate_idty_name(&idty_name.0)
}
}