@readyio/ready-lib v2.5.9
Ready Lib
Installing Ready Lib for a project
Add ready lib dependencies via gitlab: Modify package.json as
"dependencies": { "ready-lib": "git+https://git.cystack.org/ready/ready-lib.git" }Install with npm
npm installor with yarn
yarnReintall library when there's new version
npm install ready-lib -f
Usage
Import
readylibto invoke essential methods. E.g., to get transaction history of a Polygon wallet:import {readylib} from '@readyio/ready-lib' const txns = await readylib.queryAllTransactions("0x1b0f42570c8b32a1023cb33e1a1eaa4a1f0d8d4a", readylib.ChainId.POLYGON, { limit: 20, from: "19964669", to: "19981387" })On the other hand, exported methods and types can also be called directly without
readylibimport
Get started for developing Ready Lib
Prerequisite:
- Node.js
- Yarn/Npm
- pre-commit
Steps
Download dependencies with yarn or npm
yarn- Note that, as a library's perspective, package.json is the single source of truth and developers should not rely on
package-lock.jsonoryarn.lockto re-create the same environment. A good practice is to delete those lock files &node_modulesand then reinstall dependencies to test ifpackage.jsonis good to go.
- Note that, as a library's perspective, package.json is the single source of truth and developers should not rely on
Installing pre-commit hooks (for god's sake, we should avoid commiting & pushing those stealthy secrets asap)
pre-commit install
Quick Nodes (todo: categorize these notes)
- Use *.spec.ts for quickly testing our modules. We will add more cases in the future. The code base now is not in good coverage yet.
- Put secrets concentrating in a place for easier ignoring pushing them.
- For mock data that we're afraid of being catched by gitleaks, use
.gitleaksignore
TODO:
Development Helpers
- add more tests (both happy & unhappy cases)
- auto install pre-commit hooks between team members
- config example folder for a greater usability
- add dependency bot for real-time alert
CI/CD
- run all unit tests before merging
- run examples as a test pipeline
11 months ago
11 months ago
10 months ago
7 months ago
9 months ago
7 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago