Skip to content

Commit

Permalink
Merge pull request #320 from nervosnetwork/rc/v0.18.0
Browse files Browse the repository at this point in the history
[ᚬmaster] Release v0.18.0
  • Loading branch information
Keith-CY authored Aug 10, 2019
2 parents 68463b2 + ca4a98b commit 34f199d
Show file tree
Hide file tree
Showing 22 changed files with 446 additions and 130 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.18.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.1...v0.18.0) (2019-08-10)


### Features

* **rpc:** add get_cellbase_output_capacity_details rpc ([fa3aea3](https://github.com/nervosnetwork/ckb-sdk-js/commit/fa3aea3))
* **rpc:** add get_header rpc ([d2a6bbb](https://github.com/nervosnetwork/ckb-sdk-js/commit/d2a6bbb))
* **rpc:** add get_header_by_number rpc ([54f9d19](https://github.com/nervosnetwork/ckb-sdk-js/commit/54f9d19))
* **rpc:** add new rpc of set ban ([416e7fd](https://github.com/nervosnetwork/ckb-sdk-js/commit/416e7fd))
* **rpc:** add rpc of get banned addresses ([323b8ac](https://github.com/nervosnetwork/ckb-sdk-js/commit/323b8ac))





## [0.17.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.0...v0.17.1) (2019-07-29)


Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "0.17.1"
"version": "0.18.0"
}
8 changes: 8 additions & 0 deletions packages/ckb-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.18.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.1...v0.18.0) (2019-08-10)

**Note:** Version bump only for package @nervosnetwork/ckb-cli





## [0.17.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.0...v0.17.1) (2019-07-29)

**Note:** Version bump only for package @nervosnetwork/ckb-cli
Expand Down
6 changes: 3 additions & 3 deletions packages/ckb-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-cli",
"version": "0.17.1",
"version": "0.18.0",
"description": "Command line package based on @nervosnetwork/ckb-sdk-core",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js#readme",
Expand Down Expand Up @@ -34,7 +34,7 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-core": "0.17.1",
"@nervosnetwork/ckb-sdk-core": "0.18.0",
"blessed": "0.1.81",
"blessed-contrib": "4.8.16",
"commander": "2.20.0",
Expand All @@ -45,5 +45,5 @@
"@types/crypto-js": "3.1.43",
"@types/inquirer": "6.0.0"
},
"gitHead": "9862d5b3582be18a4af9e2d4ab34f069f5e15efb"
"gitHead": "6665c3cecb0a2b242722a58d83c8ac420ba0107b"
}
8 changes: 8 additions & 0 deletions packages/ckb-sdk-address/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.18.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.1...v0.18.0) (2019-08-10)

**Note:** Version bump only for package @nervosnetwork/ckb-sdk-address





## [0.17.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.0...v0.17.1) (2019-07-29)

**Note:** Version bump only for package @nervosnetwork/ckb-sdk-address
Expand Down
8 changes: 4 additions & 4 deletions packages/ckb-sdk-address/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-sdk-address",
"version": "0.17.1",
"version": "0.18.0",
"description": "Address module of @nervosnetwork/ckb-sdk-core",
"keywords": [
"CKB",
Expand Down Expand Up @@ -33,8 +33,8 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-utils": "0.17.1",
"@nervosnetwork/ckb-types": "0.17.1"
"@nervosnetwork/ckb-sdk-utils": "0.18.0",
"@nervosnetwork/ckb-types": "0.18.0"
},
"gitHead": "9862d5b3582be18a4af9e2d4ab34f069f5e15efb"
"gitHead": "6665c3cecb0a2b242722a58d83c8ac420ba0107b"
}
8 changes: 8 additions & 0 deletions packages/ckb-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.18.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.1...v0.18.0) (2019-08-10)

**Note:** Version bump only for package @nervosnetwork/ckb-sdk-core





## [0.17.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.0...v0.17.1) (2019-07-29)


Expand Down
12 changes: 6 additions & 6 deletions packages/ckb-sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-sdk-core",
"version": "0.17.1",
"version": "0.18.0",
"description": "JavaScript SDK for Nervos Network CKB Project",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js#readme",
Expand Down Expand Up @@ -29,13 +29,13 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-address": "0.17.1",
"@nervosnetwork/ckb-sdk-rpc": "0.17.1",
"@nervosnetwork/ckb-sdk-utils": "0.17.1",
"@nervosnetwork/ckb-types": "0.17.1"
"@nervosnetwork/ckb-sdk-address": "0.18.0",
"@nervosnetwork/ckb-sdk-rpc": "0.18.0",
"@nervosnetwork/ckb-sdk-utils": "0.18.0",
"@nervosnetwork/ckb-types": "0.18.0"
},
"devDependencies": {
"@types/crypto-js": "3.1.43"
},
"gitHead": "9862d5b3582be18a4af9e2d4ab34f069f5e15efb"
"gitHead": "6665c3cecb0a2b242722a58d83c8ac420ba0107b"
}
15 changes: 15 additions & 0 deletions packages/ckb-sdk-rpc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.18.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.1...v0.18.0) (2019-08-10)


