Merge feat/logger #1

Merged
chrda81 merged 2 commits from feat/logger into main 2025-09-18 15:25:17 +02:00
Showing only changes of commit 739ec66898 - Show all commits

View File

@@ -218,11 +218,9 @@ export class Libp2pComponent implements ILibp2pComponent {
tcpPort: this.options.config?.tcpPort,
wsPort: this.options.config?.wsPort,
// Convert Uint8Array to base64 for passing to native module
keypair: this.options.keypair
? {
privateKey: btoa(String.fromCharCode(...this.options.keypair.privateKey)),
publicKey: btoa(String.fromCharCode(...this.options.keypair.publicKey)),
}
// Using Buffer.from for proper encoding of binary data
privateKey: this.options.keypair?.privateKey
? Buffer.from(this.options.keypair.privateKey).toString('base64')
: undefined,
};