Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 2.52 KB

README.md

File metadata and controls

84 lines (66 loc) · 2.52 KB

Welcome to libsimba.net

npm Documentation License: MIT azure

libsimba.net is a library simplifying the use of SIMBAChain APIs. We aim to abstract away the various blockchain concepts, reducing the necessary time needed to get to working code.

Installation

.NET CLI

dotnet add package LibSimba.Net

Nuget Package Manger

Install-Package LibSimba.Net

Basic usage

Get an instance of FileWallet

var wallet = new FileWallet("wallet.json", null);
if (await Wallet.WalletExists())
{
    await Wallet.UnlockWallet("test1234");
}
else
{
    await Wallet.GenerateWallet("test1234");
}

Get an instance of Simbachain

var simba = await SimbaBase.GetSimbaInstance(
    "https://api.simbachain.com/v1/libSimba-SimbaChat-Quorum/",
    wallet,
    "04d1729f7144873851a745d2ae85639f55c8e3de5aea626a2bcd0055c01ba6fc");

Call a method

var parameters = new Dictionary<string, object>()
{
    {"assetId", "0x00"},
    {"name", "C# Test Room"},
    {"createdBy", "Kieran Evans"}
};

var txn = await Simba.CallMethod("createRoom", parameters);

Console.WriteLine($"Transaction ID {txn.ID}");

//Wait for the transaction to deploy to the blockchain
var deployedTxn = await Simba.WaitForSuccessOrError(txn.ID);

Console.WriteLine($"Transaction Hash {deployedTxn .TransactionHash}");

Examples

See here

Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

License

Copyright © 2019 SIMBAChain Inc.
This project is MIT licensed.