Where I write transaction filter or stream filter ?

+1 vote

Hello,

I know that I can write transaction filter or stream filter by Javascript but when I put the code ?

for example this code from (   )

function filterstreamitem()
 {
 setfilterparam("maxshowndata", 0); /* ensures we are not given the actual data */
  
 var item=getfilterstreamitem();
  
 if (item.size > 1024)
 for (var pub=0; pub<item.publishers.length; pub++)
 if (!verifypermission(item.publishers[pub], "high1"))
 return "Items larger than 1K can only be published by addresses with high1 permissions";
 }

Where I put this code ? what is the path? or file name to copy and paste the code on?

Second question, How can I use it on some of streams not all of streams?
thank you
asked Jan 31 by musharraf90

1 Answer

0 votes
 
Best answer

Filters are installed on chain using the create txfilter or create streamfilter commands. They are activated for transactions and specific streams using the approvefrom command. For more information, please see this page which includes a tutorial at the bottom:

https://www.multichain.com/developers/smart-filters/

answered Feb 1 by MultiChain
selected Feb 3 by musharraf90
...