Skip to content

Commit

Permalink
Merge pull request #114 from Keith-CY/rc/v0.9.1
Browse files Browse the repository at this point in the history
Rc/v0.9.1
  • Loading branch information
Keith-CY authored Apr 25, 2019
2 parents 8c46065 + b291403 commit 3b45745
Show file tree
Hide file tree
Showing 17 changed files with 91 additions and 25 deletions.
11 changes: 11 additions & 0 deletions 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.9.1](https://github.com/keith-cy/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)


### Bug Fixes

* **types:** set the type of arg in script to string ([7ea3ad2](https://github.com/keith-cy/ckb-sdk-js/commit/7ea3ad2))





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)


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.9.0"
"version": "0.9.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.9.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)

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





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)


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.9.0",
"version": "0.9.1",
"description": "> TODO: description",
"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.9.0",
"@nervosnetwork/ckb-sdk-core": "^0.9.1",
"commander": "^2.19.0",
"inquirer": "^6.2.1"
},
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.9.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)

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





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)

**Note:** Version bump only for package @nervosnetwork/ckb-sdk-core
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.9.0",
"version": "0.9.1",
"description": "> TODO: description",
"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-rpc": "^0.9.0",
"@nervosnetwork/ckb-sdk-utils": "^0.9.0",
"@nervosnetwork/ckb-sdk-wallet": "^0.9.0",
"@nervosnetwork/ckb-types": "^0.9.0"
"@nervosnetwork/ckb-sdk-rpc": "^0.9.1",
"@nervosnetwork/ckb-sdk-utils": "^0.9.1",
"@nervosnetwork/ckb-sdk-wallet": "^0.9.1",
"@nervosnetwork/ckb-types": "^0.9.1"
},
"devDependencies": {
"@types/crypto-js": "^3.1.43"
Expand Down
8 changes: 8 additions & 0 deletions packages/ckb-sdk-rpc/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.9.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)

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





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)


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.9.0",
"version": "0.9.1",
"description": "@ckb-sdk rpc module",
"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.9.0",
"@nervosnetwork/ckb-sdk-utils": "^0.9.1",
"axios": "^0.18.0"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "^0.9.0",
"@nervosnetwork/ckb-types": "^0.9.1",
"@types/crypto-js": "^3.1.43"
},
"gitHead": "28221b4f28be9b2b166d63bd797e2e801250b699"
Expand Down
11 changes: 11 additions & 0 deletions packages/ckb-sdk-utils/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.9.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)


### Bug Fixes

* **types:** set the type of arg in script to string ([7ea3ad2](https://github.com/nervosnetwork/ckb-sdk-js/commit/7ea3ad2))





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)


Expand Down
4 changes: 2 additions & 2 deletions packages/ckb-sdk-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-sdk-utils",
"version": "0.9.0",
"version": "0.9.1",
"description": "> TODO: description",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js#readme",
Expand Down Expand Up @@ -30,7 +30,7 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-types": "^0.9.0",
"@nervosnetwork/ckb-types": "^0.9.1",
"blake2b-wasm": "^1.1.7",
"bs58check": "^2.1.2",
"eth-lib": "^0.2.8",
Expand Down
6 changes: 2 additions & 4 deletions packages/ckb-sdk-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ export const hexToUtf8 = (hex: string) => {
return utf8.decode(str)
}

export const lockScriptToHash = ({ binaryHash, args }: { binaryHash?: string; args?: Uint8Array[] }) => {
export const lockScriptToHash = ({ binaryHash, args }: { binaryHash?: string; args?: (Uint8Array | string)[] }) => {
const s = blake2b(32, null, null, PERSONAL)
if (binaryHash) {
s.update(Buffer.from(binaryHash.replace(/^0x/, ''), 'hex'))
}
if (args && args.length) {
args.forEach(arg => {
s.update(arg)
})
args.forEach(arg => (typeof arg === 'string' ? s.update(hexToBytes(arg)) : s.update(arg)))
}

const digest = s.digest('hex')
Expand Down
11 changes: 11 additions & 0 deletions packages/ckb-sdk-wallet/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.9.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)


### Bug Fixes

* **types:** set the type of arg in script to string ([7ea3ad2](https://github.com/nervosnetwork/ckb-sdk-js/commit/7ea3ad2))





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)


Expand Down
8 changes: 4 additions & 4 deletions packages/ckb-sdk-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-sdk-wallet",
"version": "0.9.0",
"version": "0.9.1",
"description": "> TODO: description",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js#readme",
Expand Down Expand Up @@ -30,11 +30,11 @@
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-rpc": "^0.9.0",
"@nervosnetwork/ckb-sdk-utils": "^0.9.0"
"@nervosnetwork/ckb-sdk-rpc": "^0.9.1",
"@nervosnetwork/ckb-sdk-utils": "^0.9.1"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "^0.9.0",
"@nervosnetwork/ckb-types": "^0.9.1",
"@types/crypto-js": "^3.1.43"
},
"gitHead": "28221b4f28be9b2b166d63bd797e2e801250b699"
Expand Down
2 changes: 1 addition & 1 deletion packages/ckb-sdk-wallet/src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Account extends ECPair {

public rpc: RPC

public unlockArgs: Uint8Array[] = []
public unlockArgs: string[] = []

public lockScript: CKBComponents.Script = {
version: 0,
Expand Down
13 changes: 12 additions & 1 deletion packages/ckb-types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# Changeog
# Changelog

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.9.1](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.9.0...v0.9.1) (2019-04-24)


### Bug Fixes

* **types:** set the type of arg in script to string ([7ea3ad2](https://github.com/nervosnetwork/ckb-sdk-js/commit/7ea3ad2))





# [0.9.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.8.0...v0.9.0) (2019-04-22)


Expand Down
2 changes: 1 addition & 1 deletion packages/ckb-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare namespace CKBComponents {
*/
export interface CellInput {
prevOutput: OutPoint
args: Uint8Array[]
args: Hash[]
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/ckb-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nervosnetwork/ckb-types",
"version": "0.9.0",
"version": "0.9.1",
"description": "> TODO: description",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js#readme",
Expand Down

0 comments on commit 3b45745

Please sign in to comment.