Skip to content

Commit

Permalink
Merge pull request #614 from ckb-js/rc/v0.109.0
Browse files Browse the repository at this point in the history
Release v0.109.0
  • Loading branch information
Keith-CY authored Apr 26, 2023
2 parents 7aaa356 + 4a35270 commit 834193f
Show file tree
Hide file tree
Showing 24 changed files with 128 additions and 70 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Restore
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -35,7 +35,7 @@ jobs:
npm run build:umd
- name: Upload Files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ckb-sdk-js
path: packages/ckb-sdk-core/umd/ckb-sdk.min.js
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
deploy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install and build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge_master_into_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Request
uses: repo-sync/pull-request@v2
uses: repo-sync/pull-request@v3
with:
source_branch: master
destination_branch: develop
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run Snyk
uses: snyk/actions/node@master
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ jobs:
strategy:
matrix:
node: [16, 18]
os: [macos-latest, ubuntu-18.04]
os: [macos-latest, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: Skip when run node.js@18 on ubuntu for compatibility reason
id: is_skip
if: matrix.os == 'ubuntu-18.04' && matrix.node == '18'
if: matrix.os == 'ubuntu-22.04' && matrix.node == '18'
run: echo 'IS_SKIP=true' >> $GITHUB_OUTPUT

- uses: actions/checkout@v2
- uses: actions/checkout@v3
if: ${{ steps.is_skip.outputs.IS_SKIP != 'true' }}

- name: Setup Node
if: ${{ steps.is_skip.outputs.IS_SKIP != 'true' }}
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Restore
if: ${{ steps.is_skip.outputs.IS_SKIP != 'true' }}
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -50,7 +50,7 @@ jobs:
run: yarn run test

- name: Upload codecov
if: matrix.os == 'macos-latest' && matrix.node == '14'
if: matrix.os == 'macos-latest' && matrix.node == '18'
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
8 changes: 8 additions & 0 deletions 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.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.107.0...v0.109.0) (2023-04-26)

**Note:** Version bump only for package ckb-sdk-js





# [0.107.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.103.1...v0.107.0) (2023-04-03)


Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

