Skip to content

sgns

Namespaces

Name
sgns::ipfs_pubsub
sgns::crdt
sgns::api
sgns::application
sgns::base
sgns::version
sgns::blockchain
sgns::crypto
sgns::primitives
sgns::processing
sgns::sgprocessing
sgns::runtime
sgns::storage
sgns::scale
sgns::face
sgns::subscription
sgns::evmwatcher
sgns::watcher
sgns::filesystem
sgns::sgprocmanager
sgns::sgprocmanagersha

Classes

Name
class sgns::AccountMessenger
class sgns::EscrowReleaseTransaction
Represents a transaction used to release funds from an escrow.
class sgns::EscrowTransaction
class sgns::GeniusAccount
class sgns::GeniusNode
class sgns::GeniusUTXO
class sgns::IGeniusTransactions
class sgns::IMigrationStep
Interface for a migration step between two schema versions.
class sgns::Migration0_2_0To1_0_0
Migration step for version 0.2.0 to 1.0.0.
class sgns::Migration1_0_0To3_4_0
Migration step for version 1.0.0 to 3.4.0. Changes the full node topic from CRDT heads.
class sgns::Migration3_4_0To3_5_0
Migration step for version 1.0.0 to 3.4.0. Changes the full node topic from CRDT heads.
class sgns::Migration3_5_0To3_5_1
class sgns::Migration3_5_1To3_6_0
class sgns::MigrationManager
Executes a sequence of migration steps to update a CRDT store.
class sgns::MintTransaction
class sgns::ProcessingTransaction
class sgns::TokenAmount
Utility for GNUS token fixed-point parsing, formatting and cost calculation.
class sgns::TokenID
class sgns::TransactionManager
class sgns::TransferTransaction
Transaction for transferring funds between UTXO inputs and outputs.
class sgns::UTXOManager
struct sgns::InputUTXOInfo
Raw UTXO input data for a transaction.
struct sgns::OutputDestInfo
Single output entry.
class sgns::ScaledInteger
Represents a decimal value using an integer scaled by 10^precision.
struct sgns::is_shared_ptr
struct sgns::is_shared_ptr< std::shared_ptr< T > >
struct sgns::is_unique_ptr
struct sgns::is_unique_ptr< std::unique_ptr< T > >
struct sgns::is_smart_ptr
struct sgns::is_smart_ptr< std::unique_ptr< T > >
struct sgns::is_smart_ptr< std::shared_ptr< T > >
struct sgns::Unused
struct sgns::lambda_visitor
struct sgns::lambda_visitor< Lambda, Lambdas... >
struct sgns::lambda_visitor< Lambda >
class sgns::Blockchain
class sgns::CoinGeckoPriceRetriever
class sgns::AndroidSecureStorage
class sgns::AppleSecureStorage
class sgns::JSONSecureStorage
class sgns::JSONBackend
class sgns::LinuxSecureStorage
class sgns::WindowsSecureStorage
class sgns::ISecureStorage
class sgns::GeniusAssigner
class sgns::GeniusProver
Prover class of SuperGenius.
class sgns::IBasicProof
Base proof class header file.
class sgns::NilFileHelper
class sgns::ProcessingProof
A class for generating and verifying processing proofs.
class sgns::RecursiveTransferProof
A class for generating a recursive Transfer Proof.
class sgns::TransferProof
A class for generating and verifying transfer proofs.
class sgns::AppDelegate
App delegate for the SuperGenius daemon node.
class sgns::error_cli_messages
Error message formatter for CLI errors.
class sgns::message_header
class sgns::message
class sgns::message_parser
class sgns::keepalive
class sgns::publish
class sgns::confirm_req
class sgns::confirm_ack
class sgns::frontier_req
class sgns::telemetry_data
class sgns::telemetry_req
class sgns::telemetry_ack
class sgns::bulk_pull
class sgns::bulk_pull_account
class sgns::bulk_push
class sgns::node_id_handshake
class sgns::message_visitor
class sgns::telemetry_cache_cutoffs
class sgns::daemon_config
class sgns::ipfs_lite_store
class sgns::logging
class sgns::network
class sgns::node
class sgns::inactive_node
class sgns::node_config
class sgns::node_flags
class sgns::node_rpc_config
class sgns::wallet_store
class sgns::wallet
class sgns::wallets
class sgns::ApiServiceFactory
class sgns::AuthorityManagerFactory
class sgns::BlockBuilderManager
class sgns::BlockStorageFactory
class sgns::ChainApiFactory
class sgns::ED25519KeyPairFactory
class sgns::ED25519ProviderFactory
class sgns::EnvironmentFactory
class sgns::FinalityFactory
class sgns::JRpcProcessorFactory
class sgns::JRpcServerFactory
class sgns::ListenerFactory
class sgns::RouterFactory
class sgns::RpcContextFactory
class sgns::RpcThreadPoolFactory
class sgns::SR25519KeypairFactory
class sgns::StateApiFactory
class sgns::SteadyClockFactory
class sgns::SyncProtocolObserverFactory
class sgns::SystemApiFactory
class sgns::AppConfiguration
class sgns::AppConfigurationImpl

