Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function makeRootBlock(appKeyPair: Object) {
const rootBlock = {
trustchain_id: new Uint8Array(0),
nature: preferredNature(NATURE_KIND.trustchain_creation),
author: new Uint8Array(32),
payload: appKeyPair.publicKey,
signature: new Uint8Array(tcrypto.SIGNATURE_SIZE)
};
rootBlock.trustchain_id = hashBlock(rootBlock);
return rootBlock;
}