#ifndef SALVIUM_WALLET_WRAPPER_H #define SALVIUM_WALLET_WRAPPER_H #include #ifdef __cplusplus extern "C" { #endif // Returns 0 on success, non-zero on error. int wallet_create(const char *name, const char *path, const char *password); int wallet_restore_from_seed(const char *name, const char *seed, const char *path, const char *password); int wallet_open(const char *path, const char *password); int wallet_close(void); // Returned string must be freed with wallet_free_string. const char *wallet_get_address(void); // Atomic units. uint64_t wallet_get_balance(void); int wallet_connect_local_node(void); int wallet_connect_remote_node(const char *host, int port, int trusted); uint64_t wallet_get_node_height(void); uint64_t wallet_get_wallet_height(void); int wallet_is_synced(void); int wallet_refresh(void); // Returns progress in range [0.0, 1.0]. double wallet_sync_progress(void); void wallet_free_string(const char *value); #ifdef __cplusplus } #endif #endif