mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Wallet API: default values for account and subaddr index
This commit is contained in:
parent
8d511f3c24
commit
086b7db2c7
3 changed files with 13 additions and 14 deletions
|
@ -1044,8 +1044,7 @@ void WalletImpl::setSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex
|
||||||
// - confirmed_transfer_details)
|
// - confirmed_transfer_details)
|
||||||
|
|
||||||
PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const string &payment_id, optional<uint64_t> amount, uint32_t mixin_count,
|
PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const string &payment_id, optional<uint64_t> amount, uint32_t mixin_count,
|
||||||
uint32_t subaddr_account, std::set<uint32_t> subaddr_indices,
|
PendingTransaction::Priority priority, uint32_t subaddr_account, std::set<uint32_t> subaddr_indices)
|
||||||
PendingTransaction::Priority priority)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
clearStatus();
|
clearStatus();
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
int status() const;
|
int status() const;
|
||||||
std::string errorString() const;
|
std::string errorString() const;
|
||||||
bool setPassword(const std::string &password);
|
bool setPassword(const std::string &password);
|
||||||
std::string address(uint32_t accountIndex, uint32_t addressIndex) const;
|
std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const;
|
||||||
std::string integratedAddress(const std::string &payment_id) const;
|
std::string integratedAddress(const std::string &payment_id) const;
|
||||||
std::string secretViewKey() const;
|
std::string secretViewKey() const;
|
||||||
std::string publicViewKey() const;
|
std::string publicViewKey() const;
|
||||||
|
@ -88,8 +88,8 @@ public:
|
||||||
ConnectionStatus connected() const;
|
ConnectionStatus connected() const;
|
||||||
void setTrustedDaemon(bool arg);
|
void setTrustedDaemon(bool arg);
|
||||||
bool trustedDaemon() const;
|
bool trustedDaemon() const;
|
||||||
uint64_t balance(uint32_t accountIndex) const;
|
uint64_t balance(uint32_t accountIndex = 0) const;
|
||||||
uint64_t unlockedBalance(uint32_t accountIndex) const;
|
uint64_t unlockedBalance(uint32_t accountIndex = 0) const;
|
||||||
uint64_t blockChainHeight() const;
|
uint64_t blockChainHeight() const;
|
||||||
uint64_t approximateBlockChainHeight() const;
|
uint64_t approximateBlockChainHeight() const;
|
||||||
uint64_t daemonBlockChainHeight() const;
|
uint64_t daemonBlockChainHeight() const;
|
||||||
|
@ -117,9 +117,9 @@ public:
|
||||||
|
|
||||||
PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
|
PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
|
||||||
optional<uint64_t> amount, uint32_t mixin_count,
|
optional<uint64_t> amount, uint32_t mixin_count,
|
||||||
uint32_t subaddr_account,
|
PendingTransaction::Priority priority = PendingTransaction::Priority_Low,
|
||||||
std::set<uint32_t> subaddr_indices,
|
uint32_t subaddr_account = 0,
|
||||||
PendingTransaction::Priority priority = PendingTransaction::Priority_Low);
|
std::set<uint32_t> subaddr_indices = {});
|
||||||
virtual PendingTransaction * createSweepUnmixableTransaction();
|
virtual PendingTransaction * createSweepUnmixableTransaction();
|
||||||
bool submitTransaction(const std::string &fileName);
|
bool submitTransaction(const std::string &fileName);
|
||||||
virtual UnsignedTransaction * loadUnsignedTx(const std::string &unsigned_filename);
|
virtual UnsignedTransaction * loadUnsignedTx(const std::string &unsigned_filename);
|
||||||
|
|
|
@ -360,7 +360,7 @@ struct Wallet
|
||||||
//! in case error status, returns error string
|
//! in case error status, returns error string
|
||||||
virtual std::string errorString() const = 0;
|
virtual std::string errorString() const = 0;
|
||||||
virtual bool setPassword(const std::string &password) = 0;
|
virtual bool setPassword(const std::string &password) = 0;
|
||||||
virtual std::string address(uint32_t accountIndex, uint32_t addressIndex) const = 0;
|
virtual std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const = 0;
|
||||||
std::string mainAddress() const { return address(0, 0); }
|
std::string mainAddress() const { return address(0, 0); }
|
||||||
virtual std::string path() const = 0;
|
virtual std::string path() const = 0;
|
||||||
virtual bool testnet() const = 0;
|
virtual bool testnet() const = 0;
|
||||||
|
@ -476,14 +476,14 @@ struct Wallet
|
||||||
virtual ConnectionStatus connected() const = 0;
|
virtual ConnectionStatus connected() const = 0;
|
||||||
virtual void setTrustedDaemon(bool arg) = 0;
|
virtual void setTrustedDaemon(bool arg) = 0;
|
||||||
virtual bool trustedDaemon() const = 0;
|
virtual bool trustedDaemon() const = 0;
|
||||||
virtual uint64_t balance(uint32_t accountIndex) const = 0;
|
virtual uint64_t balance(uint32_t accountIndex = 0) const = 0;
|
||||||
uint64_t balanceAll() const {
|
uint64_t balanceAll() const {
|
||||||
uint64_t result = 0;
|
uint64_t result = 0;
|
||||||
for (uint32_t i = 0; i < numSubaddressAccounts(); ++i)
|
for (uint32_t i = 0; i < numSubaddressAccounts(); ++i)
|
||||||
result += balance(i);
|
result += balance(i);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
virtual uint64_t unlockedBalance(uint32_t accountIndex) const = 0;
|
virtual uint64_t unlockedBalance(uint32_t accountIndex = 0) const = 0;
|
||||||
uint64_t unlockedBalanceAll() const {
|
uint64_t unlockedBalanceAll() const {
|
||||||
uint64_t result = 0;
|
uint64_t result = 0;
|
||||||
for (uint32_t i = 0; i < numSubaddressAccounts(); ++i)
|
for (uint32_t i = 0; i < numSubaddressAccounts(); ++i)
|
||||||
|
@ -623,9 +623,9 @@ struct Wallet
|
||||||
|
|
||||||
virtual PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
|
virtual PendingTransaction * createTransaction(const std::string &dst_addr, const std::string &payment_id,
|
||||||
optional<uint64_t> amount, uint32_t mixin_count,
|
optional<uint64_t> amount, uint32_t mixin_count,
|
||||||
uint32_t subaddr_account,
|
PendingTransaction::Priority = PendingTransaction::Priority_Low,
|
||||||
std::set<uint32_t> subaddr_indices,
|
uint32_t subaddr_account = 0,
|
||||||
PendingTransaction::Priority = PendingTransaction::Priority_Low) = 0;
|
std::set<uint32_t> subaddr_indices = {}) = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief createSweepUnmixableTransaction creates transaction with unmixable outputs.
|
* \brief createSweepUnmixableTransaction creates transaction with unmixable outputs.
|
||||||
|
|
Loading…
Reference in a new issue