steem-js icon indicating copy to clipboard operation
steem-js copied to clipboard

streamOperations with filter function

Open blueorbitz opened this issue 8 years ago • 5 comments

As far as my understanding goes, this stream operation basically return every operation on every user working on the network. Which will be quite heavy on a long run. As most of the cloud service have a bandwidth quota / restriction.

What I am trying to achieve is basically trying to have a real-time response similar to what websocket does.

blueorbitz avatar Jan 14 '18 03:01 blueorbitz

exactly, and also functions that give special kind of operations like "transfer" or "custom_json"

aminraisy avatar Aug 29 '18 14:08 aminraisy

As most of the cloud service have a bandwidth quota / restriction.

What you're asking for is not something steem-js can do (filtering to saving bandwidth). Yes, an API client can be designed to filter operations (steem-ruby does this). But an API client that filters does so by processing the entire stream. There would be no bandwidth benefit.

inertia186 avatar Aug 29 '18 14:08 inertia186

@inertia186 regardless of bandwidth issue through steem-js can we get just "transfer" operations of an account ? what about through restful APIs documented here https://developers.steem.io ?

aminraisy avatar Aug 31 '18 14:08 aminraisy

Check here:

https://developers.steem.io/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions

We just published a new version of the devportal site and it includes an example at the very bottom on filtering by op type. It's a dsteem example, though. Full streaming tutorial here:

https://developers.steem.io/tutorials-javascript/stream_blockchain_transactions

inertia186 avatar Aug 31 '18 15:08 inertia186

I read your links. thanks alot . but as I understand currently we should get all transaction history and filter them by special op type that we need. no way to directly get just "transfer" type ops even with blockchain API or js libraries. am I right ?

aminraisy avatar Aug 31 '18 16:08 aminraisy