Skip to content

Commit

Permalink
Merge pull request #290 from nervosnetwork/rc/v0.15.1
Browse files Browse the repository at this point in the history
[ᚬmaster] Rc/v0.15.1
  • Loading branch information
ashchan authored Jul 11, 2019
2 parents e2aa259 + b86d95f commit 3cf00c7
Show file tree
Hide file tree
Showing 27 changed files with 346 additions and 113 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.15.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.15.0...v0.15.1) (2019-07-12)


### Bug Fixes

* **rpc:** fix the return type of get_transaction api ([a1a5cf4](https://github.com/nervosnetwork/ckb-sdk-js/commit/a1a5cf4))


### Features

* **utils:** remove toAddressIdentifier method ([ab1e356](https://github.com/nervosnetwork/ckb-sdk-js/commit/ab1e356))


### BREAKING CHANGES

* **utils:** remove toAddressIdentifier method





# [0.15.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.14.0...v0.15.0) (2019-06-29)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ After that you can use the `core` object to generate addresses, send requests, e

# RPC

Please see [Default RPC](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-rpc/src/defaultRPC.ts#L107)
Please see [Default RPC](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-rpc/src/defaultRPC.ts#L136)

# Errors

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.15.0"
"version": "0.15.1"
}
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.15.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.15.0...v0.15.1) (2019-07-12)

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





# [0.15.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.14.0...v0.15.0) (2019-06-29)


Expand Down
4 changes: 2 additions & 2 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.15.0",
"version": "0.15.1",
"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.15.0",
"@nervosnetwork/ckb-sdk-core": "0.15.1",
"blessed": "0.1.81",
"blessed-contrib": "4.8.16",
"commander": "2.20.0",
Expand Down
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.15.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.15.0...v0.15.1) (2019-07-12)

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





# [0.15.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.14.0...v0.15.0) (2019-06-29)

**Note:** Version bump only for package @nervosnetwork/ckb-sdk-address
Expand Down
2 changes: 1 addition & 1 deletion packages/ckb-sdk-address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Detailed methods could be found in `@nervosnetwork/ckb-sdk-utils`

The `address.value` is the address string generated by the private key and address configuration you passed to the constructor.

## Address Idenfitier
## Address identifier

The `address.identifier` represents the identity of the address object. It derives from the public key, and used to generate the human readable address value.

Expand Down
6 changes: 3 additions & 3 deletions packages/ckb-sdk-address/__tests__/ckb-sdk-address.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ describe('ckb-sdk-address', () => {
expect(address.value).toBe(fixture.address)
})

it('generate idenfitier with default configuration', () => {
it('generate identifier with default configuration', () => {
const fixture = {
privateKey: 'e79f3207ea4980b7fed79956d5934249ceac4751a4fae01a0f7c4a96884bc4e',
idenfitier: '2f663ae60e00153d223657c685a15604255b168b',
identifier: '2f663ae60e00153d223657c685a15604255b168b',
}
const address = new Address(fixture.privateKey)
expect(address.idenfitier).toBe(fixture.idenfitier)
expect(address.identifier).toBe(fixture.identifier)
})
})
6 changes: 3 additions & 3 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.15.0",
"version": "0.15.1",
"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.15.0",
"@nervosnetwork/ckb-types": "0.15.0"
"@nervosnetwork/ckb-sdk-utils": "0.15.1",
"@nervosnetwork/ckb-types": "0.15.1"
},
"gitHead": "77e21f208d5ad443801e758dc80c2ded32036c28"
}
4 changes: 2 additions & 2 deletions packages/ckb-sdk-address/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { hexToBytes, pubkeyToAddress, blake160, AddressPrefix, AddressType, Addre
class Address extends ECPair {
public value = ''

public idenfitier = ''
public identifier = ''

public constructor(
sk: Uint8Array | string,
Expand All @@ -33,7 +33,7 @@ class Address extends ECPair {
type,
binIdx,
})
this.idenfitier = blake160(this.publicKey as string, 'hex')
this.identifier = blake160(this.publicKey as string, 'hex')
}
}

Expand Down
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.15.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.15.0...v0.15.1) (2019-07-12)

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





# [0.15.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.14.0...v0.15.0) (2019-06-29)


