cryptolandtech / moonlet-core

Moonlet Wallet - Core Package
MIT License
13 stars 8 forks source link
cryptocurrencies ethereum javascript-library typescript wallet zilliqa

Moonlet - Core Package

Build Status Coverage Status

Usage

See moonlet-core-usage repository

Setup

npm install

Build lib

npm run build

Testing

Run the whole testing suite

npm run test

Single test run

npm run test-single test/testfile.ts

Run tests in specific path

npm run test-single "test/1.core/*.ts"

Test Coverage

npm run coverage

All test commands have a -reuse option available, meant to allow developers to keep TestRPC running between multiple invocations.

Example:

npm run test-reuse
npm run test-single-reuse test/testfile.ts
npm run coverage-reuse

TestRPC Helpers

Start All test rpcs

npm run start-all-rpcs

Stop all running test rpcs ( that have pids stored )

npm run stop-all-rpcs

Adding support for new blockchains

Fork this repo.

add your identifier in src/core/blockchain.ts

copy src/blockchain/ethereum to src/blockchain/yourblockchain and create your types

add your class indexer into src/class.store.ts

copy test/ethereum to test/yourblockchain and update the tests

make sure to add your testrpc setup scripts in the /scripts folder

Once complete, submit a PR.

License

MIT