Normal Stream
To initialize stream, you first create an instance of ZebecStreamService client in the following way:
const config = {
networkId: nearConfig.networkId,
nodeUrl: nearConfig.nodeUrl,
contractId: streamContractId,
keyStore, // InMemoryKeystore
};
const actions = {
streamActions: new StreamActions(),
}
const client = new ZebecStreamService(
account.accountId,
config,
actions,
);
Note: For Node application, keystore should be passed by creating InMemoryKeyStore object, while for Browser application it can be undefined.
Last modified 6mo ago