@0x/neon-router
v0.4.0
Published
0x API /swap order router
Downloads
1,124
Keywords
Readme
Neon bindings for 0x API Router
For more information about 0x API see https://0x.org/api.
Developers
Test
cargo test
npm run build
npm run test
Plotting liquidity curves for local development
When building the module with the plots
feature enabled, the router will create a ./plots
folder relative to the folder it is executed from and output plots of the curves for every sampled source.
Building with all optional features enabled
All optional features can be enabled by building with
npm run build:all_features
Publishing the package
Production npm publish
- Bump the version appropriately in the
package.json
, commit with the message[publish binary]
and push to the remote. An action will automatically build the binaries and upload them to S3 - Publish the new version to npm with
npm run publish:npm
Private gitpkg publish
- Bump the version by running
npm run publish:private:bump_version
, commit with the message[publish binary]
and push to the remote. An action will automatically build the binaries and upload them to S3 - Publish the package to gitpkg by running
npm run publish:private
- See Quip doc about how to use gitpkg published packages
Developing with 0x API locally
You can develop neon-router directly towards you local 0x API instance, but it requires a bit of setup
- In
neon-router
runyarn link
- In
neon-router
runnpm run build
ornpm run build:all_features
- In
asset-swapper
runyarn link "@0x/neon-router" && yarn build
- In
0x-api
runyarn link "@0x/asset-swapper"
- You can now make changes to the router, rebuild it, then restart 0x API to use the updated version