Types

Name
enum class error_cli
enum class uint8_t message_type
enum class uint8_t bulk_pull_account_flags
using std::pair< std::string, base::Buffer > EscrowDataPair
using std::pair< std::vector< InputUTXOInfo >, std::vector< OutputDestInfo > > UTXOTxParameters
using boost::asio::ip::udp::endpoint endpoint
using boost::asio::ip::tcp::endpoint tcp_endpoint
typedef unsigned int ipfs_dbi
A handle for an individual database in the DB environment.
using db_val< IPFS_val > ipfs_val

Functions

Name
base::Logger GeniusNodeLogger()
std::string generate_uuid_with_ipfs_id(const std::string & ipfs_id)
template <size_t N,class Stream >
Stream &
operator<<(Stream & s, const Unused< N > & )
template <size_t N,class Stream >
Stream &
operator>>(Stream & s, Unused< N > & )
std::string to_string(const std::vector< unsigned char > & bytes)
Convert a byte array to a hexadecimal string.
bool isLittleEndian()
Checks if the architecture is little endian.
template <typename T >
T
Vector2Num(const std::vector< uint8_t > & bytes)
Converts a little-endian byte vector into a number.
uint128_t Vector2Num(const std::vector< uint8_t > & bytes)
uint256_t Vector2Num(const std::vector< uint8_t > & bytes)
template <typename T >
std::vector< uint8_t >
Num2Vector(const T & num, std::size_t num_bytes_resolution =sizeof(T))
Converts a number into a byte vector (little-endian).
template <typename T >
T
HexASCII2Num(const char * p_char, std::size_t num_nibbles_resolution =sizeof(T) *2)
Converts a hexadecimal ASCII char array into a number.
template <typename T >
std::vector< T >
HexASCII2NumStr(const char * p_char, std::size_t char_ptr_size)
Converts a hexadecimal ASCII char array into a vector of numbers.
template <typename T >
std::enable_if_t< std::is_same_v< typename T::value_type, uint8_t > >
AdjustEndianess(T & data, std::optional< typename T::iterator > start =std::nullopt, std::optional< typename T::iterator > finish =std::nullopt)
Adjust endianess if needed.
std::string Uint256ToString(const uint256_t & value)
template <class... Fs>
auto
make_visitor(Fs &&... fs)
Creates a compile-time visitor from a set of lambdas.
template <typename TVariant ,typename... TVisitors>
decltype(auto)
visit_in_place(TVariant && variant, TVisitors &&... visitors)
Applies an in-place visitor to a boost::variant.
template <typename T ,typename Matcher >
decltype(auto)
match(T && t, Matcher && m)
apply Matcher to optional T
template <typename T ,typename... Fs>
decltype(auto)
match_in_place(T && t, Fs &&... fs)
construct visitor from Fs and apply it to optional T
std::string decodeChunkedTransfer(const std::string & chunkedData)
GeniusProver::ProofType GetSnarkFromProto(const SGProof::BaseProofData & proof_proto_data)
void add_node_options(boost::program_options::options_description & description_a)
void add_node_flag_options(boost::program_options::options_description & description_a)
std::error_code update_flags(sgns::node_flags & flags_a, boost::program_options::variables_map const & vm)
std::error_code handle_node_options(boost::program_options::variables_map const & vm)
bool parse_port(std::string const & string_a, uint16_t & port_a)
bool parse_address(std::string const & address_text_a, boost::asio::ip::address & address_a)
bool parse_address_port(std::string const & string, boost::asio::ip::address & address_a, uint16_t & port_a)
bool parse_endpoint(std::string const & string, sgns::endpoint & endpoint_a)
bool parse_tcp_endpoint(std::string const & string, sgns::tcp_endpoint & endpoint_a)
uint64_t ip_address_hash_raw(boost::asio::ip::address const & ip_a, uint16_t port =0)
::sgns::error_ read_node_config_toml(boost::filesystem::path const & , sgns::daemon_config & config_a, std::vector< std::string > const & config_overrides =std::vector< std::string >())
::sgns::error_ read_and_update_daemon_config(boost::filesystem::path const & , sgns::daemon_config & config_a, sgns::jsonconfig & json_a)
sgns::node_flags const & inactive_node_flag_defaults()
std::unique_ptr< sgns::inactive_node > default_inactive_node(boost::filesystem::path const & path_a, boost::program_options::variables_map const & vm_a)
std::unique_ptr< sgns::block_store > make_store()
Create a block store instance for the node.
std::unique_ptr< container_info_component > collect_container_info(wallets & wallets, const std::string & name)

