example code below:
client = new EoswsClient(createEoswsSocket(() => new ws(`wss://${config.dfuse.endpoint}/v1/stream?token=${config.dfuse.token}`, { origin: config.dfuse.origin })));
await client.connect();
client.getActionTraces({ accounts: "eoscontract1" }).onMessage(onMessage);
client.getActionTraces({ accounts: "eoscontract2" }).onMessage(onMessage);
I'm getting the following Error-Message:
Does this mean that if I want to stream 2 different actions for two different accounts, I would have to instantiate two EoswsClient-instances and to establish two connections?
Here is the context that I set for the stream:
const undelegatebw = {
accounts: accounts.join("|"),
receiver: receivers.join("|"),
// action_names: "voteproducer,delegatebw,undelegatebw"
action_names: "undelegatebw"
};
const voteproducer = {
accounts: accounts.join("|"),
receiver: receivers.join("|"),
// action_names: "voteproducer,delegatebw,undelegatebw"
action_names: "voteproducer"
};
await dfuseWs.getActionTraces(undelegatebw, options, undelegatebwHandle);
await dfuseWs.getActionTraces(voteproducer, options, voteproducerHandle);