API documentation

ModuleDescription
agora.api.Admin An API to control a node's behavior and perform useful administrative tasks
agora.api.FullNode Definitions of the full node API
agora.api.Handlers Definitions of the Handlers for pushing to Stoa
agora.api.Registry Definitions of the name registry API
agora.api.Validator Definitions of the validator API
agora.common.Amount Defines a monetary type used in the blockchain
agora.common.BanManager Contains code to support temporarily banning from communicating with specific addressses which may belong to badly-behaving nodes.
agora.common.BitMask This is an implementation of a bitmask that once initialized will have a fixed number of bits for holding true / false (1 / 0) values. It allocates the required number of ubytes in the constructor and does not allow reading or writing to bits beyond the fixed count which is set during construction. This type is created for use as the validators signing bitmask and any changes should ensure that it does not compromise that use.
agora.common.DNS Type definitions for implementing and communicating with a DNS server.
agora.common.Ensure Throw a statically allocated exception with formatting capacility.
agora.common.FileBasedLock Implements file based locking that can help synchronize processes
agora.common.ManagedDatabase Contains a managed wrapper around SQLite databases.
agora.common.Set Contains a simple Set implementation (wrapper around builtin hashmaps)
agora.common.Task Contains the base definition for the task manager
agora.common.Types Defines common types used by Agora
agora.common.VibeTask Contains a task manager backed by vibe.d's event loop.
agora.consensus.data.genesis.Coinnet Defines the genesis block used by the live network (CoinNet)
agora.consensus.data.genesis.Test Defines a genesis block suitable for testing purpose
agora.consensus.data.Block Defines the data structure of a block
agora.consensus.data.Enrollment Data definition for enrollment of validator
agora.consensus.data.genesis Contains primitives related to the genesis block
agora.consensus.data.Params The set for consensus-critical constants
agora.consensus.data.PreImageInfo Contains definition for the PreImageInfo struct, which is used to communicate new pre-image informations between nodes.
agora.consensus.data.Transaction Defines the data structure of a transaction
agora.consensus.data.UTXO Defines the UTXO transaction set struct, contains the UTXOFinder delegate
agora.consensus.data.ValidatorBlockSig Contains definition for the ValidatorBlockSig struct, which is used to communicate block signatures between nodes.
agora.consensus.data.ValidatorInfo Holds related informations about a validator.
agora.consensus.pool.Enrollment Contains supporting code for managing enrollments registered by nodes on the network to be a validator, which means the enrollment information needs to be confirmed on the consensus protocol to be a validator. The information is stored in a table of SQLite.
agora.consensus.pool.Transaction Contains a transaction pool that is serializable to disk, using SQLite as a backing store.
agora.consensus.protocol.Config Encapsulate utilities related to Quorum configuration
agora.consensus.protocol.Data Defines the data used when reaching consensus.
agora.consensus.protocol.EnvelopeStore Contains supporting code for storing the latest SCP envelopes, using SQLite as a backing store.
agora.consensus.protocol.Nominator Contains the SCP consensus driver implementation.
agora.consensus.state.Ledger The Ledger class binds together other components to provide a consistent view of the state of the node.
agora.consensus.state.UTXOCache Contains the base class for a UTXO set and an AA-backed UTXO set.
agora.consensus.state.UTXODB ManagedDatabase of UTXOs using SQLite as the backing store
agora.consensus.state.UTXOSet Contains a SQLite-backed UTXO set class.
agora.consensus.state.ValidatorSet Contains supporting code for managing validators' information using SQLite as a backing store, including the enrolled height which means enrollment process is confirmed as part of consensus.
agora.consensus.validation.Block Contains validation routines for blocks
agora.consensus.validation.Enrollment Contains validation routines for enrollments
agora.consensus.validation.PreImage Contains validation routines for pre-image
agora.consensus.validation.Transaction Contains validation routines for transactions
agora.consensus.BlockStorage Define the storage for blocks
agora.consensus.EnrollmentManager Manages this node's Enrollment, the ValidatorSet, and EnrollmentPool
agora.consensus.Fee Contains the function to calculate the fees and stores the results in a db.
agora.consensus.Ledger The Ledger class binds together other components to provide a consistent view of the state of the node.
agora.consensus.PreImage Hold pre-image related utilities
agora.consensus.Quorum Contains the quorum generator algorithm.
agora.consensus.Reward Contains functions to calculate the block reward.
agora.consensus.validation Contains validation routines for all data types required for consensus.
agora.crypto.Bech32 Utilities for converting between bech32-encoded string and ubyte array.
agora.crypto.Crc16 Package crc16 is implementation according to CCITT standards.
agora.crypto.Key Holds primitive types for key operations
agora.flash.api.FlashAPI Contains the Flash API.
agora.flash.api.FlashControlAPI Contains the user-facing API used to control the flash node, for example creating invoices and paying invoices.
agora.flash.api.FlashListenerAPI Contains the Flash API.
agora.flash.Channel Contains the Flash Channel definition.
agora.flash.Config Contains the flash Channel definition
agora.flash.ErrorCode Contains error codes for the Flash API.
agora.flash.Invoice Contains the invoice definition.
agora.flash.Network Contains in-memory representation of Lightning Network topology
agora.flash.Node Contains the Flash abstract node definition.
agora.flash.OnionPacket Contains the routing path encoding structure.
agora.flash.Route Contains the routing path encoding structure.
agora.flash.Scripts Contains all the Flash-layer scripting support.
agora.flash.Types Contains the common types used by the Flash node and the API, as well as some helper types.
agora.flash.UpdateSigner Contains the task which signs & shares the settlement & update transaction signatures for a given sequence ID.
agora.network.Client Contains code used to communicate with another remote node
agora.network.Clock Contains a network-synchronized Clock implementation.
agora.network.DNSResolver A client-side DNS resolver
agora.network.Manager Expose facilities used by the Node to communicate with the network
agora.network.RPC An RPC generator, similar to vibe.web.rest, but for efficient node-to-node communication.
agora.network.VibeManager A NetworkManager implementation based on Vibe.d
agora.node.admin.AdminInterface Provide a web-based administrative interface to the node
agora.node.admin.Setup Provide a web-based setup interface to the node (Talos)
agora.node.Config Define the configuration objects that are used through the node
agora.node.FullNode Implementation of the full node's API.
agora.node.main Entry point for the Agora node
agora.node.Registry Definitions of the name registry API implementation
agora.node.Runner Contains a function which instantiates either a FullNode or a Validator.
agora.node.TransactionRelayer TransactionRelayer is responsible for storing transactions, and relaying some of them to all known network clients periodically. The current implementation relays transactions with the highest fees.
agora.node.Validator Implementation of the Validator API.
agora.script.Engine Contains the script execution engine.
agora.script.Lock Contains the Lock / Unlock definitions
agora.script.Opcodes Contains the supported opcodes for the basic execution engine (non-webASM)
agora.script.ScopeCondition Keeps track of scopes and their conditions (TRUE or FALSE). This struct can be used to implement conditional (IF/ELSE/ENDIF) logic.
agora.script.Script Contains the script definition and syntactical opcode validation.
agora.script.Signature Contains the signature definitions and the challenge routine.
agora.script.Stack Contains a stack implementation for use with the script execution engine.
agora.stats.App Expose stats specific to the application, such as GC stats, or version.
agora.stats.Block Stats corresponding to blocks
agora.stats.Collector Contains methods that collect stats from primitive data members of structs or classes to respond to Prometheus queries with.
agora.stats.CollectorRegistry Contains a collection of prometheus stat collectors that acts as an interface between the response handler, and stat collectors from every individual metric and label set.
agora.stats.EndpointReq Stats corresponding to endpoint requests
agora.stats.Registry Stats corresponding to validators
agora.stats.Slot Stats corresponding to slots
agora.stats.StatFormatter Contains methods that format primitive data members from structs or classes into strings that can be exported as responses to prometheus queries.
agora.stats.Stats Base stats class that helps define other stats classes
agora.stats.Tx Stats corresponding to Transactions
agora.stats.Utils Utilities for stats support
agora.stats.Validator Stats corresponding to validators
agora.test.API Test the public API with invalid parameters
agora.test.BanManager Contains tests for banning of unreachable nodes or in situations where timeouts fail or time-out.
agora.test.Base Contains utilities to be used by tests to easily set up test environments
agora.test.BlockRewards Checks the rewards are correct in the payout blocks
agora.test.BlockTimeConsensus Tests the consensus algorithm on block time offset creation
agora.test.Byzantine Contains Byzantine node tests, which refuse to co-operate in the SCP consensus protocol in various ways.
agora.test.Crypto Contains extra tests for the crypto library
agora.test.DNS
agora.test.EmptyBlocks Contains the simplest empty block creating test
agora.test.EnrollDifferentUTXOs Contains networking tests with multiple enrollments with different UTXOs.
agora.test.EnrollmentManager Contains tests for the creation of an enrollment data, enrolling as a validator and propagating the information through the network
agora.test.Fee Contains tests for the fee distribution
agora.test.Flash Contains Flash layer tests.
agora.test.FutureEnrollment Contains tests for accepting "future" enrollments
agora.test.GenesisBlock Test whether genesis block has enrollment data and existing Genesis Transactions
agora.test.GossipProtocol Contains tests for Gossip Protocol.
agora.test.InvalidBlockSigByzantine Test that when a node signs the block with an invalid signature that it is not included in the block multisignature.
agora.test.Ledger Contains tests for the Block creation and adding blocks to the ledger, as well as the catch-up
agora.test.LocalTransactions Contains tests for network behaviour when nominated TXs are not known to every node
agora.test.LockHeight Tests for the transaction-level absolute time lock.
agora.test.ManyBlocks Testing generastion of many blocks with re-enrolling every cycle
agora.test.ManyValidators Contains networking tests with a variety of different validator node counts.
agora.test.MissingPreImageDetection Contains tests for the validators not revealing their pre-images.
agora.test.MultiRoundConsensus Tests for reaching consensus in multiple rounds instead of 1 round. In this test, we make nodes reject nominations for several rounds deliberately until one is accepted at a round R, where R could be arbitrarily high.
agora.test.NameRegistry Test for the NameRegistry functionality
agora.test.NetworkClient Contains tests for the functionality of the NetworkClient.
agora.test.NetworkDiscovery Contains tests for the node discovery behavior
agora.test.NetworkManager Contains tests for the tests & error-handling of the NetworkManager
agora.test.NominatingCatchup Check that the node does not break in the situation where a nomination and regenerating quorums are interleaved, especially when a block is externalized from periodic catchup.
agora.test.PeriodicCatchup Check that if the node does not externalize the block when triggered by SCP that it will fetch the block later during periodic catchup and then successfully externalize.
agora.test.PostTransactionResult Contains tests for the result of posting transactions which can be one of these status: Accepted, Duplicated, and Rejected`.
agora.test.PreImageNoFlood Test for the flood of the posting pre-images not happening
agora.test.PreimageSharing Contains tests for sharing preimages during SCP protocol run.
agora.test.Quorum Contains various quorum tests, adding and expiring enrollments, making a network with many validators, etc.
agora.test.QuorumPreimage Tests preimage quorum generation behavior.
agora.test.QuorumShuffle Tests regular quorum shuffling behavior.
agora.test.Restart Test node restarting behavior
agora.test.RestoreSCPState Tests restoring SCP Envelope state on restart
agora.test.RestoreSlashingInfo Contains tests for re-routing part of the frozen UTXO of a slashed validater to CommonsBudget address.
agora.test.Script Network tests for the execution engine scripts.
agora.test.Simple Contains the simplest possible block creating test
agora.test.SlashingMisbehavingValidator Contains tests for re-routing part of the frozen UTXO of a slashed validater to CommonsBudget address.
agora.test.TimeBlockInterval Tests behavior of ConsensusConfig.block_interval
agora.test.TimeDrift Tests consensus-reaching behavior when the nodes' clocks start to drift.
agora.test.Timeout Tests connection timeouts
agora.test.TransactionReplacement Tests the transaction replacement logic for double spend transactions.
agora.test.UnlockAge Tests for the input-level relative time lock.
agora.test.ValidatorCleanRestart Contains tests for general situations where validators participate in nominating a block and reaching consensus.
agora.test.ValidatorCount The creation of a block must stop immediately just before all the active validators is expired. This is to allow additional enrollment of validators. Enrollment's cycle is ConsensusParams.validator_cycle, If none of the active validators exist at height validator_cycle, block generation must stop at height validator_cycle-1.
agora.test.ValidatorRecurringEnrollment Ensures validators re-enroll at the end of their validator cycle when configured to do so
agora.test.VariableBlockSize Tests creating blocks of arbitrary transaction counts.
agora.utils.Backoff Contains a truncated exponential backoff algorithm for use with retrying code. Based on Amazon's FullJitter algorithm description on:
agora.utils.InetUtils Lower level utility functions for networking
agora.utils.Log Utilities to deal with logging
agora.utils.PrettyPrinter Defines method to format types to their human readable representation
agora.utils.SCPPrettyPrinter Contains pretty-printing routines specialized for SCP types.
agora.utils.Test Various utilities for testing purpose
agora.utils.TxBuilder An helper utility to build transactions
agora.utils.Utility Utility functions that cannot be put anywhere else
agora.utils.WellKnownKeys The list of well-known keypairs
agora.utils.Workarounds Workarounds for compiler / runtime / upstream issues
mmdb.MaxMindDB DLang bindings for MaxMindDB C library generated with jacob-carlborg/dstep.
scpd.quorum.QuorumIntersectionChecker Bindings for quorum/QuorumIntersectionChecker.h
scpd.quorum.QuorumTracker Bindings for quorum/QuorumTracker.h
scpd.scp.BallotProtocol Bindings for scp/BallotProtocol.h
scpd.scp.LocalNode Bindings for scp/LocalNode.h
scpd.scp.NominationProtocol Bindings for scp/NominationProtocol.h
scpd.scp.QuorumSetUtils Bindings for scp/QuorumSetUtils.h
scpd.scp.SCP Bindings for scp/SCP.h, the main class / entrypoint of the SCP protocol
scpd.scp.SCPDriver Bindings for scp/SCPDriver.h, the class to derive to implement the SCP protocol
scpd.scp.Slot Bindings for scp/Slot.h
scpd.scp.Utils Extra bindings for scp for D usage, and other SCP-specific symbols
scpd.tests.GlueTypes Contains types used for size & ABI object layout checks.
scpd.tests.LayoutTest Contains runtime field size & ABI object layout checks.
scpd.tests.SizeTest Contains runtime size checks for the structs.
scpd.types.Stellar_SCP Porting of Stellar's Stellar_SCP.h, itself derived from Stellar_SCP.x
scpd.types.Stellar_types Porting of Stellar's Stellar_types.h, itself derived from Stellar_types.x
scpd.types.Utils C++-side utilities for D code, such as wrapper for vector.push_back
scpd.types.XDRBase Binding to xdrpp types (the library)
scpd.Cpp Types currently missing from core.stdcpp and some additional utilities