+
+
+/** An implementation of Filter */
+public interface FilterInterface {
+ /**Registers interest in a transaction with `txid` and having an output with `script_pubkey` as
+ * a spending condition.
+ */
+ void register_tx(byte[] txid, byte[] script_pubkey);
+ /**Registers interest in spends of a transaction output.
+ *
+ * Note that this method might be called during processing of a new block. You therefore need
+ * to ensure that also dependent output spents within an already connected block are correctly
+ * handled, e.g., by re-scanning the block in question whenever new outputs have been
+ * registered mid-processing.
+ */
+ void register_output(WatchedOutput output);
+}
+