Select Filter
The select
filter makes it possible to filter data that make sense for your cases.
The select filter requires ParseCbor filter enabled to work.
Configuration
Adding the following section to the daemon config file will enable the filter as part of the pipeline:
[[filters]]type = "Select"skip_uncertain = truepredicate = <match>
Examples
Match any tx that interacts with this particular address
predicate = "addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x"
Match any tx that interacts with this particular stake address
predicate = "stake178phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcccycj5"
Match any tx that interacts with this particular asset
predicate = "asset17jd78wukhtrnmjh3fngzasxm8rck0l2r4hhyyt"
Match any tx that holds a particular datum
predicate = "datum1httkxyxp8x0dlpdt3k6cwng5pxj3j"
Match any tx that holds a particular metadata label
predicate = "#127"
Match any tx that interacts with any of these particular address
[filters.predicate]any = [ "addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x", "addr1w8phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcyjy7wx", "addr1vx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzers66hrl8",]
Match any tx that interacts with all of these particular address simultaneously
[filters.predicate]all = [ "addr1w8phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcyjy7wx", "stake178phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcccycj5",]
Match any tx that simultanously interacts with a particlar address, holds a particular asset and present a particular metadata label
[filters.predicate]all = [ "addr1w8phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcyjy7wx", "asset17jd78wukhtrnmjh3fngzasxm8rck0l2r4hhyyt", "#789",]
Match tx that has an output that simultaneously points to a particular address and contains a particular asset
[filters.predicate.match.output]address = "addr1w8phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcyjy7wx"assets = ["asset17jd78wukhtrnmjh3fngzasxm8rck0l2r4hhyyt"]datum = "datum1httkxyxp8x0dlpdt3k6cwng5pxj3j"