Skip to content

Commit

Permalink
IMporter que les types
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Feb 7, 2024
1 parent 5b4ae7f commit b6e8a72
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/relai.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { PeerId, Libp2p } from "@libp2p/interface";

import { noise } from "@chainsafe/libp2p-noise";
import { yamux } from "@chainsafe/libp2p-yamux";
import { circuitRelayServer } from "@libp2p/circuit-relay-v2";
Expand All @@ -9,7 +11,6 @@ import { tcp } from "@libp2p/tcp";
import { unmarshalPrivateKey } from "@libp2p/crypto/keys";
import { createFromPrivKey } from "@libp2p/peer-id-factory";
import { createLibp2p } from "libp2p";
import { PeerId, Libp2p } from "@libp2p/interface";
import {
fromString as uint8ArrayFromString,
toString as uint8ArrayToString,
Expand Down Expand Up @@ -62,9 +63,9 @@ export const créerNœud = async () => {
};

export const obtAdressesNœud = (nœud: Libp2p): string[] => {
console.log(`Node started with id ${nœud.peerId.toString()}`);
console.log(`Nœud lancé avec id : ${nœud.peerId.toString()}`);
console.log(
"Listening on: ",
"Le nœud écoute sur : ",
nœud.getMultiaddrs().map((ma) => ma.toString()),
);
return nœud.getMultiaddrs().map((ma) => ma.toString());
Expand Down

0 comments on commit b6e8a72

Please sign in to comment.