2026-02-04 16:27:47 +01:00
|
|
|
#ifndef I_LOGOS_EXECUTION_ZONE_WALLET_MODULE_H
|
|
|
|
|
#define I_LOGOS_EXECUTION_ZONE_WALLET_MODULE_H
|
2026-02-03 18:12:53 +01:00
|
|
|
|
|
|
|
|
#include <core/interface.h>
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
#include <wallet_ffi.h>
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
class ILogosExecutionZoneWalletModule {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~ILogosExecutionZoneWalletModule() = default;
|
|
|
|
|
|
2026-02-04 15:51:02 +01:00
|
|
|
// === Logos Core ===
|
|
|
|
|
|
2026-02-04 16:27:47 +01:00
|
|
|
virtual void initLogos(LogosAPI* logosApiInstance) = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// === Logos Execution Zone Wallet ===
|
|
|
|
|
|
|
|
|
|
// Account Management
|
2026-02-18 22:18:10 +01:00
|
|
|
virtual WalletFfiError create_account_public(QString& output_account_id_hex) = 0;
|
|
|
|
|
virtual WalletFfiError create_account_private(QString& output_account_id_hex) = 0;
|
|
|
|
|
virtual WalletFfiError list_accounts(QJsonArray& output_list) = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// Account Queries
|
|
|
|
|
virtual WalletFfiError get_balance(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& account_id_hex,
|
2026-02-04 15:51:02 +01:00
|
|
|
bool is_public,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_balance_le16_hex
|
2026-02-04 15:51:02 +01:00
|
|
|
) = 0;
|
2026-02-18 22:52:28 +01:00
|
|
|
virtual WalletFfiError get_account_public(const QString& account_id_hex, QString& output_account_json) = 0;
|
|
|
|
|
virtual WalletFfiError get_account_private(const QString& account_id_hex, QString& output_account_json) = 0;
|
|
|
|
|
virtual WalletFfiError get_public_account_key(const QString& account_id_hex, QString& output_public_key_hex) = 0;
|
|
|
|
|
virtual WalletFfiError get_private_account_keys(const QString& account_id_hex, QString& output_keys_json) = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// Account Encoding
|
2026-02-18 21:23:16 +01:00
|
|
|
virtual QString account_id_to_base58(const QString& account_id_hex) = 0;
|
2026-02-18 22:18:10 +01:00
|
|
|
virtual WalletFfiError account_id_from_base58(const QString& base58_str, QString& output_account_id_hex) = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// Blockchain Synchronisation
|
2026-02-18 11:21:00 +00:00
|
|
|
virtual WalletFfiError sync_to_block(uint64_t block_id) = 0;
|
2026-02-18 22:18:10 +01:00
|
|
|
virtual WalletFfiError get_last_synced_block(uint64_t* output_block_id) = 0;
|
|
|
|
|
virtual WalletFfiError get_current_block_height(uint64_t* output_block_height) = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// Operations
|
|
|
|
|
virtual WalletFfiError transfer_public(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& from_hex,
|
|
|
|
|
const QString& to_hex,
|
|
|
|
|
const QString& amount_le16_hex,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_result_json
|
2026-02-04 15:51:02 +01:00
|
|
|
) = 0;
|
2026-02-18 09:20:58 +00:00
|
|
|
virtual WalletFfiError transfer_shielded(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& from_hex,
|
2026-02-18 22:10:38 +01:00
|
|
|
const QString& to_keys_json,
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& amount_le16_hex,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_result_json
|
2026-02-18 09:20:58 +00:00
|
|
|
) = 0;
|
|
|
|
|
virtual WalletFfiError transfer_deshielded(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& from_hex,
|
|
|
|
|
const QString& to_hex,
|
|
|
|
|
const QString& amount_le16_hex,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_result_json
|
2026-02-18 09:20:58 +00:00
|
|
|
) = 0;
|
|
|
|
|
virtual WalletFfiError transfer_private(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& from_hex,
|
2026-02-18 22:10:38 +01:00
|
|
|
const QString& to_keys_json,
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& amount_le16_hex,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_result_json
|
2026-02-18 09:20:58 +00:00
|
|
|
) = 0;
|
|
|
|
|
virtual WalletFfiError transfer_shielded_owned(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& from_hex,
|
|
|
|
|
const QString& to_hex,
|
|
|
|
|
const QString& amount_le16_hex,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_result_json
|
2026-02-18 09:20:58 +00:00
|
|
|
) = 0;
|
|
|
|
|
virtual WalletFfiError transfer_private_owned(
|
2026-02-18 21:23:16 +01:00
|
|
|
const QString& from_hex,
|
|
|
|
|
const QString& to_hex,
|
|
|
|
|
const QString& amount_le16_hex,
|
2026-02-18 22:18:10 +01:00
|
|
|
QString& output_result_json
|
2026-02-18 09:20:58 +00:00
|
|
|
) = 0;
|
2026-02-18 22:52:28 +01:00
|
|
|
virtual WalletFfiError register_public_account(const QString& account_id_hex, QString& output_result_json) = 0;
|
|
|
|
|
virtual WalletFfiError register_private_account(const QString& account_id_hex, QString& output_result_json) = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// Wallet Lifecycle
|
2026-02-18 11:21:00 +00:00
|
|
|
virtual WalletFfiError create_new(
|
2026-02-04 15:51:02 +01:00
|
|
|
const QString& config_path,
|
|
|
|
|
const QString& storage_path,
|
|
|
|
|
const QString& password
|
|
|
|
|
) = 0;
|
2026-02-18 11:21:00 +00:00
|
|
|
virtual WalletFfiError open(const QString& config_path, const QString& storage_path) = 0;
|
|
|
|
|
virtual WalletFfiError save() = 0;
|
2026-02-04 15:51:02 +01:00
|
|
|
|
|
|
|
|
// Configuration & Metadata
|
2026-02-18 11:21:00 +00:00
|
|
|
virtual QString get_sequencer_addr() = 0;
|
2026-02-03 18:12:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define ILogosExecutionZoneWalletModule_iid "org.logos.ilogosexecutionzonewalletmodule"
|
|
|
|
|
Q_DECLARE_INTERFACE(ILogosExecutionZoneWalletModule, ILogosExecutionZoneWalletModule_iid)
|
|
|
|
|
|
|
|
|
|
#endif
|