Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Keyring spec #451

Open
frankiebee opened this issue Jan 10, 2025 · 0 comments
Open

[DRAFT] Keyring spec #451

frankiebee opened this issue Jan 10, 2025 · 0 comments
Assignees
Milestone

Comments

@frankiebee
Copy link
Collaborator

@entropyxyz/sdk/keys

import Keyring from `@entropyxyz/sdk/keys`
import { generateMnemomnic, mnemomnicToSeed } from `@entropyxyz/sdk/keys`

const mnemomnic = generateMnemomnic()
const seed = mnemomnicToSeed(mnemomnic)
// this of course is an optional key the case here is that a user would like to also load a key they used to deploy programs
const dev = mnemomnicToSeed(mnemomnic, 'my/dev/path')
const keyMaterials = {
  programMod: seed, //or private key
  dev,
} 

const keyring = new Keyring(keyMaterials)

const keyStore = keyring.json()
/*
needs more thoughts:
{
programMod: '0x0123...' //private key? seed?
dev: '0x345...' // private key? seed?
device: '0x789...' // private key? seed?
}

const keyring2 = new Keyring(keyStore)

*/

init

should take all "3" seeds but only requires programMod i'm still stuck on this name i'd prefer not to call it it the program mod sense it's not that till we register it

are curent way of thinking is to have an admin key and registration key
the key that pays for registartion and the key that gets set as the programMod

they can be one in the same (infact they are right now)
however they can also be different. In my personal case i would want them to be different

i think also for "sponsorship" reason we should allow them to be different

Open questions:

  • should you be able to set a different keyring to an already initialized entropy?
entropy.setKeyring(Keyring)
@frankiebee frankiebee added this to the Keyring milestone Jan 10, 2025
@frankiebee frankiebee self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant