Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f1308a5
feat(libp2p): new `@ckb-ccc/libp2p`
Hanssen0 Aug 21, 2026
55600ea
feat(core): `SignerJsonRpc` for remote signer
Hanssen0 Aug 22, 2026
65e85de
feat(connector): khie
Hanssen0 Aug 27, 2026
7b63838
feat(core): `buildSignerJsonRpcHandler`
Hanssen0 Aug 29, 2026
1e9d558
fix(libp2p): trust peer before responding
Hanssen0 Aug 30, 2026
cc3bf09
feat(app): Unreviewed Khie module
Hanssen0 Aug 30, 2026
97e4128
feat(khie): new logo
Hanssen0 Aug 31, 2026
7ebceb7
fix(connector): apply fee rate to Khie transactions
Hanssen0 Sep 4, 2026
eff7117
fix(khie): support older browser APIs
Hanssen0 Sep 5, 2026
b5e4057
fix(connector): support Turbopack builds
Hanssen0 Sep 5, 2026
c10cd75
fix(connector): stabilize mobile QR layout on iOS 16
Hanssen0 Sep 6, 2026
2001c3b
refactor(connector): transfer connection ownership
Hanssen0 Sep 9, 2026
a5ec8b9
fix(libp2p): bound pairing endpoint decompression
Hanssen0 Sep 9, 2026
d32d14e
feat(khie): clarify pairing flow
Hanssen0 Sep 9, 2026
7063452
fix(connector): preserve controller signer sessions
Hanssen0 Sep 10, 2026
7e38c51
feat(khie): share peer names when pairing
Hanssen0 Sep 11, 2026
51ccf8d
fix(khie): require approved connection
Hanssen0 Sep 11, 2026
816a8b9
fix(libp2p): keep pairing secrets in URL fragments
Hanssen0 Sep 11, 2026
acf37a8
fix(app): guard queued Khie approvals
Hanssen0 Sep 11, 2026
4f3c612
fix(libp2p): rotate pairing secrets after use
Hanssen0 Sep 11, 2026
223119f
fix(khie): guard connection handoff
Hanssen0 Sep 11, 2026
d770497
chore: consolidate libp2p changesets
Hanssen0 Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/calm-peers-pair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ckb-ccc/libp2p": patch
---

feat(libp2p): add peer pairing and JSON-RPC services and transports for Khie
connections.
10 changes: 10 additions & 0 deletions .changeset/fresh-khie-owners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@ckb-ccc/connector": patch
"@ckb-ccc/connector-react": major
---

refactor(connector): emit owned wallet and signer connections, remove deprecated compatibility APIs, require setClient callers to transfer Client ownership, and release connections from the React Provider.

