
Product
Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies
A safer, faster way to eliminate vulnerabilities without updating dependencies
@waxio/eosio-statereceiver
Advanced tools
State receiver module for connecting to the state history plugin
const StateReceiver = require('@waxio/eosio-statereceiver');
const sr = new StateReceiver({
startBlock: 200,
socketAddresses: [process.env.SOCKET_ADDRESS || 'ws://localhost:8080'],
eosEndpoint: process.env.EOS_ENDPOINT || 'http://localhost:8888',
deserializerActions: ['eosio.token::transfer'],
});
// sample trace handler
sr.registerTraceHandler({
contractName: 'eosio.token',
actionName: 'transfer',
async processTrace(block_num, traces, block_time) {
//
},
});
sr.onError = (err) => {
sr.stop();
console.error(`State receiver stop due to ERROR:`, err);
};
sr.start();
Example can be found in state-receiver.js.
Running example:
export SOCKET_ADDRESS=http://localhost:8080
export EOS_ENDPOINT=http://localhost:8888
npm run dev
sample working log
$ npm run dev
> @waxio/eosio-statereceiver@2.0.0 dev /home/ubuntu/eosio-statereceiver
> npm run state-receiver
> @waxio/eosio-statereceiver@2.0.0 state-receiver /home/ubuntu/eosio-statereceiver
> node ./examples/state-receiver.js
Creating eosApi with endpoint: http://state-node-host:8888
Websocket connecting to: http://state-node-host:8080
Receiving abi...
Requesting blocks, Start : 20284880, End : 4294967295, Max Messages In Flight : 5
20284884 bridge.wax::nft2wax hg.wam
20284890 bridge.wax::nft2wax hg.wam
Received 918 B/s; Queue size: 20
Received 946.5 B/s; Queue size: 39
25077 returnvalue::returnstruct return value {"value1":"test value1 value1","value2":35594}
25264 returnvalue::returnstring return value "test test action return string"
...
FAQs
State receiver module for connecting to the state history plugin
We found that @waxio/eosio-statereceiver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.