diff --git a/README.md b/README.md index f636557..2bb467a 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ npm install bitgesell-core --save ### Examples #### Using network mode -The `network` will automatically determine the port to connect to, just like the `BGLd` and `bitcoin-cli` commands. +The `network` will automatically determine the port to connect to, just like the `BGLd` and `BGL-cli` commands. ```js const Client = require('bitgesell-core'); @@ -140,10 +140,10 @@ Since Bitgesell Core v0.1.10, it's possible to manage multiple wallets using a s Historically, the _accounts_ feature was supposed to offer similar functionality, but it has now been replaced by this more powerful feature. -To enable Multi Wallet support, start by specifying the number of added wallets you would like to have available and loaded on the server using the `-wallet` argument multiple times. For convenience, the bitgesell-core docker image will be used, but it's not a requirement: +To enable Multi Wallet support, start by specifying the number of added wallets you would like to have available and loaded on the server using the `-wallet` argument multiple times: ```sh -docker run --rm -it -p 18332:18332 ruimarinho/bitgesell-core:0.15-alpine \ +bin/BGLd \ -printtoconsole \ -server \ -rpcauth='foo:e1fcea9fb59df8b0388f251984fe85$26431097d48c5b6047df8dee64f387f63835c01a2a463728ad75087d0133b8e6' \ @@ -219,12 +219,12 @@ To avoid potential issues with prototype references, all methods are still enume Start the `BGLd` with the RPC server enabled and optionally configure a username and password: ```sh -docker run --rm -it ruimarinho/bitgesell-core:0.12-alpine -printtoconsole -rpcuser=foo -rpcpassword=bar -server +bin/BGLd -printtoconsole -rpcuser=foo -rpcpassword=bar -server ``` -These configuration values may also be set on the `bitcoin.conf` file of your platform installation. +These configuration values may also be set on the `BGL.conf` file of your platform installation. -By default, port `8332` is used to listen for requests in `mainnet` mode, or `18332` in `testnet` and `regtest` modes (the regtest change will be changed to `18443` in [0.16](https://github.com/bitcoin/bitcoin/pull/10825)). Use the `network` property to initialize the client on the desired mode and automatically set the respective default port. You can optionally set a custom port of your choice too. +By default, port `8454` is used to listen for requests in `mainnet` mode, or `18332` in `testnet` mode. Use the `network` property to initialize the client on the desired mode and automatically set the respective default port. You can optionally set a custom port of your choice too. The RPC services binds to the localhost loopback network interface, so use `rpcbind` to change where to bind to and `rpcallowip` to whitelist source IP access. @@ -436,7 +436,7 @@ npm test ## All contributions are welcome! -This is a fork of [bitcoin-core]() package +This is the Bitgesell RPC client maintained at [BitgesellOfficial/js-bitgesellcore-rpc](https://github.com/BitgesellOfficial/js-bitgesellcore-rpc). It is derived from the [bitcoin-core](https://github.com/ruimarinho/bitcoin-core) package. ## License -MIT \ No newline at end of file +MIT diff --git a/package-lock.json b/package-lock.json index 33aacb9..fa4efc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "bitcoin-core", - "version": "4.1.0", + "name": "bitgesell-core", + "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "bitcoin-core", - "version": "4.1.0", + "name": "bitgesell-core", + "version": "0.1.0", "license": "MIT", "dependencies": { "@uphold/request-logger": "^2.0.0", diff --git a/package.json b/package.json index 5335436..b0dbfc1 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "rest", "rpc" ], - "homepage": "https://github.com/naftalimurgor/bitgesell-core", - "bugs": "https://github.com/naftalimurgor/bitgesell-core/issues", + "homepage": "https://github.com/BitgesellOfficial/js-bitgesellcore-rpc#readme", + "bugs": "https://github.com/BitgesellOfficial/js-bitgesellcore-rpc/issues", "license": "MIT", "author": { "name": "Naftali Murgor", @@ -20,10 +20,10 @@ "main": "src/index.js", "repository": { "type": "git", - "url": "https://github.com/naftalimurgor/bitgesell-core.git" + "url": "https://github.com/BitgesellOfficial/js-bitgesellcore-rpc.git" }, "scripts": { - "changelog": "github_changelog_generator --project bitcoin-core --user ruimarinho --no-issues --header-label='# Changelog' --future-release=$npm_config_future_release && sed -i '' -e :a -e '$d;N;2,4ba' -e 'P;D' CHANGELOG.md", + "changelog": "github_changelog_generator --project js-bitgesellcore-rpc --user BitgesellOfficial --no-issues --header-label='# Changelog' --future-release=$npm_config_future_release && sed -i '' -e :a -e '$d;N;2,4ba' -e 'P;D' CHANGELOG.md", "cover": "nyc --reporter=html --reporter=text npm test", "dependencies": "docker-compose up -d BGLd BGLd-ssl BGLd-username-only", "lint": "eslint src test", diff --git a/test/package_metadata_test.js b/test/package_metadata_test.js new file mode 100644 index 0000000..63d4ee0 --- /dev/null +++ b/test/package_metadata_test.js @@ -0,0 +1,48 @@ + +/** + * Module dependencies. + */ + +const fs = require('fs'); +const path = require('path'); +const should = require('should'); + +/** + * Test package metadata and contributor-facing docs. + */ + +describe('Package metadata', () => { + it('should point package metadata at the official Bitgesell RPC client repository', () => { + const metadata = require('../package.json'); // eslint-disable-line global-require + const lock = require('../package-lock.json'); // eslint-disable-line global-require + + should(metadata.homepage).equal('https://github.com/BitgesellOfficial/js-bitgesellcore-rpc#readme'); + should(metadata.bugs).equal('https://github.com/BitgesellOfficial/js-bitgesellcore-rpc/issues'); + should(metadata.repository.url).equal('https://github.com/BitgesellOfficial/js-bitgesellcore-rpc.git'); + should(lock.name).equal(metadata.name); + should(lock.version).equal(metadata.version); + should(lock.packages[''].name).equal(metadata.name); + should(lock.packages[''].version).equal(metadata.version); + }); + + it('should not document retired fork or Docker image URLs', done => { + fs.readFile(path.join(__dirname, '..', 'README.md'), 'utf8', (error, readme) => { + if (error) { + done(error); + + return; + } + + try { + should(readme).not.containEql('github.com/naftalimurgor/bitgesell-core'); + should(readme).not.containEql('ruimarinho/bitgesell-core'); + should(readme).containEql('BitgesellOfficial/js-bitgesellcore-rpc'); + should(readme).containEql('port `8454`'); + should(readme).containEql('`BGL.conf`'); + done(); + } catch (assertionError) { + done(assertionError); + } + }); + }); +});