LucidOcean.MultiChain 0.0.0.17

dotnet add package LucidOcean.MultiChain --version 0.0.0.17                
NuGet\Install-Package LucidOcean.MultiChain -Version 0.0.0.17                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LucidOcean.MultiChain" Version="0.0.0.17" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LucidOcean.MultiChain --version 0.0.0.17                
#r "nuget: LucidOcean.MultiChain, 0.0.0.17"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LucidOcean.MultiChain as a Cake Addin
#addin nuget:?package=LucidOcean.MultiChain&version=0.0.0.17

// Install LucidOcean.MultiChain as a Cake Tool
#tool nuget:?package=LucidOcean.MultiChain&version=0.0.0.17                

LucidOcean.MultiChain Assembly

The library is an unofficial wrapper for multichain_cli JSON RPC.


Latest Nuget | MultiChain Starter


The Source is in Visual Studio 2022 Community Edition.

The compiled Assemblies is targeting 4.8 and Core 6.0

This library divides the calls into

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

Create your own chain

create https://www.multichain.com/developers/creating-connecting/

and run your test chain

NOTE: This library is only available for v1 RPC

Set up your connection

  • edit your multichain.conf
  • add port to your firewall
  • allow your ip

example multichain.conf (use your settings)

rpcuser=multichainrpc rpcpassword=1jm2VNf2MdGK8ULQiMGg7Q4C8Jy89BJrzNJ5y9Mj7qaS rpcallowip=127.0.0.1

Get your RPC port

view in your params.dat file

default-network-port = 9265 # Default TCP/IP port for peer-to-peer connection with other nodes. default-rpc-port = 9264 # USE THIS - Default TCP/IP port for incoming JSON-RPC API requests.

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 
- 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.    
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.0.17 176 2/19/2024
0.0.0.14 124 2/7/2024
0.0.0.13 98 2/7/2024
0.0.0.12 108 2/6/2024
0.0.0.11 191 10/4/2023
0.0.0.10 2,220 2/22/2018
0.0.0.9 4,770 12/19/2017
0.0.0.8 1,261 11/8/2017
0.0.0.7 1,284 10/9/2017
0.0.0.6 970 10/3/2017
0.0.0.4 986 9/19/2017
0.0.0.3 958 9/15/2017

Added Missing Permissions to BlockChainPermission
- Create

Added missing overrides for Permissions.Grant and ListPermissions, ListPermissionsAsync
Where appropriate called the overrides or the async version with GetAwaiter rather than duplicate the client execute

Added additional params (nativeamount, comment, commentTo, startBlock and endBlock) to GrantAsync. They were in the signature but not actually sent to RPC
Added additional params (nativeamount, comment, commentTo, startBlock and endBlock) to GrantFromAsync.They were in the signature but not actually sent to RPC
Added missing param adresses to ListUnspent(int minConf = 1, int maxConf = 999999, IEnumerable<string> addresses = null) call
Util.StringifyValues joins strings in list, added null check.
FIXED: ListUnspentAsync did not pass in the address, so the filter was never used