HIVEMINING : RPC CALLS

Welcome

We've added everything you need to deeply integrate hivemining into your hive pool / bee hosting service / block explorer. If you need any help or advice regarding your integration, or would like us to sanity-check your workflows, please feel free to get in touch.

Hivemining RPC Calls

gethivedifficulty

		gethivedifficulty

		Returns the Hive difficulty as a multiple of the minimum difficulty.

		Result:
		n.nnn       (numeric) the Hive difficulty as a multiple of the minimum difficulty.

		Examples:
		> litecoincash-cli gethivedifficulty 
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gethivedifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		

gethiveinfo

		gethiveinfo ( include_dead, min_honey_confirms )

		Lists the status of your current hive, broken down by bee creation transaction.

		Arguments:
		1. include_dead           (boolean, optional, default=false) Include bees whose lifespans have expired
		2. min_honey_confirms     (numeric, optional, default=1) Only include honey rewards with at least this many confirmations

		Result:
		{
		    summary: {
			bee_count,                (numeric) Total bee count in hive
			mature_bees,              (numeric) Total mature bees
			immature_bees,            (numeric) Total immature bees
			blocks_found,             (numeric) Total blocks found
			bee_fee_paid,             (numeric) Total bee creation fees (in LCC)
			rewards_paid,             (numeric) Total rewards paid (in LCC)
			profit,                   (numeric) Total rewards paid (in LCC)
			"warnings"                (string) Warnings; empty if no warnings
		    },
		    bees: [
			{
			    "txid",               (string) Transaction ID of the bee creation transaction
			    time,                 (numeric) Timestamp of block containing the bee creation transaction (only present once tx is in a block)
			    bee_count,            (numeric) The number of bees created
			    community_contrib,    (boolean) If true, indicates that a portion of the bee creation fee was paid to the community fund
			    "bee_status",         (string) immature | mature | dead. Only mature bees are capable of mining
			    "honey_address",      (string) The address which will receive block rewards for blocks minted by the bees
			    bee_fee_paid,         (numeric) Total bee creation fee (in LCC)
			    rewards_paid,         (numeric) The amount of block rewards earned by the bees (in LCC)
			    profit,               (numeric) The profit earned by the bees (in LCC)
			    blocks_found,         (numeric) The number of blocks minted by the bees
			    blocks_left           (numeric) The number of blocks of bee lifespan remaining
			},...
		    ]
		}

		Examples:
		> litecoincash-cli gethiveinfo 
		> litecoincash-cli gethiveinfo true
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gethiveinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		

getnetworkhiveinfo

		getnetworkhiveinfo

		Lists the mature and immature bee populations across the entire network.

		Result:
		{
		  immature_bee_count,     (numeric) The number of immature bees
		  immature_bct_count,     (numeric) The number of immature Bee Creation Transactions
		  mature_bee_count,       (numeric) The number of mature bees
		  mature_bct_count,       (numeric) The number of mature Bee Creation Transactions
		  honey_pot               (numeric) Total potential network rewards available during bee lifespan (in LCC)
		}

		Examples:
		> litecoincash-cli getnetworkhiveinfo 
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhiveinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		

getbeecost

		getbeecost ( height )

		Returns the cost to create a single bee at given block height.

		Arguments:
		1. height                 (numeric, optional) The block height. Defaults to current tip height.

		Result:
		amount                    (numeric) The amount in LCC

		Examples:
		> litecoincash-cli getbeecost 
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbeecost", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		

createbees

		createbees bee_count ( community_contrib, "honey_address" )

		Create one or more bees in a single transaction, sign it, and broadcast it to the network.

		Arguments:
		1. bee_count              (numeric, required) The number of bees to create.
		2. community_contrib      (boolean, optional, default=true) If true, a small percentage of bee creation cost will be paid to a community fund.
		3. "honey_address"        (string, optional) The LCC address to receive rewards for blocks mined by bee(s) created in this transaction.

		Result:
		"txid"                    (string) The transaction id.

		Examples:
		> litecoincash-cli createbees 1
		> litecoincash-cli createbees 5 true "MBA3cASkMpjqjn8NmbcfYRPHdzkPm6AYdW"
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createbees", "params": [12] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createbees", "params": [34 false "MBA3cASkMpjqjn8NmbcfYRPHdzkPm6AYdW"] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		

walletpassphrasehiveonly

		walletpassphrasehiveonly "passphrase"

		Stores the wallet decryption key in memory indefinitely for hive mining use only.
		This is needed to enable the hive mining thread to run. Performing other transactions related to
		private keys such as sending litecoincash, is not enabled and will require you to run
		walletpassphrase separately.

		Arguments:
		1. "passphrase"       (string, required) The wallet passphrase

		Examples:

		Unlock the wallet for hive mining only
		> litecoincash-cli walletpassphrasehiveonly "my pass phrase"

		As json rpc call
		> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "walletpassphrasehiveonly", "params": ["my pass phrase"] }' -H 'content-type: text/plain;' http://127.0.0.1:62457/
		


For more detailed information, please read our whitepaper: The Hive: Agent-Based Mining in Litecoin Cash