NOdejs Api functions multichain2.0

+1 vote

Hello Devs,

I am working on stream filter and trying to implement stream filter through nodejs rest api which willl require creatfrom ad approvefrom methods in nodejs to test so just wanted to no where would i get all this method?
And
How can i deploy this filter through nodejs api rather then  using cli mode?
create txfilter filter1 '{}' 'function filtertransaction() { var tx=getfiltertransaction(); if (tx.create) return "Stream creation temporarily disabled"; }' 

asked Feb 4, 2019 by kheteshrotangan

1 Answer

0 votes
Creating a filter is just a regular API call, in the same way as any other. The code for the filter is passed as a string to the API.
answered Feb 4, 2019 by MultiChain
1)Here "create" is the api call for cretaing filter and deploy it on chain right?
2)I cannnot implement it through by creating any webservice and deploy it to chain ?
3)Actually i want to build UI where i can right code and want to deploy on multichain network and install that particular in every node in network ?
for that i have to build webservice that can take this txfilter code as string and do api call create for installing tx filter in every node?

also i want to achieve approve and diable txfilter throudh webservice how can i do that ?

please help me for this..

Thanks in advance
Yes, you can do all this through a web service if you want. It just has to use the right API commands on MultiChain behind the scenes.
do not want to use api command ... i wanted to refer api method which will directly interact with network.

for example:
I have to deploy this code by node js api method

"create txfilter filter1 '{}' 'function filtertransaction() { var tx=getfiltertransaction(); if (tx.create) return "Stream creation temporarily disabled"; }' "
I'm not sure I understand the question. Any library built for MultiChain in a particular programming language is just wrapping the MultiChain API calls in functions of that programming language. There's no more direct access unless you start wanting to get deep into the peer-to-peer protocol of a MultiChain network – this is not recommended unless you really need to.
...