Merge feat/logger #1
@@ -218,11 +218,9 @@ export class Libp2pComponent implements ILibp2pComponent {
|
|||||||
tcpPort: this.options.config?.tcpPort,
|
tcpPort: this.options.config?.tcpPort,
|
||||||
wsPort: this.options.config?.wsPort,
|
wsPort: this.options.config?.wsPort,
|
||||||
// Convert Uint8Array to base64 for passing to native module
|
// Convert Uint8Array to base64 for passing to native module
|
||||||
keypair: this.options.keypair
|
// Using Buffer.from for proper encoding of binary data
|
||||||
? {
|
privateKey: this.options.keypair?.privateKey
|
||||||
privateKey: btoa(String.fromCharCode(...this.options.keypair.privateKey)),
|
? Buffer.from(this.options.keypair.privateKey).toString('base64')
|
||||||
publicKey: btoa(String.fromCharCode(...this.options.keypair.publicKey)),
|
|
||||||
}
|
|
||||||
: undefined,
|
: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user