-
Notifications
You must be signed in to change notification settings - Fork 19
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
Restricted asset account #238
base: master
Are you sure you want to change the base?
Conversation
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.
I would change the behavior and signature of allowCoin to something more high level such us approveSpend
API, otherwise the web app must handle coin selection and utxos outpoint, which can be not that practical
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.
We should allow user to opt-in for a "Security Account powered by CoinOS" via a checkbox in the onboarding phase too, and users that have already onboarded before this change via settings.
UPDATE: enrich CoinosProvider (implementing the first version of the interface proposed here<--) |
This PR aims to let the user pair Marina with a cosigner and then "allow" to spend some funds via another injected provider.
New Domain:
Account
wallet
reducer now stores the account data. Each account is identified by anAccountID
.encrypted mnemonic
and all the main data used to restore the Main Marina wallet represents themainAccount
.Restricted Asset account
Cosigner
interface."Allowance" provider
the
coinos
provider is injected viainject-script.ts
. Its implementation is described in coinosBroker file. It let's togetCoins
--> returns the utxos owned by the 2of2 Marina account andallowCoin
--> create a SIGHASH_NONE tx and send it toCosigner
(via Cosigner.allow method).mocked cosigner
This PR uses a mocked cosigner for testing purposes as a
Cosigner
interface.TODO:
This PR is the first base block for the restricted assets but need some task to be fully complete:
@tiero please review