### Features

* **rpc:** add get_cellbase_output_capacity_details rpc ([fa3aea3](https://github.com/nervosnetwork/ckb-sdk-js/commit/fa3aea3))
* **rpc:** add get_header rpc ([d2a6bbb](https://github.com/nervosnetwork/ckb-sdk-js/commit/d2a6bbb))
* **rpc:** add get_header_by_number rpc ([54f9d19](https://github.com/nervosnetwork/ckb-sdk-js/commit/54f9d19))
* **rpc:** add new rpc of set ban ([416e7fd](https://github.com/nervosnetwork/ckb-sdk-js/commit/416e7fd))
* **rpc:** add rpc of get banned addresses ([323b8ac](https://github.com/nervosnetwork/ckb-sdk-js/commit/323b8ac))





## [0.17.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.17.0...v0.17.1) (2019-07-29)


Expand Down
4 changes: 2 additions & 2 deletions packages/ckb-sdk-rpc/__tests__/ckb-rpc-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ describe('ckb-rpc settings and helpers', () => {
expect(rpc.node).toEqual(node)
})

it('has 22 default rpc', () => {
expect(rpc.methods.length).toBe(22)
it('has 27 default rpc', () => {
expect(rpc.methods.length).toBe(27)
})

it('set node url to http://test.localhost:8114', () => {
Expand Down
30 changes: 30 additions & 0 deletions packages/ckb-sdk-rpc/__tests__/ckb-rpc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,36 @@ describe('ckb-rpc success', () => {
it('get transactions by lock hash', async () => {})

it('index lock hash', async () => {})

it('get banned addresses', async () => {
const addresses = await rpc.getBannedAddresses()
expect(Array.isArray(addresses)).toBe(true)
})

it('set address to be banned', async () => {
expect.assertions(1)
await expect(rpc.setBan('192.168.0.2', 'insert', null)).resolves.toEqual(null)
})

it('get banned address', async () => {
const addresses = await rpc.getBannedAddresses()
expect(Array.isArray(addresses)).toBe(true)
})

it('get header', async () => {
const zeroBlock = await rpc.getBlockByNumber('0')
const zeroBlockHeader = zeroBlock.header
const zeroBlockHash = zeroBlockHeader.hash
const header = await rpc.getHeader(zeroBlockHash)
expect(header).toEqual(zeroBlockHeader)
})

it('get header by number', async () => {
const zeroBlock = await rpc.getBlockByNumber('0')
const zeroBlockHeader = zeroBlock.header
const header = await rpc.getHeaderByNumber('0')
expect(header).toEqual(zeroBlockHeader)
})
})

describe('send transaction', () => {
Expand Down
Loading

0 comments on commit 34f199d

Please sign in to comment.