diff --git a/src/index.ts b/src/index.ts index 943360b..9304c2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -42,7 +42,7 @@ export default class DHTCache extends EventEmitter { super(); if (!id) throw new TypeError("Must provide id for self"); - this.id = id; + this.id = b4a.from(id) as Buffer; this.bootstrapped = false; this.graph = new DiGraph(); this.connectedTo = new Set();