pub trait Network: 'static + Environment + Copy + Clone + Debug + Eq + PartialEq + Hash + Serialize + DeserializeOwned + for<'a> Deserialize<'a> + Send + Sync {
    type StateRoot: Bech32ID<Field<Self>>;
    type BlockHash: Bech32ID<Field<Self>>;
    type TransactionID: Bech32ID<Field<Self>>;
    type TransitionID: Bech32ID<Field<Self>>;
Show 21 associated constants and 43 methods const ID: u16; const NAME: &'static str; const EDITION: u16; const INCLUSION_FUNCTION_NAME: &'static str; const GENESIS_TIMESTAMP: i64 = 1_663_718_400i64; const GENESIS_COINBASE_TARGET: u64 = 1_023u64; const GENESIS_PROOF_TARGET: u64 = 8u64; const STARTING_SUPPLY: u64 = 1_100_000_000_000_000u64; const ANCHOR_TIME: u16 = 25u16; const COINBASE_PUZZLE_DEGREE: u32 = 8_191u32; const MAX_PROVER_SOLUTIONS: usize = 1_048_576usize; const NUM_BLOCKS_PER_EPOCH: u32 = 256u32; const MAX_DATA_DEPTH: usize = 32usize; const MAX_DATA_ENTRIES: usize = 32usize; const MAX_DATA_SIZE_IN_FIELDS: u32 = _; const MAX_FUNCTIONS: usize = 15usize; const MAX_OPERANDS: usize = Self::MAX_INPUTS; const MAX_INSTRUCTIONS: usize = 65_535usize; const MAX_COMMANDS: usize = 255usize; const MAX_INPUTS: usize = 8usize; const MAX_OUTPUTS: usize = 8usize; fn genesis_bytes() -> &'static [u8]Notable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]; fn get_credits_key_bytes(
        function_name: String
    ) -> Result<&'static (Vec<u8>, Vec<u8>)>; fn inclusion_proving_key_bytes() -> &'static Vec<u8>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn inclusion_verifying_key_bytes() -> &'static Vec<u8>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn inclusion_proving_key(
    ) -> &'static Arc<CircuitProvingKey<Self::PairingCurve, MarlinHidingMode>>; fn inclusion_verifying_key(
    ) -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve, MarlinHidingMode>>; fn g_powers() -> &'static Vec<Group<Self>>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn g_scalar_multiply(scalar: &Scalar<Self>) -> Group<Self>; fn marlin_fs_parameters() -> &'static FiatShamirParameters<Self>; fn bcm_domain() -> Field<Self>; fn encryption_domain() -> Field<Self>; fn graph_key_domain() -> Field<Self>; fn randomizer_domain() -> Field<Self>; fn r_bcm_domain() -> Field<Self>; fn serial_number_domain() -> Field<Self>; fn commit_bhp256(
        input: &[bool],
        randomizer: &Scalar<Self>
    ) -> Result<Field<Self>>; fn commit_bhp512(
        input: &[bool],
        randomizer: &Scalar<Self>
    ) -> Result<Field<Self>>; fn commit_bhp768(
        input: &[bool],
        randomizer: &Scalar<Self>
    ) -> Result<Field<Self>>; fn commit_bhp1024(
        input: &[bool],
        randomizer: &Scalar<Self>
    ) -> Result<Field<Self>>; fn commit_ped64(
        input: &[bool],
        randomizer: &Scalar<Self>
    ) -> Result<Group<Self>>; fn commit_ped128(
        input: &[bool],
        randomizer: &Scalar<Self>
    ) -> Result<Group<Self>>; fn hash_bhp256(input: &[bool]) -> Result<Field<Self>>; fn hash_bhp512(input: &[bool]) -> Result<Field<Self>>; fn hash_bhp768(input: &[bool]) -> Result<Field<Self>>; fn hash_bhp1024(input: &[bool]) -> Result<Field<Self>>; fn hash_ped64(input: &[bool]) -> Result<Field<Self>>; fn hash_ped128(input: &[bool]) -> Result<Field<Self>>; fn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>>; fn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>>; fn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>>; fn hash_many_psd2(
        input: &[Field<Self>],
        num_outputs: u16
    ) -> Vec<Field<Self>>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn hash_many_psd4(
        input: &[Field<Self>],
        num_outputs: u16
    ) -> Vec<Field<Self>>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn hash_many_psd8(
        input: &[Field<Self>],
        num_outputs: u16
    ) -> Vec<Field<Self>>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>>; fn hash_to_group_psd4(input: &[Field<Self>]) -> Result<Group<Self>>; fn hash_to_group_psd8(input: &[Field<Self>]) -> Result<Group<Self>>; fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Result<Scalar<Self>>; fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Result<Scalar<Self>>; fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Result<Scalar<Self>>; fn merkle_tree_bhp<const DEPTH: u8>(
        leaves: &[Vec<bool>]
    ) -> Result<BHPMerkleTree<Self, DEPTH>>; fn merkle_tree_psd<const DEPTH: u8>(
        leaves: &[Vec<Field<Self>>]
    ) -> Result<PoseidonMerkleTree<Self, DEPTH>>; fn verify_merkle_path_bhp<const DEPTH: u8>(
        path: &MerklePath<Self, DEPTH>,
        root: &Field<Self>,
        leaf: &Vec<bool>
    ) -> bool; fn verify_merkle_path_psd<const DEPTH: u8>(
        path: &MerklePath<Self, DEPTH>,
        root: &Field<Self>,
        leaf: &Vec<Field<Self>>
    ) -> bool;
}

