Installation
Using npm:
npm install phore-rpc --save
In Node.js:
const phorerpc = ;phorerpc // input a number (e.g. 5) of blocks within which the transaction needs to be included - returns an estimate of the fee per kilobyte for the transactionphorerpc //input a number (e.g. 5) of blocks the transaction may wait before being included as a free high-priority transaction - returns an estimate of the priority that a transaction needsphorerpc // no parameter - returns a hash from the tip of the best block chainphorerpcphorerpc // input a number that represents the block height index of the block to get back its hash - an index of 0 returns the genesis block, which has a hash of '2b1a0f66712aad59ad283662d5b919415a25921ce89511d73019107e380485bf'phorerpc // no parameter - returns an object with network info such as blocks, headers, bestblockhashphorerpc // no parameter - returns current blocks height (i.e. # of blocks)phorerpc // input a block hash - returns just the header info for that blockphorerpc // no parameter - returns an array of blocks with their height, hash, branchlen and statusphorerpc // no parameter - returns the number of connections to other nodesphorerpc // no parameter - returns a difficulty score as multiple of the minimum difficultyphorerpc // no parameter - returns information about the node and the networkphorerpc // no parameter - returns information about the current state of the mempoolphorerpc // no parameter - returns info about the networkphorerpc // no parameter - returns the estimated current or historical network hashes per second based on the last n blocksphorerpc // no parameter - returns an array of info about what is in the Mem Pool or an empty array if nothing is in the Mem Poolphorerpc // input a txId (transaction id) - returns details of that transactionphorerpc // input a txId (transaction id) - returns the value of any unspent UTXO'sphorerpc // no parameter - returns statistics about the unspent transaction output (UTXO) setphorerpc // no parameter - returns nullphorerpc // input the new block in a serialized hex format and this submits it to the network and returns resultphorerpc // no parameter - returns a list of master nodesphorerpc // input the txHex obtained from creating a transaction using bitcoinjs-phore - broadcasts the transaction to the network and returns result