Skip to content

Commit

Permalink
Merge pull request #28 from gridcat/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
gridcat authored Jul 9, 2021
2 parents a0906b4 + 8cf47a4 commit 6f9278c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 34 deletions.
26 changes: 20 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ jobs:
name: Run tests
command: npm run test:prod

lint_commit_message:
<<: *defaults
steps:
- attach_workspace:
at: ~/grc
- run:
name: Define environment variable with lastest commit's message
command: |
echo 'export COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")' >> $BASH_ENV
source $BASH_ENV
- run:
name: Lint commit message
command: echo "$COMMIT_MESSAGE" | npx commitlint

deploy-npm:
<<: *defaults
steps:
Expand Down Expand Up @@ -68,27 +82,26 @@ workflows:
filters:
branches:
ignore: gh-pages
- test:
- lint_commit_message:
filters:
branches:
ignore: gh-pages
requires:
- build
- deploy-docs:
- test:
filters:
branches:
only: master
ignore: gh-pages
requires:
- build
- test
- deploy-beta:
- deploy-docs:
filters:
branches:
only: beta
only: master
ignore: gh-pages
requires:
- build
- lint_commit_message
- test
- deploy-npm:
filters:
Expand All @@ -97,4 +110,5 @@ workflows:
ignore: gh-pages
requires:
- build
- lint_commit_message
- test
6 changes: 3 additions & 3 deletions src/RPC/Developer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export class Developer extends RPCBase {
* @description
* Before invoking this command, import the master key used to sign and verify
* transactions that contain administrative contracts. The label is optional:
* importprivkey <private_key_hex> master
* importprivkey *private_key_hex* master
* Send some coins to the master key address if necessary:
* sendtoaddress <address> <amount>
* sendtoaddress *address* <amount>
* To whitelist a project:
* addkey add project projectname url
* To de-whitelist a project:
Expand Down Expand Up @@ -155,7 +155,7 @@ export class Developer extends RPCBase {
}

/**
* logging [json array category adds] [json array category removes]
* logging *json array category adds* *json array category removes*
* Gets and sets the logging configuration.
* When called without an argument, returns the list of categories with status that are currently being debug logged or not.
* When called with arguments, adds or removes categories from debug logging and return the lists above.
Expand Down
2 changes: 1 addition & 1 deletion src/RPC/Mining.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Mining extends RPCBase {
}

/**
* Displays information about your beacon or the beacon for [cpid].
* Displays information about your beacon or the beacon for *cpid*.
*
* @param {CPID} [cpid]
* @returns {Promise<BeaconStatusCollection>}
Expand Down
8 changes: 4 additions & 4 deletions src/RPC/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type addNodeCommand = 'add' | 'remove' | 'onetry';

export class Network extends RPCBase {
/**
* Attempts add or remove <node> from the addnode list or try a connection to <node> once
* Attempts add or remove *node* from the addnode list or try a connection to *node* once
*
* RPC command will always return { result: 'ok' }
*
Expand Down Expand Up @@ -141,7 +141,7 @@ export class Network extends RPCBase {
}

/**
* Returns hash of block in best-block-chain at <index>
* Returns hash of block in best-block-chain at *index*
*
* @param {index} block - Block number for requested hash
* @returns {Promise<string>}
Expand Down Expand Up @@ -313,7 +313,7 @@ export class Network extends RPCBase {
*
* @param {string} subnet - The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)
* @param {('add' | 'remove')} command - 'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list
* @param {number} [banTime] - time in seconds how long (or until when if [absolute] is set) the IP is banned
* @param {number} [banTime] - time in seconds how long (or until when if *absolute* is set) the IP is banned
* (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
* @param {number | false} [absolute] - Defaults to false. If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT).
* @returns {Promise<null>}
Expand All @@ -329,7 +329,7 @@ export class Network extends RPCBase {
}

/**
* Returns all information about the block at <index>
* Returns all information about the block at *index*
*
* @param {number} index - Block number
* @returns {Promise<Block>}
Expand Down
2 changes: 1 addition & 1 deletion src/RPC/Voting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export abstract class Voting extends RPCBase {
/**
* Add a poll to the network.
* Requires 100K GRC balance. Costs 50 GRC.
* Provide an empty string for <answers> when choosing "yes/no/abstain" for <responsetype>.
* Provide an empty string for *answers* when choosing "yes/no/abstain" for *responsetype*.
*
* @param {string} title - Title for the poll
* @param {number} days - Number of days that the poll will run
Expand Down
36 changes: 18 additions & 18 deletions src/RPC/Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class Wallet extends RPCBase {
/**
* Creates a transaction that will send the given amount (rounded to 0.00000001) to no one making the coins disappear permanently.
* No one can get back the coins spent by this command.
* If [hex string] is specified, it will add on to the script used in the transaction.
* If *hex string* is specified, it will add on to the script used in the transaction.
*
* Requires the wallet to be fully unlocked
*
Expand Down Expand Up @@ -220,7 +220,7 @@ export class Wallet extends RPCBase {
/**
* Returns the current Gridcoin address for receiving payments to this account.
* @description
* If <account> does not exist, it will be created along with an associated new address that will be returned.
* If account does not exist, it will be created along with an associated new address that will be returned.
*
* @param {string} account - an account name
* @returns {Promise<Address>} - GRC address
Expand Down Expand Up @@ -282,7 +282,7 @@ export class Wallet extends RPCBase {
* Returns a new Gridcoin address for receiving payments.
* @description
* If [account] is specified, it is added to the address book
* so payments received with the address will be credited to [account].
* so payments received with the address will be credited to *account*.
*
* @param {string} [account]
* @returns {Promise<string>}
Expand Down Expand Up @@ -319,7 +319,7 @@ export class Wallet extends RPCBase {
}

/**
* Get a string that is serialized, hex-encoded data for <txid> from the wallet.
* Get a string that is serialized, hex-encoded data for txid from the wallet.
*
* @param {TX} txid
* @returns {Promise<string>}
Expand All @@ -330,8 +330,8 @@ export class Wallet extends RPCBase {
}

/**
* Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations.
* If [account] not provided return will include all transactions to all accounts.
* Returns the total amount received by addresses with *account* in transactions with at least *minconf* confirmations.
* If *account* not provided return will include all transactions to all accounts.
*
* @param {string} account - the account name
* @param {number} [minconf=1] - the minimum number of confirmations
Expand All @@ -344,7 +344,7 @@ export class Wallet extends RPCBase {
}

/**
* Returns the amount received by <gridcoinaddress> in transactions with at least [minconf] confirmations.
* Returns the amount received by gridcoinaddress in transactions with at least *minconf* confirmations.
* @description
* It correctly handles the case where someone has sent to the address in multiple transactions.
* Keep in mind that addresses are only ever used for receiving transactions.
Expand All @@ -363,7 +363,7 @@ export class Wallet extends RPCBase {
}

/**
* Get detailed information about in-wallet transaction <txid>
* Get detailed information about in-wallet transaction txid
*
* @param {TX} txid - The transaction id
* @param {boolean} [includeWatchOnly=false] - Whether to include watchonly addresses in balance calculation and details
Expand Down Expand Up @@ -463,7 +463,7 @@ export class Wallet extends RPCBase {
}

/**
* Get all transactions in blocks since block [blockhash], or all transactions if omitted
* Get all transactions in blocks since block *blockhash*, or all transactions if omitted
*
* @param {string} [blockHash] - The block hash to list transactions since
* @param {number} [targetConfirmations] - The confirmations required, must be 1 or more
Expand Down Expand Up @@ -638,7 +638,7 @@ export class Wallet extends RPCBase {
}

/**
* Sends <amount> of Gridcoin from <account> to <gridcoinaddress>.
* Sends *amount* of Gridcoin from *account* to *gridcoinaddress*.
*
* @param {string} account - Account FROM
* @param {Address} address - Address TO
Expand Down Expand Up @@ -672,7 +672,7 @@ export class Wallet extends RPCBase {
}

/**
* Send from <fromaccount> to a list of addresses.
* Send from *fromaccount* to a list of addresses.
* Use '' if you don’t want to limit to one account label. Addresses should be listed in JSON format.
*
* @param {string} account - - Account FROM
Expand Down Expand Up @@ -709,7 +709,7 @@ export class Wallet extends RPCBase {
}

/**
* Sends <amount> of Gridcoin to <gridcoinaddress>.
* Sends amount of Gridcoin to gridcoinaddress.
*
* @param {Address} address - Recipient address
* @param {number} amount - is a real and is rounded to the nearest 0.000001
Expand Down Expand Up @@ -761,7 +761,7 @@ export class Wallet extends RPCBase {
}

/**
* Returns a signed a message using the private key from <Gridcoinaddress>.
* Returns a signed a message using the private key from *Gridcoinaddress*.
* Lets you prove that this message came from the owner of an address.
* You can verify a signed message with the verify message command.
* (It will not send this message anywhere. You have to do that)
Expand Down Expand Up @@ -802,7 +802,7 @@ export class Wallet extends RPCBase {
}

/**
* Return information about <gridcoinaddress>.
* Return information about *gridcoinaddress*.
* @description
* The validateaddress RPC accepts a block
* verifies it is a valid addition to the block chain
Expand All @@ -817,7 +817,7 @@ export class Wallet extends RPCBase {
}

/**
* Return information about <gridcoinpubkey>.
* Return information about *gridcoinpubkey*.
*
* @param {PublicKey} gridcoinPubkey
* @returns {Promise<IAddress>}
Expand Down Expand Up @@ -860,8 +860,8 @@ export class Wallet extends RPCBase {
}

/**
* Stores the wallet decryption key in memory for <timeout> seconds.
* if [stakingonly] is true sending functions are disabled.
* Stores the wallet decryption key in memory for *timeout* seconds.
* if *stakingonly* is true sending functions are disabled.
*
* @param {string} passphrase
* @param {number} timeout
Expand All @@ -874,7 +874,7 @@ export class Wallet extends RPCBase {
}

/**
* Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>
* Changes the wallet passphrase from *oldpassphrase* to *newpassphrase*
*
* @param {string} oldPassphrase
* @param {string} newPassphrase
Expand Down
1 change: 0 additions & 1 deletion src/RPCBase.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import assert from 'assert';
import camelcaseKeys from 'camelcase-keys';
import { RPCError } from './Errors/RpcError';
import JsonRPC, { IJsonRPC, IParameters } from './lib/JsonRPC';
Expand Down

0 comments on commit 6f9278c

Please sign in to comment.