For now this library is not working. IOTA changed encryption (Curl) and theses changes in this library are not implemented yet.
The Borlay.Iota.Library implements [IOTA IRI api calls]. It also can do the proof of work for you.
http://iota.org https://github.com/iotaledger
PJGEZFOH99UVRUTRNWPZIYHHKWBMQKG9BHCMJGOZWWSPEWLTJYOHEFSJFQJHDBVOXLHMJATJIALSXELYXRBGAMWZHW
The Borlay.Iota.Library is writen for .NET Standard 1.1 framework. It can be used in .net 4.5 and .net core 1.0 as well. For full .net frameworks support visit .NET Standard 1.1
Install-Package Borlay.Iota.Library
Get the address with the balance and the transactions hashes
var api = new IotaApi("http://node.iotawallet.info:14265", 15);
var address = await api.GetAddress("YOURSEED", 0);
// use address
var balance = address.Balance;
var transactionHashes = address.Transactions;
Renew your addresses
api.RenewBalances(address); // gets the balances
api.RenewTransactions(address); // gets the transactions hashes
api.RenewAddresses(address); // both
You can send empty transaction simply by doing this
var transfer = new TransferItem()
{
Address = "ADDRESS",
Value = 0,
Message = "MESSAGETEST",
Tag = "TAGTEST"
};
var transactionItem = await api.SendTransfer(transfer, CancellationToken.None);
Or you can send the transaction with the value
var transfer = new TransferItem()
{
Address = "ADDRESS",
Value = 1000,
Message = "MESSAGETEST",
Tag = "TAGTEST"
};
var transactionItem = await api.SendTransfer(transfer, "YOURSEED", 0, CancellationToken.None);
By default the pow will run on local pc but you can change to run it on iri
api.NonceSeeker = api.IriApi;
You can do the pow (attachToTangle) like this
var transactionTrytes = transfer.CreateTransactions().GetTrytes(); // gets transactions from transfer and then trytes
var toApprove = await api.IriApi.GetTransactionsToApprove(9); // gets transactions to approve
var trunk = toApprove.TrunkTransaction;
var branch = toApprove.BranchTransaction;
var trytesToSend = await transactionTrytes
.DoPow(trunk, branch, 15, 0, CancellationToken.None); // do the pow
await api.BroadcastAndStore(trytesToSend); // broadcast and send the trytes