MCWrapper

A simple .NET Core wrapper aimed at supporting MultiChain Core blockchain networks

Download MCWrapper from GitHub or NuGet

MCWrapper.CLI command line client interfaces should be injected into Controllers, Razor Pages, or ViewComponents as indicated below.

IMultiChainCliGenerate
Provides access to the following generate-type blockchain methods
getgenerate, gethashespersec, setgenerate
IMultiChainCliOffChain
Provides access to following offchain-type blockchain methods
purgepublisheditems, purgestreamitems, retrievestreamitems
IMultiChainCliControl
Provides access to following control-type blockchain methods
clearmempool, getblockchainparams, getinfo, getinitstatus, getruntimeparams, help, pause, resume, setlastblock, setruntimeparam, stop
IMultiChainCliGeneral
Provides access to following general or blockchain-type methods
getassetinfo, getbestblockhash, getblock*, getblockchaininfo, getblockcount, getblockhash, getchaintips, getdifficulty, getfiltercode, getlastblockinfo, getmempoolinfo, getrawmempool, getstreaminfo, gettxout, gettxoutsetinfo, listassets, listblocks, listpermissions, liststreamfilters, liststreams, listtxfilters, listupgrades, runstreamfilter, runtxfilter, teststreamfilter, testtxfilter, verifychain, verifypermission
IMultiChainCliNetwork
Provides access to following network-type blockchain methods
addnode, getaddednodeinfo, getchunkqueueinfo, getchunkqueuetotals, getconnectioncount, getnettotals, getnetworkinfo, getpeerinfo, ping
IMultiChainCliUtility
Provides access to following utility-type blockchain methods
appendbinarycache, createbinarycache, createkeypairs, createmultisig, deletebinarycache, estimatefee, estimatepriority, validateaddress, verifymessage
IMultiChainCliMining
Provides access to following mining-type blockchain methods
getblocktemplate, getmininginfo, getnetworkhashps, prioritisetransaction, submitblock
IMultiChainCliRaw
Provides access to following raw-type blockchain methods
appendrawchange, appendrawdata, appendrawtransaction, createrawtransaction, decoderawtransaction, decodescript, getrawtransaction, sendrawtransaction, signrawtransaction
IMultiChainCliWallet
Provides access to following wallet-type blockchain methods
addmultisigaddress, appendrawexchange, approvefrom, backupwallet, combineunspent, completerawexchange, create, createfrom, createrawexchange, createrawsendfrom, decoderawexchange, disablerawtransaction, dumpprivkey, dumpwallet, encryptwallet, getaccount, getaccountaddress, getaddressbalances, getaddresses, getaddressesbyaccount, getaddresstransaction, getassetbalances, getassettransaction, getbalance, getmultibalances, getnewaddress, getrawchangeaddress, getreceivedbyaccount, getreceivedbyaddress, getstreamitem, getstreamkeysummary, getstreampublishersummary, gettotalbalances, gettransaction, gettxoutdata, getunconfirmedbalance, getwalletinfo, getwallettransaction, grant, grantfrom, grantwithdata, grantwithdatafrom, importaddress, importprivkey, importwallet, issue, issuefrom, issuemore, issuemorefrom, keypoolrefill, listaccounts, listaddresses, listaddressgroupings, listaddresstransactions, listassettransactions, listlockunspent, listreceivedbyaccount, listreceivedbyaddress, listsinceblock, liststreamblockitems, liststreamitems, liststreamkeyitems, liststreamkeys, liststreampublisheritems, liststreampublishers, liststreamqueryitems, liststreamtxitems, listtransactions, listunspent, listwallettransactions, lockunspent, move, preparelockunspent, preparelockunspentfrom, publish, publishfrom, publishmulti, publishmultifrom, purgepublisheditems, purgestreamitems, resendwallettransactions, retrievestreamitems, revoke, revokefrom, send, sendasset, sendassetfrom, sendfrom, sendfromaccount, sendmany, sendwithdata, sendwithdatafrom, setaccount, settxfee, signmessage, subscribe, trimsubscribe, txouttobinarycache, unsubscribe, walletlock, walletpassphrase, walletpassphrasechange

*Note: To represent the getblock method, located in IMultiChainCliGeneral, we use six different explicit methods to accommodate and infer all possible Verbose arguments - false, true, 1, 2, 3, 4

GetBlockEncodedAsync - Returns string encoded block - Verbose is equal to false
GetBlockVerboseAsync - Returns JSON object - Verbose is equal to true
GetBlockV1Async - Returns the same as Verbose method - Verbose is equal to 1
GetBlockV2Async - Returns JSON object with additional details - Verbose is equal to 2
GetBlockV3Async - Returns JSON object with additional details - Verbose is equal to 3
GetBlockV4Async - Returns JSON object with additional details - Verbose is equal to 4