Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@xchainjs/xchain-bitcoincash
Advanced tools
Custom bitcoincash client and utilities used by XChainJS clients
@xchainjs/xchain-bitcoincash
client
- Custom client for communicating with Bitcoin Cash by using @psf/bitcoincashjs-libyarn add @xchainjs/xchain-bitcoincash
Following peer dependencies have to be installed into your project. These are not included in @xchainjs/xchain-bitcoincash
.
yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util axios @psf/bitcoincashjs-lib bchaddrjs
xchain bitcoincash
How xchain-bitcoincash works
How to use xchain-bitcoincash
This package uses the following service providers:
Function | Service | Notes |
---|---|---|
Balances | Haskoin | https://api.haskoin.com/#/Address/getBalance |
Transaction history | Haskoin | https://api.haskoin.com/#/Address/getAddressTxsFull |
Transaction details by hash | Haskoin | https://api.haskoin.com/#/Transaction/getTransaction |
Transaction fees | Bitgo | https://app.bitgo.com/docs/#operation/v2.tx.getfeeestimate |
Transaction broadcast | Bitcoin Cash Node | https://developer.bitcoin.org/reference/rpc/sendrawtransaction.html |
Explorer | Blockchain.com | https://www.blockchain.com/explorer?view=bch |
Haskoin API rate limits: No
Bitgo API rate limits: https://app.bitgo.com/docs/#section/Rate-Limiting (10 requests/second)
If you plan on using the publically accessible endpoints provided by Nine Realms(listed below), ensure that you add a valid 'x-client-id' to all requests
Example
import cosmosclient from '@cosmos-client/core'
import axios from 'axios'
import { register9Rheader } from '@xchainjs/xchain-util'
register9Rheader(axios)
register9Rheader(cosmosclient.config.globalAxios)
For a complete example please see this test
Creating a no-arg BCH Client will default to the following settings:
defaultBCHParams: UtxoClientParams = {
network: Network.Mainnet,
phrase: '',
explorerProviders: explorerProviders,
dataProviders: [HaskoinDataProviders],
rootDerivationPaths: {
[Network.Mainnet]: `m/44'/145'/0'/0/`,
[Network.Testnet]: `m/44'/1'/0'/0/`,
[Network.Stagenet]: `m/44'/145'/0'/0/`,
},
feeBounds: {
lower: LOWER_FEE_BOUND,
upper: UPPER_FEE_BOUND,
},
}
Note: Haskoin is the default online data provider (to fetch realtime utxos, balances, etc)
FAQs
Custom bitcoincash client and utilities used by XChainJS clients
We found that @xchainjs/xchain-bitcoincash demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.