Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into esm
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/hd/package.json
#	packages/helpers/src/address-to-script.ts
#	packages/light-client/src/rpc.ts
#	pnpm-lock.yaml
  • Loading branch information
homura committed Nov 28, 2023
2 parents 582e4e7 + ddb4d5e commit 00afd8b
Show file tree
Hide file tree
Showing 108 changed files with 5,860 additions and 2,927 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-foxes-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ckb-lumos/rpc": minor
---

make `fetch` customizable
5 changes: 5 additions & 0 deletions .changeset/old-houses-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ckb-lumos/rpc": minor
---

`unknown` and `rejected` are available in the `TransactionWithStatus`
5 changes: 4 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mode": "pre",
"mode": "exit",
"tag": "next",
"initialVersions": {
"@ckb-lumos/base": "0.20.0",
Expand Down Expand Up @@ -27,9 +27,12 @@
"changesets": [
"green-tips-accept",
"kind-pandas-train",
"old-houses-smell",
"orange-flowers-sort",
"red-rings-approve",
"small-trees-appear",
"smart-bags-fetch",
"ten-keys-argue",
"two-brooms-draw"
]
}
5 changes: 5 additions & 0 deletions .changeset/small-trees-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ckb-lumos/rpc": minor
---

Supporting CKB2023, please check out [nervosnetwork/ckb#3980](https://github.com/nervosnetwork/ckb/pull/3980) and [nervosnetwork/ckb#3963](https://github.com/nervosnetwork/ckb/pull/3963) for more details
5 changes: 5 additions & 0 deletions .changeset/ten-keys-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ckb-lumos/rpc": minor
---

Supporting different return values when passing in different verbosity on `getBlock`, `getBlockByNumber`, `getHeader` and `getHeaderByNumber` with typescript
48 changes: 48 additions & 0 deletions .github/workflows/canary-ckb2023.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Canary-CKB2023
on:
push:
branches:
- ckb2023

permissions:
contents: write

jobs:
canary:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Setup .npmrc file
uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"

- name: Canary release
run: |
npx changeset pre exit || true
npx changeset version --snapshot ckb2023-$(git log -1 --pretty=format:%h)
pnpm -r publish --no-git-checks --tag ckb2023
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Generate commit comment
id: commit-comment
run: |
result="$(node scripts/canary-commit-comment.cjs)"
delimiter="$(openssl rand -hex 8)"
echo "result<<$delimiter" >> $GITHUB_OUTPUT
echo "$result" >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Create commit comment
uses: peter-evans/commit-comment@v2
with:
body: ${{ steps.commit-comment.outputs.result }}
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const scopeEnumValues = [
"hd-cache",
"helpers",
"indexer",
"light-client",
"lumos",
"rpc",
"sql-indexer",
Expand Down
2 changes: 1 addition & 1 deletion examples/cardano-lock-namiwallet/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@lumos-examples/cardano-lock-namiwallet",
"version": "0.20.0",
"version": "0.21.0-next.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
13 changes: 0 additions & 13 deletions examples/omni-lock-metamask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,5 @@
"@types/react-dom": "^18.0.9",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"parcel": "^2.9.3",
"buffer": "^5.5.0",
"crypto-browserify": "^3.12.0",
"events": "^3.1.0",
"path-browserify": "^1.0.0",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"string_decoder": "^1.3.0"
},
"alias": {
"process": false
}
}
28 changes: 3 additions & 25 deletions examples/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion examples/pw-lock-metamask/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@lumos-examples/pw-lock-metamask",
"version": "0.20.0",
"version": "0.21.0-next.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/secp256k1-multisig-transfer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@lumos-examples/secp256k1-multisig-transfer",
"version": "0.20.0",
"version": "0.21.0-next.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions examples/secp256k1-transfer/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { Indexer, helpers, Address, Script, RPC, hd, config, Cell, commons, Witn
import { values, blockchain } from "@ckb-lumos/base";
const { ScriptValue } = values;

export const { AGGRON4 } = config.predefined;

// export let { AGGRON4 } = config.predefined;
let AGGRON4: config.Config = config.predefined.AGGRON4;
// it can be changed to the devnet http://localhost:8114
const CKB_RPC_URL = "https://testnet.ckb.dev/rpc";
const rpc = new RPC(CKB_RPC_URL);
const indexer = new Indexer(CKB_RPC_URL);
Expand Down Expand Up @@ -52,6 +53,9 @@ interface Options {
}

export async function transfer(options: Options): Promise<string> {
const block = await rpc.getBlockByNumber("0x0");
AGGRON4 = { PREFIX: "ckt", SCRIPTS: config.generateGenesisScriptConfigs(block) };

let txSkeleton = helpers.TransactionSkeleton({});
const fromScript = helpers.parseAddress(options.from, { config: AGGRON4 });
const toScript = helpers.parseAddress(options.to, { config: AGGRON4 });
Expand Down
2 changes: 1 addition & 1 deletion examples/secp256k1-transfer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@lumos-examples/secp256k1-transfer",
"version": "0.20.0",
"version": "0.21.0-next.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions packages/base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @ckb-lumos/base

## 0.21.0-next.3

## 0.21.0-next.2

## 0.21.0-next.1
Expand Down
8 changes: 4 additions & 4 deletions packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ckb-lumos/base",
"version": "0.21.0-next.2",
"version": "0.21.0-next.3",
"description": "Base data structures and utilities used in lumos",
"author": "Xuejie Xiao <[email protected]>",
"homepage": "https://github.com/ckb-js/lumos#readme",
Expand Down Expand Up @@ -66,9 +66,9 @@
]
},
"dependencies": {
"@ckb-lumos/bi": "0.21.0-next.2",
"@ckb-lumos/codec": "0.21.0-next.2",
"@ckb-lumos/toolkit": "0.21.0-next.2",
"@ckb-lumos/bi": "0.21.0-next.3",
"@ckb-lumos/codec": "0.21.0-next.3",
"@ckb-lumos/toolkit": "0.21.0-next.3",
"@types/blake2b": "^2.1.0",
"blake2b": "^2.1.3",
"js-xxhash": "^1.0.4"
Expand Down
Loading

0 comments on commit 00afd8b

Please sign in to comment.