Skip to content

Commit

Permalink
feat(core): node.js websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanssen0 committed Aug 28, 2024
1 parent 642f731 commit 3658797
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .changeset/green-insects-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@ckb-ccc/core": patch
"@ckb-ccc/ccc": patch
"ckb-ccc": patch
"@ckb-ccc/connector": patch
"@ckb-ccc/connector-react": patch
"@ckb-ccc/eip6963": patch
"@ckb-ccc/joy-id": patch
"@ckb-ccc/lumos-patches": patch
"@ckb-ccc/nip07": patch
"@ckb-ccc/okx": patch
"@ckb-ccc/rei": patch
"@ckb-ccc/uni-sat": patch
"@ckb-ccc/utxo-global": patch
---

feat(core): node.js websocket
4 changes: 3 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
"bitcoinjs-message": "^2.2.0",
"buffer": "^6.0.3",
"cross-fetch": "^4.0.0",
"ethers": "^6.13.1"
"ethers": "^6.13.1",
"isomorphic-ws": "^5.0.0",
"ws": "^8.18.0"
}
}
1 change: 1 addition & 0 deletions packages/core/src/client/clientPublicMainnet.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import WebSocket from "isomorphic-ws";
import { Script } from "../ckb/index.js";
import { ClientCache } from "./cache/index.js";
import { CellDepInfo, KnownScript } from "./client.js";
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/client/clientPublicTestnet.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import WebSocket from "isomorphic-ws";
import { Script } from "../ckb/index.js";
import { ClientCache } from "./cache/index.js";
import { CellDepInfo, KnownScript } from "./client.js";
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/client/transports/webSocket.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import WebSocket from "isomorphic-ws";
import { JsonRpcPayload, Transport } from "./transport.js";

export class TransportWebSocket implements Transport {
Expand Down
29 changes: 29 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 3658797

Please sign in to comment.