Skip to content

Commit

Permalink
Release v0.109.4 (#650)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hanssen <[email protected]>
fix: commonjs support (#639)
fix: fix data2 validation in 'isPayloadValid' method (#648)
  • Loading branch information
3 people authored Nov 15, 2024
1 parent db4594e commit a0d0b2d
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 34 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.109.4](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.3...v0.109.4) (2024-11-15)


### Bug Fixes

* commonjs support ([#639](https://github.com/ckb-js/ckb-sdk-js/issues/639)) ([b229d4e](https://github.com/ckb-js/ckb-sdk-js/commit/b229d4ede84e34820d236ccf22af9e24dd518c19))
* fix data2 validation in 'isPayloadValid' method ([#648](https://github.com/ckb-js/ckb-sdk-js/issues/648)) ([8b7dcb6](https://github.com/ckb-js/ckb-sdk-js/commit/8b7dcb6bb42124989284f66ab9fa4a96cce3d0b2))





## [0.109.3](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.2...v0.109.3) (2024-08-01)


Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
⚠️ **This SDK is obsolete and maintained passively. Please check [Lumos](https://github.com/ckb-js/lumos/) which is updated actively.**
⚠️ **This SDK is obsolete and maintained passively.**

## Recommended SDK: CCC

It’s highly recommended to use the [CCC SDK](https://github.com/ckb-ecofund/ccc) as your primary development tool within the CKB ecosystem. [CCC](https://github.com/ckb-ecofund/ccc) is the latest and most robust JavaScript SDK designed to streamline and enhance your development process. By choosing [CCC](https://github.com/ckb-ecofund/ccc), you'll be leveraging the best practices and most up-to-date features available for CKB development.

To get started with [CCC](https://github.com/ckb-ecofund/ccc), follow the [installation guide](https://github.com/ckb-ecofund/ccc#installing) and explore the [documentation](https://docs.ckbccc.com/) to integrate it seamlessly into your projects.

---

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.109.3"
"version": "0.109.4"
}
29 changes: 14 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.109.4](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.3...v0.109.4) (2024-11-15)

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





## [0.109.3](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.2...v0.109.3) (2024-08-01)


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.109.3",
"version": "0.109.4",
"description": "JavaScript SDK for Nervos Network CKB Project",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/ckb-js/ckb-sdk-js#readme",
Expand Down Expand Up @@ -48,10 +48,10 @@
"url": "https://github.com/ckb-js/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-rpc": "0.109.3",
"@nervosnetwork/ckb-sdk-utils": "0.109.3",
"@nervosnetwork/ckb-types": "0.109.3",
"@nervosnetwork/ckb-sdk-rpc": "0.109.4",
"@nervosnetwork/ckb-sdk-utils": "0.109.4",
"@nervosnetwork/ckb-types": "0.109.4",
"tslib": "2.3.1"
},
"gitHead": "bb703e9a16b9f467a88d6a1067162d296808fbc1"
"gitHead": "969387fe6574d0130e8014332a87cd6b5e404a03"
}
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.109.4](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.3...v0.109.4) (2024-11-15)

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





## [0.109.3](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.2...v0.109.3) (2024-08-01)


Expand Down
10 changes: 5 additions & 5 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.109.3",
"version": "0.109.4",
"description": "RPC module of @nervosnetwork/ckb-sdk-core",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/ckb-js/ckb-sdk-js/packages/ckb-rpc#readme",
Expand Down Expand Up @@ -43,12 +43,12 @@
"url": "https://github.com/ckb-js/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-utils": "0.109.3",
"axios": "1.6.7",
"@nervosnetwork/ckb-sdk-utils": "0.109.4",
"axios": "1.7.4",
"tslib": "2.3.1"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "0.109.3"
"@nervosnetwork/ckb-types": "0.109.4"
},
"gitHead": "bb703e9a16b9f467a88d6a1067162d296808fbc1"
"gitHead": "969387fe6574d0130e8014332a87cd6b5e404a03"
}
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.109.4](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.3...v0.109.4) (2024-11-15)


### Bug Fixes

* fix data2 validation in 'isPayloadValid' method ([#648](https://github.com/ckb-js/ckb-sdk-js/issues/648)) ([8b7dcb6](https://github.com/ckb-js/ckb-sdk-js/commit/8b7dcb6bb42124989284f66ab9fa4a96cce3d0b2))





## [0.109.3](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.2...v0.109.3) (2024-08-01)


Expand Down
19 changes: 19 additions & 0 deletions packages/ckb-sdk-utils/__tests__/address/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@
"hashType": "data1",
"args": "0xb39bbc0b3673c7d36450bc14cfcdad2d559c6c64"
}
},
"full version address identifies hash_type = data2": {
"params": ["ckt1qzn9dutjk669cfznq7httfar0gtk7qp0du3wjfvzck9l0w3k9eqhvp9nnw7qkdnnclfkg59uzn8umtfd2kwxceqskl3c2"],
"expected": {
"codeHash": "0xa656f172b6b45c245307aeb5a7a37a176f002f6f22e92582c58bf7ba362e4176",
"hashType": "data2",
"args": "0xb39bbc0b3673c7d36450bc14cfcdad2d559c6c64"
}
}
},
"scriptToAddress": {
Expand Down Expand Up @@ -302,6 +310,17 @@
],
"expected": "ckt1qzn9dutjk669cfznq7httfar0gtk7qp0du3wjfvzck9l0w3k9eqhvq4nnw7qkdnnclfkg59uzn8umtfd2kwxceq225jvu"
},
"full version testnet address identifies hash_type = data2": {
"params": [
{
"codeHash": "0xa656f172b6b45c245307aeb5a7a37a176f002f6f22e92582c58bf7ba362e4176",
"hashType": "data2",
"args": "0xb39bbc0b3673c7d36450bc14cfcdad2d559c6c64"
},
false
],
"expected": "ckt1qzn9dutjk669cfznq7httfar0gtk7qp0du3wjfvzck9l0w3k9eqhvp9nnw7qkdnnclfkg59uzn8umtfd2kwxceqskl3c2"
},
"should throw an error when args doesn't start with 0x": {
"params": [
{
Expand Down
8 changes: 4 additions & 4 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.109.3",
"version": "0.109.4",
"description": "Utils module of @nervosnetwork/ckb-sdk-core",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/ckb-js/ckb-sdk-js#readme",
Expand Down Expand Up @@ -41,15 +41,15 @@
"url": "https://github.com/ckb-js/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-types": "0.109.3",
"@nervosnetwork/ckb-types": "0.109.4",
"bech32": "2.0.0",
"elliptic": "6.5.4",
"elliptic": "6.6.0",
"jsbi": "3.1.3",
"tslib": "2.3.1"
},
"devDependencies": {
"@types/bitcoinjs-lib": "5.0.0",
"@types/elliptic": "6.4.12"
},
"gitHead": "bb703e9a16b9f467a88d6a1067162d296808fbc1"
"gitHead": "969387fe6574d0130e8014332a87cd6b5e404a03"
}
7 changes: 6 additions & 1 deletion packages/ckb-sdk-utils/src/address/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,12 @@ const isPayloadValid = (payload: Uint8Array, bech32Type: Bech32Type) => {
}

const hashType = parseInt(data[32].toString(), 16)
if (hashType > 2) {

if (
!Object.values(AddressType)
.map(i => +i)
.includes(hashType)
) {
throw new HashTypeException(`0x${hashType.toString(16)}`)
}

Expand Down
8 changes: 8 additions & 0 deletions packages/ckb-types/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.109.4](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.3...v0.109.4) (2024-11-15)

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





## [0.109.3](https://github.com/ckb-js/ckb-sdk-js/compare/v0.109.2...v0.109.3) (2024-08-01)

**Note:** Version bump only for package @nervosnetwork/ckb-types
Expand Down
4 changes: 2 additions & 2 deletions 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.109.3",
"version": "0.109.4",
"description": "Type module of @nervosnetwork/ckb-sdk-core",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/ckb-js/ckb-sdk-js#readme",
Expand All @@ -20,5 +20,5 @@
"bugs": {
"url": "https://github.com/ckb-js/ckb-sdk-js/issues"
},
"gitHead": "bb703e9a16b9f467a88d6a1067162d296808fbc1"
"gitHead": "969387fe6574d0130e8014332a87cd6b5e404a03"
}

0 comments on commit a0d0b2d

Please sign in to comment.