Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 2f66337592 | |
Derrick Hammer | 273f351163 | |
Derrick Hammer | 7856713abf |
|
@ -1,3 +1,5 @@
|
|||
# [0.1.0-develop.10](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.1.0-develop.9...v0.1.0-develop.10) (2023-09-09)
|
||||
|
||||
# [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-09-03)
|
||||
|
||||
# [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-09-02)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/kernel-swarm-client",
|
||||
"version": "0.1.0-develop.9",
|
||||
"version": "0.1.0-develop.10",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/kernel-swarm-client",
|
||||
"version": "0.1.0-develop.9",
|
||||
"version": "0.1.0-develop.10",
|
||||
"dependencies": {
|
||||
"@lumeweb/libkernel": "^0.1.0-develop.38",
|
||||
"async-mutex": "^0.4.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/kernel-swarm-client",
|
||||
"version": "0.1.0-develop.9",
|
||||
"version": "0.1.0-develop.10",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Buffer } from "buffer";
|
||||
import { Client, factory } from "@lumeweb/libkernel/module";
|
||||
import { DataFn, ErrTuple, hexToBuf, logErr } from "@lumeweb/libkernel";
|
||||
import { DataFn, ErrTuple, logErr } from "@lumeweb/libkernel";
|
||||
import { hexToBytes } from "@lumeweb/libweb";
|
||||
import { blake2b } from "@noble/hashes/blake2b";
|
||||
import b4a from "b4a";
|
||||
|
||||
|
@ -54,8 +55,7 @@ export class SwarmClient extends Client {
|
|||
|
||||
public async connect(pubkey: string | Uint8Array): Promise<Socket> {
|
||||
if (typeof pubkey === "string") {
|
||||
const buf = hexToBuf(pubkey);
|
||||
pubkey = this.handleErrorOrReturn(buf);
|
||||
pubkey = hexToBytes(pubkey);
|
||||
}
|
||||
|
||||
let existing = Array.from(this._sockets.values()).filter((socket) => {
|
||||
|
|
Loading…
Reference in New Issue