Types Documentation

enum error_cli

Enumerator Value Description
generic 1
parse_error 2
invalid_arguments 3
unknown_command 4
database_write_error 5
reading_config 6
disable_all_network 7
ambiguous_udp_options 8

Command line related error codes

enum message_type

Enumerator Value Description
invalid 0x0
not_a_type 0x1
keepalive 0x2
publish 0x3
confirm_req 0x4
confirm_ack 0x5
bulk_pull 0x6
bulk_push 0x7
frontier_req 0x8
node_id_handshake 0x0a
bulk_pull_account 0x0b
telemetry_req 0x0c
telemetry_ack 0x0d

Message types are serialized to the network and existing values must thus never change as types are added, removed and reordered in the enum.

enum bulk_pull_account_flags

Enumerator Value Description
pending_hash_and_amount 0x0
pending_address_only 0x1
pending_hash_amount_and_address 0x2

using EscrowDataPair

using sgns::EscrowDataPair = std::pair<std::string, base::Buffer>;

using UTXOTxParameters

using sgns::UTXOTxParameters = std::pair<std::vector<InputUTXOInfo>, std::vector<OutputDestInfo>>;

using endpoint

using sgns::endpoint = boost::asio::ip::udp::endpoint;

using tcp_endpoint

using sgns::tcp_endpoint = boost::asio::ip::tcp::endpoint;

typedef ipfs_dbi

typedef unsigned int sgns::ipfs_dbi;

A handle for an individual database in the DB environment.

using ipfs_val

using sgns::ipfs_val = db_val<IPFS_val>;

Functions Documentation

function GeniusNodeLogger

base::Logger GeniusNodeLogger()

function generate_uuid_with_ipfs_id

std::string generate_uuid_with_ipfs_id(
    const std::string & ipfs_id
)

function operator<<

template <size_t N,
class Stream >
Stream & operator<<(
    Stream & s,
    const Unused< N > & 
)

function operator>>

template <size_t N,
class Stream >
Stream & operator>>(
    Stream & s,
    Unused< N > & 
)

function to_string

static std::string to_string(
    const std::vector< unsigned char > & bytes
)

Convert a byte array to a hexadecimal string.

Parameters:

  • bytes A vector of bytes to be converted.

Return: A hexadecimal string representation of the bytes.

function isLittleEndian

static bool isLittleEndian()

Checks if the architecture is little endian.

Return: true if little endian, false otherwise

function Vector2Num

template <typename T >
static T Vector2Num(
    const std::vector< uint8_t > & bytes
)

Converts a little-endian byte vector into a number.

Parameters:

  • bytes Byte vector to convert.

Template Parameters:

  • T uint8_t, uint16_t, uint32_t, uint64_t, or supported multiprecision integer types.

Return: The converted number.

function Vector2Num

uint128_t Vector2Num(
    const std::vector< uint8_t > & bytes
)

function Vector2Num

uint256_t Vector2Num(
    const std::vector< uint8_t > & bytes
)

function Num2Vector

template <typename T >
static std::vector< uint8_t > Num2Vector(
    const T & num,
    std::size_t num_bytes_resolution =sizeof(T)
)

Converts a number into a byte vector (little-endian).

Parameters:

  • num Number to convert.
  • num_bytes_resolution Optional byte resolution (defaults to sizeof(T)).

Template Parameters:

  • T uint8_t, uint16_t, uint32_t or uint64_t

Return: The converted byte vector.

function HexASCII2Num

template <typename T >
static T HexASCII2Num(
    const char * p_char,
    std::size_t num_nibbles_resolution =sizeof(T) *2
)

Converts a hexadecimal ASCII char array into a number.

Parameters:

  • p_char Hexadecimal ASCII char array
  • num_nibbles_resolution How many nibbles will constitute a number

Template Parameters:

  • T uint8_t, uint16_t, uint32_t or uint64_t

Return: The converted number (8-64 bit variable)

function HexASCII2NumStr

template <typename T >
static std::vector< T > HexASCII2NumStr(
    const char * p_char,
    std::size_t char_ptr_size
)

