.NET 5 library for working with the Tangram wallet REST API (bamboo)
- Wrapper around API calls by creating a
TangramClient
and calling the methods within it
- wen mainnet
- Newtonsoft.Json
- RestSharp
Enable the REST API in the bamboo appsettings.json
:
"network": {
"enabled_restAPI": true,
}
using var client = new TangramClient("http://localhost:8001");
var balance = await client.WalletBalance(new Wallet
{
Identifier = "id_a1b2c3d4e5f6...",
Passphrase = "deputy sausage price exclude fly..."
});
Console.WriteLine($"Wallet balance: {balance}");
var spend = await client.WalletSpend(new Wallet
{
Identifier = "id_a1b2c3d4e5f6...",
Passphrase = "deputy sausage price exclude fly..."
},
address: "waPXFhGZaxPtGTVL...",
amount: 18.374,
memo: "for the pizza");
Console.WriteLine($"New balance: {spend.Balance}");
PRs and issues are appreciated.