| Service | Master | Develop |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Unit Tests | [![Unit Tests](https://github.com/nervosnetwork/ckb-sdk-js/workflows/Unit%20Tests/badge.svg?branch=master)](https://github.com/nervosnetwork/ckb-sdk-js/actions?query=branch%3Amaster+workflow%3A%22Unit+Tests%22) | [![Unit Tests](https://github.com/nervosnetwork/ckb-sdk-js/workflows/Unit%20Tests/badge.svg?branch=develop)](https://github.com/nervosnetwork/ckb-sdk-js/actions?query=branch%3Adevelop+workflow%3A%22Unit+Tests%22) |
| Coverage | [![Codecov](https://codecov.io/gh/nervosnetwork/ckb-sdk-js/branch/master/graph/badge.svg)](https://codecov.io/gh/nervosnetwork/ckb-sdk-js/branch/master) | [![Codecov](https://codecov.io/gh/nervosnetwork/ckb-sdk-js/branch/develop/graph/badge.svg)](https://codecov.io/gh/nervosnetwork/ckb-sdk-js/branch/develop) |
| Unit Tests | [![Unit Tests](https://github.com/ckb-js/ckb-sdk-js/workflows/Unit%20Tests/badge.svg?branch=master)](https://github.com/ckb-js/ckb-sdk-js/actions?query=branch%3Amaster+workflow%3A%22Unit+Tests%22) | [![Unit Tests](https://github.com/ckb-js/ckb-sdk-js/workflows/Unit%20Tests/badge.svg?branch=develop)](https://github.com/ckb-js/ckb-sdk-js/actions?query=branch%3Adevelop+workflow%3A%22Unit+Tests%22) |
| Coverage | [![Codecov](https://codecov.io/gh/ckb-js/ckb-sdk-js/branch/master/graph/badge.svg)](https://codecov.io/gh/ckb-js/ckb-sdk-js/branch/master) | [![Codecov](https://codecov.io/gh/ckb-js/ckb-sdk-js/branch/develop/graph/badge.svg)](https://codecov.io/gh/ckb-js/ckb-sdk-js/branch/develop) |

[![NPM](https://img.shields.io/npm/v/@nervosnetwork/ckb-sdk-core/latest.svg)](https://www.npmjs.com/package/@nervosnetwork/ckb-sdk-core)
[![Package Quality](https://npm.packagequality.com/shield/%40nervosnetwork%2Fckb-sdk-core.svg)](https://packagequality.com/#?package=@nervosnetwork/ckb-sdk-core)
[![License](https://img.shields.io/npm/l/@nervosnetwork/ckb-sdk-core.svg)](./LICENSE)
[![Telegram Group](https://cdn.rawgit.com/Patrolavia/telegram-badge/8fe3382b/chat.svg)](https://t.me/nervos_ckb_dev)
[![SNYK](https://github.com/nervosnetwork/ckb-sdk-js/workflows/SNYK/badge.svg)](https://github.com/nervosnetwork/ckb-sdk-js/actions?query=workflow%3ASNYK)
[![Deploy Docs](https://github.com/nervosnetwork/ckb-sdk-js/workflows/Deploy%20Docs/badge.svg)](https://nervosnetwork.github.io/ckb-sdk-js/classes/_nervosnetwork_ckb_sdk_core.default.html)
[![SNYK](https://github.com/ckb-js/ckb-sdk-js/workflows/SNYK/badge.svg)](https://github.com/ckb-js/ckb-sdk-js/actions?query=workflow%3ASNYK)
[![Deploy Docs](https://github.com/ckb-js/ckb-sdk-js/workflows/Deploy%20Docs/badge.svg)](https://nervosnetwork.github.io/ckb-sdk-js/classes/_nervosnetwork_ckb_sdk_core.default.html)

JavaScript SDK for Nervos [CKB](https://github.com/nervosnetwork/ckb).

Expand Down Expand Up @@ -91,7 +91,7 @@ This SDK includes several modules:

<details>
<summary>
RPC <a href="https://github.com/nervosnetwork/ckb-sdk-js/tree/develop/packages/ckb-sdk-rpc" alt="rpc">Code</a>
RPC <a href="https://github.com/ckb-js/ckb-sdk-js/tree/develop/packages/ckb-sdk-rpc" alt="rpc">Code</a>
</summary>
<dd>

Expand All @@ -105,7 +105,7 @@ Interfaces could be found in `DefaultRPC` class in this module.

<details>
<summary>
Utils <a href="https://github.com/nervosnetwork/ckb-sdk-js/tree/develop/packages/ckb-sdk-utils" alt="utils">Code</a>
Utils <a href="https://github.com/ckb-js/ckb-sdk-js/tree/develop/packages/ckb-sdk-utils" alt="utils">Code</a>
</summary>
<dd>

Expand All @@ -116,7 +116,7 @@ The Utils module provides useful methods for other modules.

<details>
<summary>
Types <a href="https://github.com/nervosnetwork/ckb-sdk-js/tree/develop/packages/ckb-types" alt="types">Code</a>
Types <a href="https://github.com/ckb-js/ckb-sdk-js/tree/develop/packages/ckb-types" alt="types">Code</a>
</summary>
<dd>

Expand Down Expand Up @@ -149,7 +149,7 @@ After that you can use the `ckb` object to generate addresses, send requests, et

## Basic RPC

Please see [Basic RPC](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-rpc/src/Base/index.ts#L23)
Please see [Basic RPC](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-rpc/src/Base/index.ts#L23)

## Batch Request

Expand Down Expand Up @@ -217,7 +217,7 @@ ckb.rpc.setNode({ httpsAgent })

# Utils

[Most used utilities](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-utils/README.md)
[Most used utilities](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-utils/README.md)

# Errors

Expand All @@ -227,20 +227,20 @@ The rpc module will throw an error when the result contains an error field, you

# Examples

1. [Send Simple Transaction](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendSimpleTransaction.js)
2. [Send All Balance](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendAllBalance.js)
3. [Send Transaction with multiple private key](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithMultiplePrivateKey.js)
4. [Deposit to and withdraw from Nervos DAO](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/nervosDAO.js)
5. [Send Transaction with Lumos Collector](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithLumosCollector.js)
6. [SUDT](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sudt.js)
1. [Send Simple Transaction](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendSimpleTransaction.js)
2. [Send All Balance](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendAllBalance.js)
3. [Send Transaction with multiple private key](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithMultiplePrivateKey.js)
4. [Deposit to and withdraw from Nervos DAO](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/nervosDAO.js)
5. [Send Transaction with Lumos Collector](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithLumosCollector.js)
6. [SUDT](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sudt.js)

# Troubleshooting

## Indexer Module

The Indexer Module in CKB has been deprecated since [v0.36.0](https://github.com/nervosnetwork/ckb/releases/tag/v0.36.0), please use [ckb-indexer](https://github.com/nervosnetwork/ckb-indexer) or [lumos-indexer](https://github.com/nervosnetwork/lumos/tree/develop/packages/indexer) instead.

A simple example [sendTransactionWithLumosCollector](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithLumosCollector.js) of wokring with lumos has beed added.
A simple example [sendTransactionWithLumosCollector](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithLumosCollector.js) of wokring with lumos has beed added.

# Development Process

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.107.0"
"version": "0.109.0"
}
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.0](https://github.com/ckb-js/ckb-sdk-js/compare/v0.107.0...v0.109.0) (2023-04-26)

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





# [0.107.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.103.1...v0.107.0) (2023-04-03)


Expand Down
4 changes: 2 additions & 2 deletions packages/ckb-sdk-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

`@nervosnetwork/ckb-sdk-core` is the JavaScript SDK for Nervos Network [CKB Project](https://github.com/nervosnetwork/ckb)

[Type Doc](https://nervosnetwork.github.io/ckb-sdk-js/classes/ckb.html)
[Type Doc](https://ckb-js.github.io/ckb-sdk-js/classes/ckb.html)

See [Full Doc](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/README.md)
See [Full Doc](https://github.com/ckb-js/ckb-sdk-js/blob/develop/README.md)
16 changes: 8 additions & 8 deletions packages/ckb-sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@nervosnetwork/ckb-sdk-core",
"version": "0.107.0",
"version": "0.109.0",
"description": "JavaScript SDK for Nervos Network CKB Project",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js#readme",
"homepage": "https://github.com/ckb-js/ckb-sdk-js#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand All @@ -23,20 +23,20 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/nervosnetwork/ckb-sdk-js.git"
"url": "git+https://github.com/ckb-js/ckb-sdk-js.git"
},
"scripts": {
"tsc": "tsc",
"test": "../../node_modules/.bin/jest"
},
"bugs": {
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
"url": "https://github.com/ckb-js/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-rpc": "0.107.0",
"@nervosnetwork/ckb-sdk-utils": "0.107.0",
"@nervosnetwork/ckb-types": "0.107.0",
"@nervosnetwork/ckb-sdk-rpc": "0.109.0",
"@nervosnetwork/ckb-sdk-utils": "0.109.0",
"@nervosnetwork/ckb-types": "0.109.0",
"tslib": "2.3.1"
},
"gitHead": "592c7cb58fd830f8bc07f5f08551811ba0197195"
"gitHead": "10530318adf792f033abf7e449eaea956c4aea1d"
}
2 changes: 1 addition & 1 deletion packages/ckb-sdk-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class CKB {
/**
* @memberof Core
* @description The method used to load cells from lumos indexer as shown in the tutorial
* @tutorial https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithLumosCollector.js
* @tutorial https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-core/examples/sendTransactionWithLumosCollector.js
*/
public loadCells = async (
params: LoadCellsParams.FromIndexer & {
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.109.0](https://github.com/ckb-js/ckb-sdk-js/compare/v0.107.0...v0.109.0) (2023-04-26)

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





# [0.107.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.103.1...v0.107.0) (2023-04-03)

### Features
Expand Down
6 changes: 3 additions & 3 deletions packages/ckb-sdk-rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

`@nervosnetwork/ckb-sdk-rpc` is the rpc module of `@nervosnetwork/ckb-sdk-core`.

RPC list could be found [here](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/packages/ckb-sdk-rpc/src/Base.ts#L156)
RPC list could be found [here](https://github.com/ckb-js/ckb-sdk-js/blob/develop/packages/ckb-sdk-rpc/src/Base.ts#L156)

[Type Doc](https://nervosnetwork.github.io/ckb-sdk-js/classes/ckbrpc.html)
[Type Doc](https://ckb-js.github.io/ckb-sdk-js/classes/ckbrpc.html)

See [Full Doc](https://github.com/nervosnetwork/ckb-sdk-js/blob/develop/README.md)
See [Full Doc](https://github.com/ckb-js/ckb-sdk-js/blob/develop/README.md)
20 changes: 19 additions & 1 deletion packages/ckb-sdk-rpc/__tests__/ckb-rpc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ describe('Test with mock', () => {
expect(axiosMock.mock.calls[0][0].data).toEqual({
id,
jsonrpc: '2.0',
method: 'get_fee_rate_statics',
method: 'get_fee_rate_statistics',
params: [],
})
expect(res).toEqual({
Expand All @@ -748,6 +748,24 @@ describe('Test with mock', () => {
})
})

it('get fee fate statistics of null', async () => {
axiosMock.mockResolvedValue({
data: {
jsonrpc: '2.0',
result: null,
id,
},
})
const res = await rpc.getFeeRateStats()
expect(axiosMock.mock.calls[0][0].data).toEqual({
id,
jsonrpc: '2.0',
method: 'get_fee_rate_statistics',
params: [],
})
expect(res).toEqual(null)
})

it('local node info', async () => {
axiosMock.mockResolvedValue({
data: {
Expand Down
14 changes: 7 additions & 7 deletions packages/ckb-sdk-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@nervosnetwork/ckb-sdk-rpc",
"version": "0.107.0",
"version": "0.109.0",
"description": "RPC module of @nervosnetwork/ckb-sdk-core",
"author": "Nervos <[email protected]>",
"homepage": "https://github.com/nervosnetwork/ckb-sdk-js/packages/ckb-rpc#readme",
"homepage": "https://github.com/ckb-js/ckb-sdk-js/packages/ckb-rpc#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand All @@ -21,7 +21,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/nervosnetwork/ckb-sdk-js.git"
"url": "git+https://github.com/ckb-js/ckb-sdk-js.git"
},
"scripts": {
"tsc": "tsc",
Expand All @@ -30,15 +30,15 @@
"test:watch": "../../node_modules/.bin/jest --watch"
},
"bugs": {
"url": "https://github.com/nervosnetwork/ckb-sdk-js/issues"
"url": "https://github.com/ckb-js/ckb-sdk-js/issues"
},
"dependencies": {
"@nervosnetwork/ckb-sdk-utils": "0.107.0",
"@nervosnetwork/ckb-sdk-utils": "0.109.0",
"axios": "0.21.4",
"tslib": "2.3.1"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "0.107.0"
"@nervosnetwork/ckb-types": "0.109.0"
},
"gitHead": "592c7cb58fd830f8bc07f5f08551811ba0197195"
"gitHead": "10530318adf792f033abf7e449eaea956c4aea1d"
}
2 changes: 1 addition & 1 deletion packages/ckb-sdk-rpc/src/Base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export interface Base {

/* skip Subscription */

getFeeRateStats: () => Promise<CKBComponents.FeeRateStats>
getFeeRateStats: () => Promise<CKBComponents.FeeRateStats | null>
}

export class Base {
Expand Down
Loading

0 comments on commit 834193f

Please sign in to comment.