Git Product home page Git Product logo

multichain's Introduction

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.    

multichain's People

Contributors

maxwe11 avatar baldric avatar kevinattard-vme avatar martinopde avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.