Skip to content

Commit

Permalink
Merge pull request #377 from nervosnetwork/rc/v0.24.0
Browse files Browse the repository at this point in the history
[ᚬmaster] Rc/v0.24.0
  • Loading branch information
Keith-CY authored Nov 2, 2019
2 parents 38424f4 + 1191280 commit a73efb8
Show file tree
Hide file tree
Showing 39 changed files with 704 additions and 788 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:

script:
- lerna run tsc
- yarn run test utils formatters address
- yarn run test utils formatters core

after_success:
- yarn run docs
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.24.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.23.1...v0.24.0) (2019-11-02)


### Features

* **core:** include fee in generateTransaction method ([03153f6](https://github.com/nervosnetwork/ckb-sdk-js/commit/03153f6ee17f202e31ac0972318a10d8b71e76eb))
* **rpc:** add a rpc method ([928aaf9](https://github.com/nervosnetwork/ckb-sdk-js/commit/928aaf905bbc73165044f05c5c94c316665a773a))
* **core:** sign inputs in group ([294f59c](https://github.com/nervosnetwork/ckb-sdk-js/commit/294f59cb9505d90aa5e8faa00a63a39fab58fd0b))


### BREAKING CHANGES

* **core:** sign inputs in group





## [0.23.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.23.0...v0.23.1) (2019-10-22)


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

## Default RPC

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

## Persistent Connection

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.23.1"
"version": "0.24.0"
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
"devDependencies": {
"@cryptape/sdk-ts-config": "0.0.1",
"@types/node": "12.7.3",
"@typescript-eslint/eslint-plugin": "2.0.0",
"@typescript-eslint/parser": "2.0.0",
"@typescript-eslint/eslint-plugin": "2.5.0",
"@typescript-eslint/parser": "2.5.0",
"commitizen": "4.0.3",
"cz-conventional-changelog": "3.0.2",
"dotenv": "8.1.0",
"eslint": "6.3.0",
"eslint": "6.5.1",
"eslint-config-airbnb-base": "14.0.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "22.16.0",
"eslint-plugin-jest": "22.20.0",
"eslint-plugin-prettier": "3.1.0",
"husky": "3.0.5",
"jest": "24.9.0",
"lerna": "3.16.4",
"lint-staged": "9.2.5",
"prettier": "1.18.2",
"typedoc": "0.15.0",
"typescript": "3.6.2"
"typescript": "3.7.0-beta"
},
"config": {
"commitizen": {
Expand Down
17 changes: 17 additions & 0 deletions packages/ckb-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.24.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.23.1...v0.24.0) (2019-11-02)


### Features

* **core:** include fee in generateTransaction method ([03153f6](https://github.com/nervosnetwork/ckb-sdk-js/commit/03153f6ee17f202e31ac0972318a10d8b71e76eb))
* **core:** sign inputs in group ([294f59c](https://github.com/nervosnetwork/ckb-sdk-js/commit/294f59cb9505d90aa5e8faa00a63a39fab58fd0b))


### BREAKING CHANGES

* **core:** sign inputs in group





## [0.23.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.23.0...v0.23.1) (2019-10-22)

**Note:** Version bump only for package @nervosnetwork/ckb-sdk-core
Expand Down
35 changes: 19 additions & 16 deletions packages/ckb-sdk-core/__mocks__/data/genesisBlock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"header": {
"compactTarget": "0x20010000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x05379548525d2b456106ab26547bfe9ffec8dbfd6b00dcf4924656e4de8f909a",
"transactionsRoot": "0x62409e49bd6e72715ac1173f1dc2cf04ea2cf06e745f84db40f3ff731d13e99c",
"proposalsHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"unclesHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"dao": "0x00e9ab15a68407000000c16ff2862300000000000000000000e3bad4847a0100",
"dao": "0x045053edef8407000000c16ff286230066cbed490e00000000636dbb937a0100",
"epoch": "0x0",
"hash": "0xe49352ee4984694d88eb3c1493a33d69d61c786dc5b0a32c4b3978d4fad64379",
"hash": "0xec599b3c2612a1ced3826bdc24894b2036e6fbfe648fe6624ce7707b0da52a58",
"nonce": "0x0",
"number": "0x0",
"timestamp": "0x0",
Expand Down Expand Up @@ -47,7 +47,7 @@
"hashType": "type",
"args": "0x8536c9d5d908bd89fc70099e4284870708b6632356aad98734fcf43f6f71c304"
},
"capacity": "0x47ab0e02200"
"capacity": "0x4be4e107a00"
},
{
"lock": {
Expand All @@ -60,7 +60,7 @@
"hashType": "type",
"args": "0xb2a8500929d6a1294bf9bf1bf565f549fa4a5f1316a3306ad3d4783e64bcf626"
},
"capacity": "0xa95c6b2a00"
"capacity": "0xc133ef2a00"
},
{
"lock": {
Expand All @@ -82,11 +82,11 @@
"hashType": "type",
"args": "0xd813c1b15bd79c8321ad7f5819e5d9f659a1042b72e64659a2c092be68ea9758"
},
"capacity": "0x51f2998ba00"
"capacity": "0x4d29b96e200"
},
{
"lock": {
"codeHash": "0xc8b0772347016713ee8039d6b1d2f4b02803abdc4ea4e95677b0c5e8ff52ea3b",
"codeHash": "0x973bdb373cbb1d752b4ac006e2bb5bdcb63431ed2b6e394b22721c8906a2ad72",
"hashType": "data",
"args": "0xb73961e46d9eb118d3de1d1e8f30b3af7bbf3160"
},
Expand All @@ -113,8 +113,8 @@
},
{
"lock": {
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"hashType": "type",
"codeHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"hashType": "data",
"args": "0x62e907b15cbf27d5425399ebf6f0fb50ebb88f18"
},
"type": null,
Expand All @@ -123,7 +123,7 @@
],
"outputsData": [],
"headerDeps": [],
"hash": "0xee046ce2baeda575266d4164f394c53f66009f64759f7a9f12a014c692e79390",
"hash": "0xb5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe",
"version": "0x0",
"witnesses": [
"0x450000000c00000041000000350000001000000030000000310000000000000000000000000000000000000000000000000000000000000000000000010000000000000000"
Expand All @@ -133,14 +133,14 @@
"cellDeps": [
{
"outPoint": {
"txHash": "0xee046ce2baeda575266d4164f394c53f66009f64759f7a9f12a014c692e79390",
"txHash": "0xb5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe",
"index": "0x3"
},
"depType": "code"
},
{
"outPoint": {
"txHash": "0xee046ce2baeda575266d4164f394c53f66009f64759f7a9f12a014c692e79390",
"txHash": "0xb5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe",
"index": "0x1"
},
"depType": "code"
Expand All @@ -149,7 +149,7 @@
"inputs": [
{
"previousOutput": {
"txHash": "0xee046ce2baeda575266d4164f394c53f66009f64759f7a9f12a014c692e79390",
"txHash": "0xb5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe",
"index": "0x5"
},
"since": "0x0"
Expand All @@ -175,12 +175,15 @@
"capacity": "0x2b95fd500"
}
],
"outputsData": [],
"outputsData": [
"0x02000000b5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe03000000b5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe01000000",
"0x02000000b5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe03000000b5724acb4f5f82afb717c3ec3fe025d3b6e45ff48f4ffbb6162c950399cbcabe04000000"
],
"headerDeps": [],
"hash": "0xb815a396c5226009670e89ee514850dcde452bca746cdd6b41c104b50e559c70",
"hash": "0xcb77d6dd01abde6dde8cd3fffaa9811399309ae47e18162096b7ae45e5e69f14",
"version": "0x0",
"witnesses": [
"0x5da610399b1bddd159b8a06ed5344d085ed9b92c68bc6563b1a227da0db52735097a381fb7310a8e75aa0135efcade8ce2c4723e5f2163cc02e5c117ea533eaa01"
"0x9e6603996641794b630a37bc9d3db48b8229a34c835e26aaf1ff621ae870291954d0df42b8541229d80c740cf239323da47aef8aa7c36046c4d427ddd4f82cc500"
]
}
],
Expand Down
140 changes: 9 additions & 131 deletions packages/ckb-sdk-core/__tests__/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,11 @@
"hashType": "type",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"outPoint": {
"txHash": "0xb815a396c5226009670e89ee514850dcde452bca746cdd6b41c104b50e559c70",
"txHash": "0xcb77d6dd01abde6dde8cd3fffaa9811399309ae47e18162096b7ae45e5e69f14",
"index": "0x0"
}
}
},
"signWitnesses": {
"basic witnesses": {
"privateKey": "0xe79f3207ea4980b7fed79956d5934249ceac4751a4fae01a0f7c4a96884bc4e3",
"message": {
"transactionHash": "0xac1bb95455cdfb89b6e977568744e09b6b80e08cab9477936a09c4ca07f5b8ab",
"witnesses": ["0x"]
},
"expected": [
"0x2c643579e47045be050d3842ed9270151af8885e33954bddad0e53e81d1c2dbe2dc637877a8302110846ebc6a16d9148c106e25f945063ad1c4d4db2b695240800"
]
},
"without private key should throw an error": {
"privateKey": null,
"message": {
"transactionHash": "0xac1bb95455cdfb89b6e977568744e09b6b80e08cab9477936a09c4ca07f5b8ab",
"witnesses": ["0x"]
},
"exception": "Private key or address object is required"
},
"without transaction hash should throw an error": {
"privateKey": "0xe79f3207ea4980b7fed79956d5934249ceac4751a4fae01a0f7c4a96884bc4e3",
"message": {
"transactionHash": null,
"witnesses": ["0x"]
},
"exception": "Transaction hash is required"
}
},
"signTransaction": {
"basic transaction": {
"privateKey": "0xe79f3207ea4980b7fed79956d5934249ceac4751a4fae01a0f7c4a96884bc4e3",
Expand Down Expand Up @@ -65,7 +37,13 @@
],
"outputsData": ["0x"],
"version": "0x0",
"witnesses": ["0x"]
"witnesses": [
{
"lock": "",
"inputType": "",
"outputType": ""
}
]
},
"expected": {
"cellDeps": [],
Expand Down Expand Up @@ -93,7 +71,7 @@
"outputsData": ["0x"],
"version": "0x0",
"witnesses": [
"0x993ab9cc92ea4936354155ed891a5d85a669872b9048b97c8eb05e155ddb1b4942aa3d9defffb8eb929956b2ec9eaf499d03fcf89957f1246a7ecc51b0eb002e00"
"0x5500000010000000550000005500000041000000e601e96d81b868b0f7feed9b23f48f0ff3d0206b055f77880d8408fd469d61b24c251969f69aa28fb17e2729457d7ff27e4e262fabc669240a7a6bff60f2ab0e01"
]
}
},
Expand Down Expand Up @@ -181,46 +159,6 @@
"witnesses": null
},
"exception": "Witnesses is required"
},
"with invalid count of witnesses should throw an error": {
"privateKey": "0xe79f3207ea4980b7fed79956d5934249ceac4751a4fae01a0f7c4a96884bc4e3",
"transaction": {
"deps": [
{
"cell": {
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"index": "0xffffffff"
},
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
],
"inputs": [
{
"previousOutput": {
"cell": {
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"index": "0xffffffff"
},
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"since": "0x0"
}
],
"outputs": [
{
"capacity": "0x48c27395000",
"data": "0x",
"lock": {
"args": "0x",
"codeHash": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"type": null
}
],
"version": "0x0",
"witnesses": []
},
"exception": "Invalid count of witnesses"
}
},
"computeScriptHash": {
Expand Down Expand Up @@ -480,65 +418,5 @@
"witnesses": []
}
}
},
"generateTransactionBuilder": {
"singlePrivateKey": {
"privateKey": "0xe79f3207ea4980b7fed79956d5934249ceac4751a4fae01a0f7c4a96884bc4e3",
"index": 0,
"inputs": [
{
"previousOutput": {
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"index": "0xffffffff"
},
"since": "0x0"
}
],
"outputs": [
{
"capacity": "0x48c27395000",
"lock": {
"args": "0x",
"codeHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"hashType": "data"
},
"type": null
}
],
"options": {
"outputsData": ["0x"],
"version": "0x0",
"witnesses": ["0x"]
},
"expected": {
"cellDeps": [],
"headerDeps": [],
"inputs": [
{
"previousOutput": {
"txHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"index": "0xffffffff"
},
"since": "0x0"
}
],
"outputs": [
{
"capacity": "0x48c27395000",
"lock": {
"args": "0x",
"codeHash": "0x0000000000000000000000000000000000000000000000000000000000000001",
"hashType": "data"
},
"type": null
}
],
"outputsData": ["0x"],
"version": "0x0",
"witnesses": [
"0x993ab9cc92ea4936354155ed891a5d85a669872b9048b97c8eb05e155ddb1b4942aa3d9defffb8eb929956b2ec9eaf499d03fcf89957f1246a7ecc51b0eb002e00"
]
}
}
}
}
Loading

0 comments on commit a73efb8

Please sign in to comment.