A C# library for blockchain RPC - focusing on MultiChain
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LucidOcean.MultiChain.Explorer.Data
LucidOcean.MultiChain.Explorer
LucidOcean.MultiChain
MultiChainTests Getstreamitem returntype (#27) May 8, 2018
.gitignore
LICENSE Initial commit Aug 28, 2017
LucidOcean.MultiChain.0.0.0.1.nupkg Added LucidOcean.MultiChain.0.0.0.1.nupkg Sep 7, 2017
LucidOcean.MultiChain.xml.md nuget changes Sep 19, 2017
MultiChain.sln
README.md

README.md

LucidOcean.MultiChain Assembly

The library is an unofficial wrapper for multichain_cli JSON RPC. Refer to https://www.multichain.com/developers/json-rpc-api/ for more information on each JSON RPC call and how it is used.

Follow these instructions to create your own chain. https://www.multichain.com/developers/creating-connecting/

The Source is in Visual Studio 2017. The compiled Assemblies is targeting netstandard_2_0 and 4.5.1 NUGET: https://www.nuget.org/packages/LucidOcean.MultiChain/0.0.0.9

This library divides the calls into

  • MultiChainClient.Address
  • MultiChainClient.Asset
  • MultiChainClient.Block
  • MultiChainClient.Peer
  • MultiChainClient.Permission
  • MultiChainClient.Transaction
  • MultiChainClient.Utility
  • MultiChainClient.Wallet
  • MultiChainClient.Stream

example usage:

MultiChainConnection connection = new MultiChainConnection()
            {
                Hostname = "IP",
                Port = 100,
                Username = "multichainrpc",
                Password = "password",
                ChainName = "chain1",
                BurnAddress = "address",
                RootNodeAddress = "address"
            };
            
MultiChainClient _Client = new MultiChainClient(connection);
response = _Client.Wallet.GetNewAddress();

There are sync and async versions.

Issue and Send an Asset

MultiChainConnection connection = new MultiChainConnection()
            {
                Hostname = "IP",
                Port = 100,
                Username = "multichainrpc",
                Password = "password",
                ChainName = "chain1",
                BurnAddress = "address",
                RootNodeAddress = "address"
            };
            
MultiChainClient _Client = new MultiChainClient(connection);
JsonRpcResponse<string> response = _Client.Asset.Issue(issueAddress, assetName, quantity, units);
_Client.Asset.Send(toAddress, assetName, amount);

//Use SendAssetFrom to specify an address FROM and and address To

Using List

    _Client.Asset.ListAssetsAsync(assetName,true);

Issue and Subscribe

    var response = _Client.Asset.Issue(fromAddress, new { name = assetName, open = true }, 10, 1, asset);
    _Client.Asset.Subscribe(response.Result, true);

MultiChain Explorer

- MultiChain explorer running on C# ASP.NET MVC 5.2.3
- Change connection details in LucidOcean.MultiChain.Explorer.Data.ExplorerSettings to connect the explorer to your node.  
    * This works the same as seen in example of issue and sending of an asset.