-
Notifications
You must be signed in to change notification settings - Fork 214
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
Refactor signTx
#4128
base: master
Are you sure you want to change the base?
Refactor signTx
#4128
Conversation
$ Cardano.InAnyCardanoEra era | ||
$ Write.toCardanoTx | ||
$ f eraForSigning | ||
$ Write.fromCardanoTx ctx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should possibly take a value level RecentEra era
instead of the constraint
-- FIXME: HACK because shared wallets have 'ScriptHash -> addrXPrv' lookup, | ||
-- not 'KeyHash -> addrXPrv' lookup. | ||
timelockHashes = Set.fromList $ map (fromCAScriptHash . CA.toScriptHash) timelockScripts | ||
where | ||
fromCAScriptHash = fromMaybe err . keyHashFromBytes . CA.unScriptHash | ||
where | ||
err = error "fromCAKeyHash invalid hash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to solve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably we can just add a separate resolver without downside
Problem is that 'mkExtraWitness' isn't signed by keyLookup anymore. mkExtraWitness :: Cardano.Hash Cardano.PaymentKey -> Maybe (Cardano.KeyWitness era) mkExtraWitness vkh = do -- NOTE: We cannot resolve key hashes directly, so create a one-time -- temporary address with that key hash which is fine to lookup via the -- address lookup provided above. It works _fine_ because the discovery -- of addresses is done properly based on the address constituents (i.e. -- the key hash) and not the overall address itself. let addr = Cardano.makeShelleyAddress networkId (Cardano.PaymentCredentialByKey vkh) Cardano.NoStakeAddress
This reverts commit f503e1a.
Redefine-> NOisOurs
for SeqState takingKeyFingerprint
instead (basically aKeyHash
)estimateKeyWitnessCount
TRANS_NEW_ASSETS_CREATE_02 - using reference script
Comments
Issue Number
ADP-2675