Expand Down
6 changes: 3 additions & 3 deletions packages/ckb-sdk-core/examples/sendTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const bootstrap = async () => {

const script = {
codeHash: SYSTEM_ENCRYPTION_CODE_HASH,
args: [`0x${myAddressObj.idenfitier}`],
args: [`0x${myAddressObj.identifier}`],
}
/**
* to see the lock script
Expand Down Expand Up @@ -152,7 +152,7 @@ const bootstrap = async () => {
capacity: 0n,
lock: {
codeHash: SYSTEM_ENCRYPTION_CODE_HASH,
args: [`0x${myAddressObj.idenfitier}`],
args: [`0x${myAddressObj.identifier}`],
},
data: '0x',
}
Expand Down Expand Up @@ -218,7 +218,7 @@ const bootstrap = async () => {
/**
* send transaction
*/
const tx = await generateTransaction(`0x${myAddressObj.idenfitier}`, 6000000000) // generate the raw transaction with empty witnesses
const tx = await generateTransaction(`0x${myAddressObj.identifier}`, 6000000000) // generate the raw transaction with empty witnesses
const signedTx = await core.signTransaction(myAddressObj)(tx)
/**
* to see the signed transaction
Expand Down
10 changes: 5 additions & 5 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.15.0",
"version": "0.15.1",
"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,10 +29,10 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-address": "0.15.0",
"@nervosnetwork/ckb-sdk-rpc": "0.15.0",
"@nervosnetwork/ckb-sdk-utils": "0.15.0",
"@nervosnetwork/ckb-types": "0.15.0"
"@nervosnetwork/ckb-sdk-address": "0.15.1",
"@nervosnetwork/ckb-sdk-rpc": "0.15.1",
"@nervosnetwork/ckb-sdk-utils": "0.15.1",
"@nervosnetwork/ckb-types": "0.15.1"
},
"devDependencies": {
"@types/crypto-js": "3.1.43"
Expand Down
11 changes: 11 additions & 0 deletions packages/ckb-sdk-rpc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.15.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.15.0...v0.15.1) (2019-07-12)


### Bug Fixes

* **rpc:** fix the return type of get_transaction api ([a1a5cf4](https://github.com/nervosnetwork/ckb-sdk-js/commit/a1a5cf4))





# [0.15.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.14.0...v0.15.0) (2019-06-29)


Expand Down
16 changes: 16 additions & 0 deletions packages/ckb-sdk-rpc/__tests__/formatters/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@
"cell": null,
"block_hash": null
}
},
{
"source": {
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"target": {
"cell": null,
"block_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
{
"source": {},
"target": {
"cell": null,
"block_hash": null
}
}
],
"toNumber": [
Expand Down
80 changes: 76 additions & 4 deletions packages/ckb-sdk-rpc/__tests__/formatters/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
},
{
"source": {
"block_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"cell": null
"block_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"target": {
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand All @@ -137,9 +136,21 @@
},
{
"source": {
"block_hash": null,
"cell": null
"cell": {
"tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"index": "4294967295"
}
},
"target": {
"blockHash": null,
"cell": {
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"index": "4294967295"
}
}
},
{
"source": {},
"target": {
"blockHash": null,
"cell": null
Expand Down Expand Up @@ -206,6 +217,21 @@
"version": "0",
"witnesses": []
}
},
{
"source": {
"hash": "0x8027376875e45318ed469bed6314408e8f1986de246cbd03a786b69073c948b8",
"version": "0",
"witnesses": []
},
"target": {
"deps": [],
"hash": "0x8027376875e45318ed469bed6314408e8f1986de246cbd03a786b69073c948b8",
"inputs": [],
"outputs": [],
"version": "0",
"witnesses": []
}
}
],
"toUncleBlock": [
Expand Down Expand Up @@ -362,6 +388,52 @@
],
"uncles": []
}
},
{
"source": {
"header": {
"difficulty": "0x100",
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"epoch": "0",
"parent_hash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposals_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
},
"timestamp": "1556199760706",
"transactions_root": "0x8027376875e45318ed469bed6314408e8f1986de246cbd03a786b69073c948b8",
"uncles_count": "0",
"uncles_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"version": "0",
"witnesses_root": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"proposals": []
},
"target": {
"header": {
"difficulty": "0x100",
"hash": "0xe5f2d07b747f38718293987a9175764d4c03229a8a69d0bd48f7bea6c18930b1",
"number": "2",
"epoch": "0",
"parentHash": "0xa1dba96cdebaa25f2be69316c943269e23c23fcc6e90eedd94ecd88b43f77170",
"proposalsHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"seal": {
"nonce": "9828930232171500901",
"proof": "0x7408000066230000942c00004735000028420000f046000059550000d56200005f640000f96a000043730000d3750000"
},
"timestamp": "1556199760706",
"transactionsRoot": "0x8027376875e45318ed469bed6314408e8f1986de246cbd03a786b69073c948b8",
"unclesCount": "0",
"unclesHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"version": "0",
"witnessesRoot": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"proposals": [],
"transactions": [],
"uncles": []
}
}
],
"toAlertMessage": [
Expand Down
6 changes: 3 additions & 3 deletions packages/ckb-sdk-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-sdk-rpc",
"version": "0.15.0",
"version": "0.15.1",
"description": "RPC module of @nervosnetwork/ckb-sdk-core",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js/packages/ckb-rpc#readme",
Expand Down Expand Up @@ -32,11 +32,11 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-utils": "0.15.0",
"@nervosnetwork/ckb-sdk-utils": "0.15.1",
"axios": "0.19.0"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "0.15.0",
"@nervosnetwork/ckb-types": "0.15.1",
"@types/crypto-js": "3.1.43"
},
"gitHead": "77e21f208d5ad443801e758dc80c2ded32036c28"
Expand Down
Loading

0 comments on commit 3cf00c7

Please sign in to comment.