Skip to content

Support watching custom scripts#71

Merged
altafan merged 6 commits intovulpemventures:masterfrom
altafan:watch-script
Jan 18, 2024
Merged

Support watching custom scripts#71
altafan merged 6 commits intovulpemventures:masterfrom
altafan:watch-script

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
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