See the [Connector 2.0 migration guide](https://docs.ckbccc.com/en/docs/migration/connector-v2)
for the required `setClient`, connection event, Client ownership, and removed
property changes.
6 changes: 6 additions & 0 deletions .changeset/gentle-signals-connect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ckb-ccc/core": minor
---

feat(core): add `SignerJsonRpc` and `buildSignerJsonRpcHandler` for remote
signers, plus an `AbortSignal.any` compatibility helper.
6 changes: 6 additions & 0 deletions .changeset/small-names-pair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ckb-ccc/connector": minor
---

feat(connector): add Khie peer-to-peer wallet connections, supporting pairing
codes from either the wallet or the connector.
64 changes: 64 additions & 0 deletions assets/khie.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions assets/khieMono.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/app/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
allowedDevOrigins: ["192.168.*.*"],
allowedDevOrigins: ["192.168.*.*", "*.trycloudflare.com"],
experimental: {
// Work around Next.js 16.3's incompatibility with TypeScript 7's dual-version aliases.
// https://github.com/vercel/next.js/issues/96589
Expand Down
15 changes: 13 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,37 @@
"url": "git://github.com/ckb-devrel/ccc.git"
},
"scripts": {
"dev": "next dev --webpack",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint ./src",
"format": "prettier --write ./src"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^17.0.0",
"@chainsafe/libp2p-yamux": "^8.0.1",
"@ckb-ccc/connector-react": "workspace:*",
"@ckb-ccc/libp2p": "workspace:*",
"@ckb-ccc/lumos-patches": "workspace:*",
"@ckb-ccc/ssri": "workspace:*",
"@ckb-ccc/type-id": "workspace:*",
"@ckb-lumos/ckb-indexer": "0.24.0-next.2",
"@ckb-lumos/common-scripts": "0.24.0-next.2",
"@ckb-lumos/config-manager": "0.24.0-next.2",
"@ckb-lumos/helpers": "0.24.0-next.2",
"@libp2p/circuit-relay-v2": "^4.2.11",
"@libp2p/identify": "^4.1.12",
"@libp2p/interface": "^3.2.5",
"@libp2p/webrtc": "^6.0.29",
"@libp2p/websockets": "^10.1.19",
"@multiformats/multiaddr": "^13.0.3",
"@scure/bip32": "^2.0.0",
"@scure/bip39": "^2.0.0",
"core-js": "^3.50.0",
"libp2p": "^3.3.8",
"lucide-react": "^1.21.0",
"next": "16.3.4",
"qrcode.react": "^4.2.0",
"qr": "^0.6.0",
"react": "19.2.8",
"react-dom": "19.2.8"
},
Expand Down
16 changes: 15 additions & 1 deletion packages/app/src/app/module-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ export const ModuleWorkspace = memo(function ModuleWorkspace({
client,
log,
module,
setClient,
signer,
wallet,
}: {
active: boolean;
client: ccc.Client;
log: DemoLogger;
module?: DemoModule;
setClient: (owner: ccc.Owner<ccc.Client>) => unknown;
signer?: ccc.Signer;
wallet?: ccc.Wallet;
}) {
const Module = module?.component;
const slotRef = useRef<HTMLDivElement>(null);
Expand Down Expand Up @@ -56,7 +60,9 @@ export const ModuleWorkspace = memo(function ModuleWorkspace({
client={client}
log={log}
module={module}
setClient={setClient}
signer={signer}
wallet={wallet}
workspaceRef={workspaceRef}
/>
</div>
Expand All @@ -69,13 +75,17 @@ function MountedModuleWorkspace({
client,
log,
module,
setClient,
signer,
wallet,
workspaceRef,
}: {
client: ccc.Client;
log: DemoLogger;
module: DemoModule;
setClient: (owner: ccc.Owner<ccc.Client>) => unknown;
signer?: ccc.Signer;
wallet?: ccc.Wallet;
workspaceRef: React.RefObject<HTMLElement | null>;
}) {
const Module = module.component;
Expand Down Expand Up @@ -140,7 +150,9 @@ function MountedModuleWorkspace({

<header className="workspace-header">
<span className="workspace-header-glyph-viewport" aria-hidden="true">
<span className="workspace-header-glyph">啟</span>
<span className="workspace-header-glyph">
{module.id === "khie" ? "契" : "啟"}
</span>
</span>
<div className="workspace-title">
<span className="section-index">
Expand Down Expand Up @@ -179,9 +191,11 @@ function MountedModuleWorkspace({
<Module
client={client}
log={moduleLog}
setClient={setClient}
show={show}
signer={signer}
submitTransaction={submitTransaction}
wallet={wallet}
/>
<ModuleReadout
label={readout.label}
Expand Down
13 changes: 13 additions & 0 deletions packages/app/src/app/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import {
IssueXUdtTypeIdModule,
} from "./modules/issue-xudt-module";
import { KeystoreModule } from "./modules/keystore-module";
import { KhieIcon } from "./modules/khie/khie-icon";
import { KhieModule } from "./modules/khie/khie-module";
import { MintSporeModule } from "./modules/mint-spore-module";
import { MnemonicModule } from "./modules/mnemonic-module";
import { NervosDaoModule } from "./modules/nervos-dao-module";
Expand All @@ -57,8 +59,10 @@ export type SubmitTransaction = (
export type ModuleRuntimeProps = {
client: ccc.Client;
log: (message: string, level?: DemoLogLevel) => void;
setClient: (owner: ccc.Owner<ccc.Client>) => unknown;
show: ShowModuleReadout;
signer?: ccc.Signer;
wallet?: ccc.Wallet;
submitTransaction: SubmitTransaction;
};

Expand Down Expand Up @@ -116,6 +120,15 @@ function defineModules(definitions: readonly DemoModuleDefinition[]) {
}

export const demoModules: readonly DemoModule[] = defineModules([
{
name: "Khie",
description:
"Khie is a peer-to-peer protocol that connects wallets and applications. To connect, select Khie in the application's connector, then either use the connector to scan the wallet's pairing code or use the wallet to scan the connector's pairing code. For wallets without native Khie support, this module lets them connect to remote applications through Khie.\n\nKhie (契, /kʰje/) is Hakka for bond, agreement, or connection.",
group: "Wallet",
icon: KhieIcon,
access: "signer",
component: KhieModule,
},
{
name: "Hash",
description:
Expand Down
Loading