-
Notifications
You must be signed in to change notification settings - Fork 22
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
Custom Script Accounts: lower level APIs #427
Comments
An alternative could be to drop marina.createAccount('my-account@v2')
marina.useAccount('my-account@v2')
// I don't need any template/contract to do this:
marina.getPublicKey() // { publicKey, derivationPath }
marina.signSchnorr({ sighash, derivationPath }) Then, either the webapp is responsible to generate the script and "send" to marina the generated script. Maybe associated to a derivation path for signing "simple scripts" 🤔 marina.registerScript('my-account@v2', scriptDerivationPath, script) Or the webapp use template-based derivation for the next account path: marina.useAccount('my-account@v2')
marina.getNextAddress({ template, constructorParams })
// marina generates the script and map it with next derivation path TL;DR template becomes an address parameter instead of account parameter. |
This may be very dangerous, if we do not also attach /share the full transaction (ie. pre hashing it) so in the popup we can do the job of hashing to prove and display the verified tx (ie. inputs & outoputs)
So, if no template & params passed, we default to the a specific script ie. Other than that works for me. |
OK to attach base64 pset & input index with sighash in order to let Marina recomputes the message before signing but it prevents the app to get non-sighash signature. Some templates could expect timestamps or external data to be signed by Marina isn't it ?
I would just throw an error if no template. If the user expects wpkh, he should pass a
Yes. is it a problem? It solves lot of migration problem if the app updates its template and want to keep using the same coins/account.
Yes we need a kind of "backup file" containing all the data. If we see template + params compiled as an output descriptor it means a list of descriptors for each account. |
This is a breaking change with the old API right? Would try to not do it
I guess mandates keeping precise metadata when backing up a mnemonic. But I guess is acceptable, since we must do anyway for contract params #391 |
TL;DR
Reasons
What happens
importContract
if want marina to sign/spend it & track coinsPlease @louisinger @altafan @bordalix tell me your thoughts
The text was updated successfully, but these errors were encountered: