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

Get rid of the hack to retrieve private keys in Cooked.Wallet.walletStakingSK #255

Open
florentc opened this issue Feb 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@florentc
Copy link
Member

florentc commented Feb 6, 2023

To retrieve the private staking key of a wallet, we need to unwrap it from type Pl.MockPrivateKey. There is no way (explicitly exported constructor or field accessor) to do so. Therefore we use a hack in which we define some isomorphic datatype newtype HACK = HACK Cardano.XPrv and unsafeCoerce the Pl.MockPrivateKey to HACK.
We should try to make a PR to expose access to the info in their API.
Also we could try to rely on Data.Tuple.Solo (from base 4.16 which we don't have in our current index-state) to avoid defining HACK.

@florentc florentc added the enhancement New feature or request label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant