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

Support watching custom scripts #71

Merged
merged 6 commits into from
Jan 18, 2024
Merged

Conversation

altafan
Copy link
Collaborator

@altafan altafan commented Jan 16, 2024

This adds 2 new unary rpcs to the notification service to start/stop watching output scripts. The rpcs can be used without having to create and unlock the wallet. Notifications about txs and utxos can be received through the already existing server-side stream rpcs.

To add the above feature, this adds a new domain ExternalScript represented by the already existing AddressInfo and the relative repository.
Every script is identified by its scripthash as defined by electrumx to prevent any possible collision between different scripts.
The user can also pass the blinding private key so that ocean can unblind any confidential output, if any is going to be locked by the given script.

BONUS: This fixes unsubscribing for scripts/account. Before this, ocean would crash if it received a notification from electrum about a deleted script/account.

Please @louisinger review.

@altafan altafan merged commit 0167fed into vulpemventures:master Jan 18, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants