Commit 1e8f51ac authored by Javier Diaz's avatar Javier Diaz
Browse files

Debugging

parent f7af9901
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ async function newGrpcConnection(): Promise<grpc.Client> {

async function newIdentity(): Promise<Identity> {
    const certPath = await getFirstDirFileName(certDirectoryPath);
    console.log("DEBUG", certPath);
    const credentials = await fs.readFile(certPath);
    return { mspId, credentials };
}
@@ -116,6 +117,7 @@ async function getFirstDirFileName(dirPath: string): Promise<string> {

async function newSigner(): Promise<Signer> {
    const keyPath = await getFirstDirFileName(keyDirectoryPath);
    console.log("DEBUG2", keyPath);
    const privateKeyPem = await fs.readFile(keyPath);
    const privateKey = crypto.createPrivateKey(privateKeyPem);
    return signers.newPrivateKeySigner(privateKey);