From 50431e81921392fd71d1328dcc44aac8ffac5b11 Mon Sep 17 00:00:00 2001 From: frankie Date: Mon, 27 May 2024 07:47:53 -1000 Subject: [PATCH] keys: only in debug mode now because of address bug --- src/keys/README.md | 14 +++++--------- src/keys/index.ts | 5 +++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/keys/README.md b/src/keys/README.md index ce53655a..23040436 100644 --- a/src/keys/README.md +++ b/src/keys/README.md @@ -1,7 +1,10 @@ +## THIS IS IN ALPHA WIP EXPECT RAPPID BREAKING CHANGES FOR NOW THIS IS A NOTES BUCKET + How "Key mangment should be done in the sdk" the user hold onto the seed every class will create their own key via a set derivation path except for the device key. the derivation path for the device key should be by Derivation Path + ```ts //store that private key @@ -74,7 +77,6 @@ a program dev account does not need to be registered. Its main function is to de can have all or any keys be - A note about verifying keys: verifying keys are what is returned when a user registers an entropy account on chain this verifying key is what a signatures public key will be verified against. It is possible for a single entropy account to have many verifying keys so it is recommend that after registering an entropy account to store meta information about a particular configuration for example: @@ -106,7 +108,6 @@ A seed is what we use to generate keys and a mnemonic is what a end user sees generateMnemonic - generateSeed mnemonicToSeed @@ -114,25 +115,20 @@ mnemonicToSeed seedToMnemonic to present to end users a phrase - end user facing: createEntropyAccount({seed, type: EntropyAccountType }) - - entropyAccountToSigner - ```ts - /*this is pseudo code will not run if you try it*/ const storedAccount: EntropyAccountInfo = loadFromStorage() -const account: EntropyAccount = /*create a new account*/ createEntropyAccount(storedAccount)// or loads an account from storage +const account: EntropyAccount = + /*create a new account*/ createEntropyAccount(storedAccount) // or loads an account from storage account.on('update', (fullAccountInfo) => persist(fullAccountInfo)) const entropy = new Entropy({ account }) - ``` diff --git a/src/keys/index.ts b/src/keys/index.ts index b5be1997..5d0d2296 100644 --- a/src/keys/index.ts +++ b/src/keys/index.ts @@ -130,8 +130,9 @@ export default class Keyring { } #formatAccounts (accounts: EntropyAccount): EntropyAccount { - const { seed, mnemonic, debug, type, admin } = accounts - + const { seed, mnemonic, type, admin } = accounts + // this is because stuff is broken outside of debug mode so making it true always + const debug = true const entropyAccountsJson = { debug, seed: seed ? seed : utils.seedFromMnemonic(mnemonic),