Download the PHP package amashukov/bchn-rpc-client-php without Composer

On this page you can find all versions of the php package amashukov/bchn-rpc-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bchn-rpc-client-php

amashukov/bchn-rpc-client-php

Typed JSON-RPC client for Bitcoin Cash Node (BCHN) in pure PHP over any PSR-18 client — wallet, UTXO, PSBT, raw-transaction and DSProof calls in the BCHN dialect, exact satoshi amounts.

CI PHPStan L9 Latest Version Downloads PHP Stars

A typed client for the Bitcoin Cash Node JSON-RPC API (tested against BCHN v29.2.0) built on any PSR-18 HTTP client. BCHN shares its RPC heritage with Bitcoin Core but its signatures differ — createwallet takes four parameters, getnewaddress has no address type, lockunspent has no persistent flag, sendrawtransaction / testmempoolaccept take a boolean allowhighfees instead of a max fee rate, sighash types carry FORKID, there is estimatefee instead of estimatesmartfee, and outputs may carry CashTokens tokenData. This client follows the BCHN signatures exactly and returns final readonly Value Objects. Every JSON number is read as a string before decoding, so BCH amounts become exact integer satoshis (BchAmount) and never pass through a float.

Features

Installation

Usage

Methods

Method BCHN call
getBlockchainInfo() getblockchaininfo
getWalletInfo() getwalletinfo
createWallet(name, disablePrivateKeys, blank, passphrase) createwallet
loadWallet(name) loadwallet
getNewAddress(label) getnewaddress
getAddressInfo(address) getaddressinfo
listSinceBlock(blockHash, targetConfirmations, includeWatchOnly, includeRemoved, includeChange, label) listsinceblock
listUnspent(minconf, maxconf, addresses, includeUnsafe, includeTokens) listunspent
listLockUnspent() / lockUnspent(unlock, outpoints) listlockunspent / lockunspent
getTransaction(txid, includeWatchOnly) gettransaction
getRawTransaction(txid, blockHash) getrawtransaction (verbosity 2, falls back to 1 when prevouts are unavailable)
getMempoolEntry(txid) getmempoolentry (null when not in the mempool)
decodeRawTransaction(hex) decoderawtransaction
getTxOut(txid, vout, includeMempool) gettxout (null when spent)
createPsbt / walletProcessPsbt / finalizePsbt / decodePsbt PSBT calls
testMempoolAccept(hex, allowHighFees) / sendRawTransaction(hex, allowHighFees) broadcast
estimateFee() estimatefee, converted to sat/byte
walletPassphrase / walletLock / backupWallet wallet security
getDsProofScore(txid) getdsproofscore

BCHN has no getbalances; the confirmed, unconfirmed and immature balances come from getWalletInfo().

Requirements

Related packages

Package Role
amashukov/cashaddr-php CashAddr codec and typed address value object
amashukov/bitcoin-cash-php Bitcoin Cash meta-package
amashukov/http-client-php PSR-18 cURL client + retry / header-injection middleware

Quality

License

MIT — see LICENSE.


All versions of bchn-rpc-client-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package amashukov/bchn-rpc-client-php contains the following files

Loading the files please wait ...