BeeFrog.Iota.Api 1.0.1

The IOTA API library for .NET Standard framework. Compatible with .net 4.5 and .net core 1.0

Install-Package BeeFrog.Iota.Api -Version 1.0.1
dotnet add package BeeFrog.Iota.Api --version 1.0.1
<PackageReference Include="BeeFrog.Iota.Api" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BeeFrog.Iota.Api --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Getting started

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;

POW

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

Getting started

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;

POW

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

Release Notes

IOTA API. Supports IRI V1.4.2.1 and IOTA API version 1.3.0. Local POW, Transaction signing.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 318 2/13/2018
1.0.0 249 2/13/2018