Class DogeAccount
Main Dogecoin Account class
Inheritance
Inherited Members
Namespace: VEDriversLite
Assembly: VEDriversLite.dll
Syntax
public class DogeAccount
Properties
| Improve this Doc View SourceAccountKey
Carrier for encrypted private key from storage and its password.
Declaration
[JsonIgnore]
public EncryptionKey AccountKey { get; set; }
Property Value
Type | Description |
---|---|
EncryptionKey |
Address
Doge Address hash
Declaration
public string Address { get; set; }
Property Value
Type | Description |
---|---|
System.String |
BAddress
Address in form of BitcoinAddress object
Declaration
public BitcoinAddress BAddress { get; set; }
Property Value
Type | Description |
---|---|
NBitcoin.BitcoinAddress |
ReceivedTransactions
Actual list of last 100 Received transactions on this address.
Declaration
public List<ReceivedTx> ReceivedTransactions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ReceivedTx> |
Secret
Loaded Secret, NBitcoin Class which carry Public Key and Private Key
Declaration
public BitcoinSecret Secret { get; set; }
Property Value
Type | Description |
---|---|
NBitcoin.BitcoinSecret |
SentTransactions
Actual list of last 100 Spended transactions on this address.
Declaration
public List<SpentTx> SentTransactions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<SpentTx> |
TotalBalance
Total actual balance based on Utxos. This means sum of spendable and unconfirmed balances.
Declaration
public double TotalBalance { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
TotalSpendableBalance
Total spendable balance based on Utxos.
Declaration
public double TotalSpendableBalance { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
TotalUnconfirmedBalance
Total balance which is now unconfirmed based on Utxos.
Declaration
public double TotalUnconfirmedBalance { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Utxos
Actual list of all Utxos on this address.
Declaration
public List<Utxo> Utxos { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Utxo> |
Methods
| Improve this Doc View SourceBuyNFT(String, String, INFT)
Buy the NFT based on the NFT and Neblio Address
Declaration
public async Task<(bool, string)> BuyNFT(string neblioAddress, string receiver, INFT nft)
Parameters
Type | Name | Description |
---|---|---|
System.String | neblioAddress | |
System.String | receiver | |
INFT | nft |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
CheckSpendableDoge(Double)
This function will check if there is some spendable doge of specific amount and returns list of the utxos for the transaction
Declaration
public async Task<(string, ICollection<Utxo>)> CheckSpendableDoge(double amount)
Parameters
Type | Name | Description |
---|---|---|
System.Double | amount |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.String, System.Collections.Generic.ICollection<Utxo>>> |
CreateNewAccount(String, Boolean)
This function will create new account - Doge address and its Private key.
Declaration
public async Task<bool> CreateNewAccount(string password, bool saveToFile = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | password | Input password, which will encrypt the Private key |
System.Boolean | saveToFile | if you want to save it to the file (dont work in the WASM) set this. It will save to root exe path as key.txt |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
GetListOfReceivedTransactions()
This function will get list of received transaction
Declaration
public async Task<ICollection<ReceivedTx>> GetListOfReceivedTransactions()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<ReceivedTx>> |
GetListOfSentTransactions()
This function will get list of spended transaction
Declaration
public async Task<ICollection<SpentTx>> GetListOfSentTransactions()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<SpentTx>> |
IsLocked()
This function will check if the account is locked or unlocked.
Declaration
public bool IsLocked()
Returns
Type | Description |
---|---|
System.Boolean |
LoadAccount(String, String)
Load account from "key.txt" file placed in the root exe directory. Doesnt work in WABS
Declaration
public async Task<bool> LoadAccount(string password, string filename = "dogekey.txt")
Parameters
Type | Name | Description |
---|---|---|
System.String | password | Passwotd to decrypt the loaded private key |
System.String | filename | Filename with the key. Default name is dogekey.txt |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
LoadAccount(String, String, String)
Load account from password, input encrypted private key and address. It expect the private key is encrypted by the password. It uses AES encryption
Declaration
public async Task<bool> LoadAccount(string password, string encryptedKey, string address = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | password | |
System.String | encryptedKey | |
System.String | address |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
LoadAccountWithDummyKey(String)
Load account just for observation You cannot sign tx when you load address this way
Declaration
public async Task<bool> LoadAccountWithDummyKey(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | Address |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
ReloadUtxos()
Reload address Utxos list. It will sort descending the utxos based on the utxos number of confirmations. Smallest number of confirmations leads to newest transations
Declaration
public async Task ReloadUtxos()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SendMultipleInputPayment(String, Double, List<Utxo>, String, UInt64)
Send Doge payment with multiple inputs
Declaration
public async Task<(bool, string)> SendMultipleInputPayment(string receiver, double amount, List<Utxo> utxos, string message = "", ulong fee = 100000000UL)
Parameters
Type | Name | Description |
---|---|---|
System.String | receiver | Receiver Doge Address |
System.Double | amount | Ammount in Doge |
System.Collections.Generic.List<Utxo> | utxos | |
System.String | message | |
System.UInt64 | fee |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
SendMultipleOutputPayment(Dictionary<String, Double>, List<Utxo>, String)
Send Doge payment with multiple outputs
Declaration
public async Task<(bool, string)> SendMultipleOutputPayment(Dictionary<string, double> receiverAmounts, List<Utxo> utxos, string message = "")
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Double> | receiverAmounts | |
System.Collections.Generic.List<Utxo> | utxos | |
System.String | message |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
SendPayment(String, Double, String, String, Int32)
Send Doge payment
Declaration
public async Task<(bool, string)> SendPayment(string receiver, double amount, string message = "", string utxo = "", int N = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | receiver | Receiver Doge Address |
System.Double | amount | Ammount in Doge |
System.String | message | add message to OP_RETURN data. max 83 bytes |
System.String | utxo | from specific utxo |
System.Int32 | N | with specific utxo index |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
SignMessage(String)
Sign custom message with use of account Private Key
Declaration
public async Task<(bool, string)> SignMessage(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
StartRefreshingData(Int32)
This function will load the actual data and then run the task which periodically refresh this data. It doesnt have cancellation now!
Declaration
public async Task<string> StartRefreshingData(int interval = 5000)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | interval | Default interval is 3000 = 3 seconds |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
VerifyMessage(String, String, String)
Verify message which was signed by some address.
Declaration
public async Task<(bool, string)> VerifyMessage(string message, string signature, string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Input message |
System.String | signature | Signature of this message created by owner of some doge address. |
System.String | address | Doge address which should sign the message and should be verified. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
Events
| Improve this Doc View SourceNewDogeUtxos
This event is called whenever new doge transaction is received
Declaration
public event EventHandler<IEventInfo> NewDogeUtxos
Event Type
Type | Description |
---|---|
System.EventHandler<IEventInfo> |
NewEventInfo
This event is called whenever some important thing happen. You can obtain success, error and info messages.
Declaration
public event EventHandler<IEventInfo> NewEventInfo
Event Type
Type | Description |
---|---|
System.EventHandler<IEventInfo> |
Refreshed
This event is called whenever info about the address is reloaded. It is periodic event.
Declaration
public event EventHandler Refreshed
Event Type
Type | Description |
---|---|
System.EventHandler |