Converts a hexadecimal ASCII char array into a vector of numbers.

Parameters:

  • p_char Hexadecimal ASCII char array
  • char_ptr_size Size of the char array

Template Parameters:

  • T uint8_t, uint16_t, uint32_t or uint64_t

Return: The vector of converted numbers

function AdjustEndianess

template <typename T >
static std::enable_if_t< std::is_same_v< typename T::value_type, uint8_t > > AdjustEndianess(
    T & data,
    std::optional< typename T::iterator > start =std::nullopt,
    std::optional< typename T::iterator > finish =std::nullopt
)

Adjust endianess if needed.

Parameters:

  • data The container of data (vector/array)
  • start Optional beginning of the valid data
  • finish Optional ending of the valid data

Template Parameters:

  • T std::vector or std::array

function Uint256ToString

static std::string Uint256ToString(
    const uint256_t & value
)

function make_visitor

template <class... Fs>
auto make_visitor(
    Fs &&... fs
)

Creates a compile-time visitor from a set of lambdas.

Return: Visitor instance that dispatches to the provided lambdas.

Example: ```cpp

make_visitor(, { return 2; });

This is essentially the same as: ```cpp

struct visitor : public boost::static_visitor<int> {
  int operator()(int a) { return 1; }
  int operator()(std::string b) { return 2; }
};

function visit_in_place

template <typename TVariant ,
typename... TVisitors>
decltype(auto) visit_in_place(
    TVariant && variant,
    TVisitors &&... visitors
)

Applies an in-place visitor to a boost::variant.

Example: ```cpp

boost::variant value = "1234";

visit_in_place(value, { std::cout << "(int)" << v; }, { std::cout << "(string)" << v; });

### function match

```cpp
template <typename T ,
typename Matcher >
decltype(auto) match(
    T && t,
    Matcher && m
)

apply Matcher to optional T

function match_in_place

template <typename T ,
typename... Fs>
decltype(auto) match_in_place(
    T && t,
    Fs &&... fs
)

construct visitor from Fs and apply it to optional T

function decodeChunkedTransfer

std::string decodeChunkedTransfer(
    const std::string & chunkedData
)

function GetSnarkFromProto

static GeniusProver::ProofType GetSnarkFromProto(
    const SGProof::BaseProofData & proof_proto_data
)

function add_node_options

void add_node_options(
    boost::program_options::options_description & description_a
)

function add_node_flag_options

void add_node_flag_options(
    boost::program_options::options_description & description_a
)

function update_flags

std::error_code update_flags(
    sgns::node_flags & flags_a,
    boost::program_options::variables_map const & vm
)

function handle_node_options

std::error_code handle_node_options(
    boost::program_options::variables_map const & vm
)

function parse_port

bool parse_port(
    std::string const & string_a,
    uint16_t & port_a
)

function parse_address

bool parse_address(
    std::string const & address_text_a,
    boost::asio::ip::address & address_a
)

function parse_address_port

bool parse_address_port(
    std::string const & string,
    boost::asio::ip::address & address_a,
    uint16_t & port_a
)

function parse_endpoint

bool parse_endpoint(
    std::string const & string,
    sgns::endpoint & endpoint_a
)

function parse_tcp_endpoint

bool parse_tcp_endpoint(
    std::string const & string,
    sgns::tcp_endpoint & endpoint_a
)

function ip_address_hash_raw

uint64_t ip_address_hash_raw(
    boost::asio::ip::address const & ip_a,
    uint16_t port =0
)

function read_node_config_toml

::sgns::error_ read_node_config_toml(
    boost::filesystem::path const & ,
    sgns::daemon_config & config_a,
    std::vector< std::string > const & config_overrides =std::vector< std::string >()
)

function read_and_update_daemon_config

::sgns::error_ read_and_update_daemon_config(
    boost::filesystem::path const & ,
    sgns::daemon_config & config_a,
    sgns::jsonconfig & json_a
)

function inactive_node_flag_defaults

sgns::node_flags const & inactive_node_flag_defaults()

function default_inactive_node

std::unique_ptr< sgns::inactive_node > default_inactive_node(
    boost::filesystem::path const & path_a,
    boost::program_options::variables_map const & vm_a
)

function make_store

std::unique_ptr< sgns::block_store > make_store()

Create a block store instance for the node.

Return: Newly created block store implementation.

function collect_container_info

std::unique_ptr< container_info_component > collect_container_info(
    wallets & wallets,
    const std::string & name
)

Updated on 2026-03-04 at 13:10:43 -0800