alephium-web3 2.0.7

A Rust library to interact with the Alephium platform
Documentation
// Copyright 2018 - 2022 The Alephium Authors
// This file is part of the alephium project.

/// Total number of groups in the Alephium network
pub const TOTAL_NUMBER_OF_GROUPS: u8 = 4;

/// Number of groups per shard
pub const GROUPS_PER_SHARD: u8 = 4;

/// Zero address constant (used for contract creation)
pub const ZERO_ADDRESS: &str = "tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq";

/// Mainnet network ID
pub const MAINNET_NETWORK_ID: u8 = 0;

/// Testnet network ID  
pub const TESTNET_NETWORK_ID: u8 = 1;

/// Devnet network ID
pub const DEVNET_NETWORK_ID: u8 = 4;

/// Default dust amount (minimum ALPH amount)
pub const DUST_AMOUNT: u64 = 1_000_000_000_000; // 0.001 ALPH

/// Number of decimals for ALPH token
pub const ALPH_TOKEN_DECIMALS: u8 = 18;

/// One ALPH in the smallest unit
pub const ONE_ALPH: u128 = 1_000_000_000_000_000_000; // 10^18

/// Default gas amount for transactions
pub const DEFAULT_GAS_AMOUNT: u64 = 20_000;

/// Default gas price
pub const DEFAULT_GAS_PRICE: u64 = 100_000_000_000; // 100 Gwei

/// Maximum transaction size in bytes
pub const MAX_TX_SIZE: usize = 256 * 1024; // 256 KB

/// Coinbase maturity (number of blocks)
pub const COINBASE_MATURITY: u32 = 500;

/// Block target time in milliseconds
pub const BLOCK_TARGET_TIME: u64 = 64_000; // 64 seconds

/// Public key hash size
pub const PUBLIC_KEY_HASH_SIZE: usize = 32;

/// Public key size (uncompressed)
pub const PUBLIC_KEY_SIZE: usize = 33;

/// Signature size
pub const SIGNATURE_SIZE: usize = 65;

/// Hash size (Blake2b)
pub const HASH_SIZE: usize = 32;

/// Contract ID size
pub const CONTRACT_ID_SIZE: usize = 32;

/// Transaction ID size
pub const TX_ID_SIZE: usize = 32;

/// Block hash size
pub const BLOCK_HASH_SIZE: usize = 32;