Skip to content

Commit

Permalink
Merge PR #918 from 'nodech/wallet-doc-updates'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Jan 15, 2025
2 parents 343525a + 0205dce commit 886f651
Show file tree
Hide file tree
Showing 21 changed files with 846 additions and 602 deletions.
142 changes: 0 additions & 142 deletions .eslintrc.json

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ jobs:
- name: Setup
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- name: Install dependencies
run: npm install --location=global bslint @hns-dev/bsdoc

- name: Install bslintrc
run: npm install bslintrc

- name: Lint
run: npm run lint

Expand All @@ -34,7 +37,7 @@ jobs:
- name: Setup
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libunbound-dev |
Expand Down
54 changes: 54 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

const rc = require('bslintrc');

module.exports = [
rc.configs.recommended,
rc.configs.bcoin,
{
languageOptions: {
globals: {
...rc.globals.node
},
ecmaVersion: 'latest'
}
},
{
files: [
'bin/cli',
'bin/hsd',
'bin/node',
'bin/hs-seeder',
'bin/node',
'bin/_seeder',
'bin/spvnode',
'bin/wallet',
'bin/hsd-cli',
'bin/hsw-cli',
'etc/genesis',
'**/*.cjs',
'**/*.mjs',
'**/*.js',
'*.js',
'*.mjs',
'*.cjs'
],
languageOptions: {
sourceType: 'commonjs'
}
},
{
files: ['test/{,**/}*.{js,cjs,mjs}'],
languageOptions: {
globals: {
...rc.globals.mocha,
register: 'readable'
}
},
rules: {
'max-len': 'off',
'prefer-arrow-callback': 'off',
'no-return-assign': 'off'
}
}
];
4 changes: 2 additions & 2 deletions lib/coins/coinview.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class CoinView extends View {
* Get an HD path by prevout.
* Implemented in {@link WalletCoinView}.
* @param {Outpoint} prevout
* @returns {null}
* @returns {*}
*/

getPath(prevout) {
Expand Down Expand Up @@ -404,7 +404,7 @@ class CoinView extends View {
* Get a single path by input.
* Implemented in {@link WalletCoinView}.
* @param {Input} input
* @returns {null}
* @returns {*}
*/

getPathFor(input) {
Expand Down
2 changes: 1 addition & 1 deletion lib/hd/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ common.isMaster = function isMaster(key) {
/**
* Test whether the key is (most likely) a BIP44 account key.
* @param {HDPrivateKey|HDPublicKey} key
* @param {Number?} account
* @param {Number?} [account]
* @returns {Boolean}
*/

Expand Down
2 changes: 1 addition & 1 deletion lib/hd/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class HDPublicKey extends bio.Struct {
/**
* Test whether the key is (most likely) a BIP44 account key.
* @method
* @param {Number?} account
* @param {Number?} [account]
* @returns {Boolean}
*/

Expand Down
1 change: 1 addition & 0 deletions lib/primitives/coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class Coin extends Output {
* @param {TX} tx
* @param {Number} index
* @param {Number} height
* @returns {this}
*/

fromTX(tx, index, height) {
Expand Down
1 change: 1 addition & 0 deletions lib/primitives/keyring.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class KeyRing extends bio.Struct {
/**
* Inject data from private key.
* @param {Buffer} key
* @returns {this}
*/

fromPrivate(key) {
Expand Down
Loading

0 comments on commit 886f651

Please sign in to comment.