Required Associated Types

The state root type.

The block hash type.

The transaction ID type.

The transition ID type.

Required Associated Constants

The network ID.

The network name.

The network edition.

The function name for the inclusion circuit.

Provided Associated Constants

The fixed timestamp of the genesis block.

The genesis block coinbase target.

The genesis block proof target.

The starting supply of Aleo credits.

The anchor time per block in seconds, which must be greater than the round time per block.

The coinbase puzzle degree.

The maximum number of prover solutions that can be included per block.

The number of blocks per epoch (1 hour).

The maximum recursive depth of a value and/or entry. Note: This value must be strictly less than u8::MAX.

The maximum number of values and/or entries in data.

The maximum number of fields in data (must not exceed u16::MAX).

The maximum number of functions in a program.

The maximum number of operands in an instruction.

The maximum number of instructions in a closure or function.

The maximum number of commands in finalize.

The maximum number of inputs per transition.

The maximum number of outputs per transition.

Required Methods

Returns the genesis block bytes.

Returns the (proving key, verifying key) bytes for the given function name in credits.aleo.

Returns the proving key bytes for the inclusion circuit.

Returns the verifying key bytes for the inclusion circuit.

Returns the proving key for the inclusion circuit.

Returns the verifying key for the inclusion circuit.

Returns the powers of G.

Returns the scalar multiplication on the generator G.

Returns the sponge parameters for Marlin.

Returns the balance commitment domain as a constant field element.

Returns the encryption domain as a constant field element.

Returns the graph key domain as a constant field element.

Returns the randomizer domain as a constant field element.

Returns the balance commitment randomizer domain as a constant field element.

Returns the serial number domain as a constant field element.

Returns a BHP commitment with an input hasher of 256-bits.

Returns a BHP commitment with an input hasher of 512-bits.

Returns a BHP commitment with an input hasher of 768-bits.

Returns a BHP commitment with an input hasher of 1024-bits.

Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.

Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.

Returns the BHP hash with an input hasher of 256-bits.

Returns the BHP hash with an input hasher of 512-bits.

Returns the BHP hash with an input hasher of 768-bits.

Returns the BHP hash with an input hasher of 1024-bits.

Returns the Pedersen hash for a given (up to) 64-bit input.

Returns the Pedersen hash for a given (up to) 128-bit input.

Returns the Poseidon hash with an input rate of 2.

Returns the Poseidon hash with an input rate of 4.

Returns the Poseidon hash with an input rate of 8.

Returns the extended Poseidon hash with an input rate of 2.

Returns the extended Poseidon hash with an input rate of 4.

Returns the extended Poseidon hash with an input rate of 8.

Returns the Poseidon hash with an input rate of 2 on the affine curve.

Returns the Poseidon hash with an input rate of 4 on the affine curve.

Returns the Poseidon hash with an input rate of 8 on the affine curve.

Returns the Poseidon hash with an input rate of 2 on the scalar field.

Returns the Poseidon hash with an input rate of 4 on the scalar field.

Returns the Poseidon hash with an input rate of 8 on the scalar field.

Returns a Merkle tree with a BHP leaf hasher of 1024-bits and a BHP path hasher of 512-bits.

Returns a Merkle tree with a Poseidon leaf hasher with input rate of 4 and a Poseidon path hasher with input rate of 2.

Returns true if the given Merkle path is valid for the given root and leaf.

Returns true if the given Merkle path is valid for the given root and leaf.

Implementors