How to create stream Onchain instread of Offchain

+2 votes
Hello,

How to create stream Onchain instread of Offchain.

Because the defult is that the stream items are stored on offchain and I would like to have onchain and I would know how to retrive the data if the stream items onchain ?

thank you so much.
asked Feb 6, 2022 by anonymous

1 Answer

+2 votes

By default stream items are actually on-chain, you need to pass the extra parameter offchain to publish them off-chain (with just a hash on chain). And the method of item retrieval is the same in either case, as described in the 'Querying subscribed streams' APIs here:

https://www.multichain.com/developers/json-rpc-api/

answered Feb 7, 2022 by MultiChain
So if it is onchain it means the stream items are stored to everynode in the blockchain even if the node not subsecrib the stream ?
Yes, that's right, on-chain items are stored as part of the blockchain which every node keeps a copy of.
...