Skip to content

sgns::wallets

#include <wallet.hpp>

Public Functions

Name
wallets(bool error_a, sgns::node & node_a)
~wallets()
std::shared_ptr< sgns::wallet > open(sgns::wallet_id const & )
std::shared_ptr< sgns::wallet > create(sgns::wallet_id const & )
bool search_pending(sgns::wallet_id const & )
void search_pending_all()
void destroy(sgns::wallet_id const & )
void reload()
void do_wallet_actions()
void queue_wallet_action(sgns::uint128_t const & , std::shared_ptr< sgns::wallet > , std::function< void(sgns::wallet &)> const & )
void foreach_representative(std::function< void(sgns::public_key const &, sgns::raw_key const &)> const & )
bool exists(sgns::transaction const & , sgns::public_key const & )
void stop()
void clear_send_ids(sgns::transaction const & )
bool check_rep(sgns::account const & , sgns::uint128_t const & , const bool =true)
void compute_reps()
void ongoing_compute_reps()
void split_if_needed(sgns::transaction & , sgns::block_store & )
sgns::write_transaction tx_begin_write()
sgns::read_transaction tx_begin_read()

Public Attributes

Name
sgns::network_params network_params
std::function< void(bool)> observer
std::unordered_map< sgns::wallet_id, std::shared_ptr< sgns::wallet > > items
std::multimap< sgns::uint128_t, std::pair< std::shared_ptr< sgns::wallet >, std::function< void(sgns::wallet &)> >, std::greater< sgns::uint128_t > > actions
sgns::locked< std::unordered_map< sgns::account, sgns::root > > delayed_work
std::mutex mutex
std::mutex action_mutex
sgns::condition_variable condition
std::atomic< bool > stopped
std::thread thread
sgns::uint128_t const generate_priority
sgns::uint128_t const high_priority

Public Functions Documentation

function wallets

wallets(
    bool error_a,
    sgns::node & node_a
)

function ~wallets

~wallets()

function open

std::shared_ptr< sgns::wallet > open(
    sgns::wallet_id const & 
)

function create

std::shared_ptr< sgns::wallet > create(
    sgns::wallet_id const & 
)

function search_pending

bool search_pending(
    sgns::wallet_id const & 
)

function search_pending_all

void search_pending_all()

function destroy

void destroy(
    sgns::wallet_id const & 
)

function reload

void reload()

function do_wallet_actions

void do_wallet_actions()

function queue_wallet_action

void queue_wallet_action(
    sgns::uint128_t const & ,
    std::shared_ptr< sgns::wallet > ,
    std::function< void(sgns::wallet &)> const & 
)

function foreach_representative

void foreach_representative(
    std::function< void(sgns::public_key const &, sgns::raw_key const &)> const & 
)

function exists

bool exists(
    sgns::transaction const & ,
    sgns::public_key const & 
)

function stop

void stop()

function clear_send_ids

void clear_send_ids(
    sgns::transaction const & 
)

function check_rep

bool check_rep(
    sgns::account const & ,
    sgns::uint128_t const & ,
    const bool  =true
)

function compute_reps

void compute_reps()

function ongoing_compute_reps

void ongoing_compute_reps()

function split_if_needed

void split_if_needed(
    sgns::transaction & ,
    sgns::block_store & 
)

function tx_begin_write

sgns::write_transaction tx_begin_write()

Start read-write transaction

function tx_begin_read

sgns::read_transaction tx_begin_read()

Start read-only transaction

Public Attributes Documentation

variable network_params

sgns::network_params network_params;

variable observer

std::function< void(bool)> observer;

variable items

std::unordered_map< sgns::wallet_id, std::shared_ptr< sgns::wallet > > items;

variable actions

std::multimap< sgns::uint128_t, std::pair< std::shared_ptr< sgns::wallet >, std::function< void(sgns::wallet &)> >, std::greater< sgns::uint128_t > > actions;

variable delayed_work

sgns::locked< std::unordered_map< sgns::account, sgns::root > > delayed_work;

variable mutex

std::mutex mutex;

variable action_mutex

std::mutex action_mutex;

variable condition

sgns::condition_variable condition;

variable stopped

std::atomic< bool > stopped;

variable thread

std::thread thread;

variable generate_priority

static sgns::uint128_t const generate_priority;

variable high_priority

static sgns::uint128_t const high_priority;

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