Skip to content

Commit

Permalink
feat(daemon): store all formulas + add Handle #2089
Browse files Browse the repository at this point in the history
feat(daemon): store endo bootstrap and default host formulas
  • Loading branch information
kumavis authored Feb 20, 2024
2 parents ab3f1c0 + e5d7082 commit e9f7049
Show file tree
Hide file tree
Showing 8 changed files with 754 additions and 297 deletions.
3 changes: 2 additions & 1 deletion packages/daemon/src/daemon-node-powers.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,12 @@ export const makeDaemonicPersistencePowers = (
const provideRootNonce = async () => {
const noncePath = filePowers.joinPath(locator.statePath, 'nonce');
let nonce = await filePowers.maybeReadFileText(noncePath);
const isNewlyCreated = nonce === undefined;
if (nonce === undefined) {
nonce = await cryptoPowers.randomHex512();
await filePowers.writeFileText(noncePath, `${nonce}\n`);
}
return nonce.trim();
return { rootNonce: nonce.trim(), isNewlyCreated };
};

const makeContentSha512Store = () => {
Expand Down
Loading

0 comments on commit e9f7049

Please sign in to comment.