mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 23:51:05 +00:00
Refactor primitives.
This commit is contained in:
@@ -43,7 +43,7 @@ extern crate uint as uint_crate;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
extern crate core;
|
||||
extern crate polkadot_runtime_codec as codec;
|
||||
extern crate polkadot_codec as codec;
|
||||
#[cfg(test)]
|
||||
extern crate polkadot_serializer;
|
||||
#[cfg(test)]
|
||||
@@ -80,38 +80,7 @@ mod tests;
|
||||
pub mod hashing;
|
||||
|
||||
pub use self::hash::{H160, H256};
|
||||
pub use self::relay::BlockNumber;
|
||||
pub use self::uint::{U256, U512};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
pub use hashing::{blake2_256, twox_128, twox_256};
|
||||
|
||||
/// Virtual account ID that represents the idea of a dispatch/statement being signed by everybody
|
||||
/// (who matters). Essentially this means that a majority of validators have decided it is
|
||||
/// "correct".
|
||||
pub const EVERYBODY: AccountId = [255u8; 32];
|
||||
|
||||
/// Alias to Ed25519 pubkey that identifies an account.
|
||||
pub type AccountId = [u8; 32];
|
||||
|
||||
/// The Ed25519 pub key of an session that belongs to an authority. This is used as what the
|
||||
/// external environment/consensus algorithm calls an "authority".
|
||||
pub type SessionKey = AccountId;
|
||||
|
||||
/// Indentifier for a chain.
|
||||
pub type ChainID = u64;
|
||||
|
||||
/// Index of a transaction.
|
||||
pub type TxOrder = u64;
|
||||
|
||||
/// A hash of some data.
|
||||
pub type Hash = hash::H256;
|
||||
|
||||
/// Alias to 520-bit hash when used in the context of a signature.
|
||||
pub type Signature = hash::H512;
|
||||
|
||||
/// A balance in the staking subsystem.
|
||||
pub type Balance = u64;
|
||||
|
||||
/// A timestamp.
|
||||
pub type Timestamp = u64;
|
||||
|
||||
Reference in New Issue
Block a user