How to pass js-code in node.js api for creating streamfilters.?

+2 votes


type: "streamfilter",

name: "filtt1",



"js-code":'function filterstreamitem() { var item=getfilterstreamitem(); if (item.keys.length<2) return "At least two keys required";}'


is this the right way to pass?

facing this error

{ code: -8,
  message: 'Invalid restrictions, should be object or boolean false' }


asked Aug 1, 2019 by anonymous

1 Answer

0 votes
I'm not sure if the API you're using has been updated yet to support creating filters. You may want to contact the authors about this, or use more direct JSON-RPC API calls instead.
answered Aug 2, 2019 by MultiChain