Compare commits

..

No commits in common. "v0.1.0-develop.10" and "v0.1.0-develop.9" have entirely different histories.

4 changed files with 6 additions and 8 deletions

View File

@ -1,5 +1,3 @@
# [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.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) # [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)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/kernel-swarm-client", "name": "@lumeweb/kernel-swarm-client",
"version": "0.1.0-develop.10", "version": "0.1.0-develop.9",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/kernel-swarm-client", "name": "@lumeweb/kernel-swarm-client",
"version": "0.1.0-develop.10", "version": "0.1.0-develop.9",
"dependencies": { "dependencies": {
"@lumeweb/libkernel": "^0.1.0-develop.38", "@lumeweb/libkernel": "^0.1.0-develop.38",
"async-mutex": "^0.4.0", "async-mutex": "^0.4.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/kernel-swarm-client", "name": "@lumeweb/kernel-swarm-client",
"version": "0.1.0-develop.10", "version": "0.1.0-develop.9",
"type": "module", "type": "module",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {

View File

@ -1,7 +1,6 @@
import { Buffer } from "buffer"; import { Buffer } from "buffer";
import { Client, factory } from "@lumeweb/libkernel/module"; import { Client, factory } from "@lumeweb/libkernel/module";
import { DataFn, ErrTuple, logErr } from "@lumeweb/libkernel"; import { DataFn, ErrTuple, hexToBuf, logErr } from "@lumeweb/libkernel";
import { hexToBytes } from "@lumeweb/libweb";
import { blake2b } from "@noble/hashes/blake2b"; import { blake2b } from "@noble/hashes/blake2b";
import b4a from "b4a"; import b4a from "b4a";
@ -55,7 +54,8 @@ export class SwarmClient extends Client {
public async connect(pubkey: string | Uint8Array): Promise<Socket> { public async connect(pubkey: string | Uint8Array): Promise<Socket> {
if (typeof pubkey === "string") { if (typeof pubkey === "string") {
pubkey = hexToBytes(pubkey); const buf = hexToBuf(pubkey);
pubkey = this.handleErrorOrReturn(buf);
} }
let existing = Array.from(this._sockets.values()).filter((socket) => { let existing = Array.from(this._sockets.values()).filter((socket) => {