eosnetworkfoundation / mandel-eosjs

Official Javascript Library for Working with EOS Blockchain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roll Our Own Version Support Checks

ericpassmore opened this issue · comments

Work Title

Don't require semver package

Requirements

Get rid of semver package, and write our own class to do the same. Parse the version string from /v1/chain/get_info to make sure features match version of nodeos

Scenarios

Some features are 3.x only. Some features are 4.x only. Throw error when server does not support selected endpoint.

Additional Considerations

Only for transaction, calling the function directly does not check.

Design Notes

Simple class to do what we need, not a generalize Semver replacement

Coding Notes

Write our own class, takes a version string into constructor. Provides comparison methods for equivalent major version, supportsLeap3Features, supportsLeap4Features