@steban1/test-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

BchSwap SDK

Type Script library to connect with the BCH Swap protocol

Publishing it to NPM

  • Run cd ~
  • Run git clone https://gitlab.com/pranesh.as26/bchswap-sdk
  • Make sure the FACTORY_ADDRESS, CHAIN_ID and INIT_CODE_HASH are updated in the /src/constants.ts file.
  • Don't forget to update the wBCH address in the /src/entities/token.ts file.
  • Update the project name and description in the package.json
  • Run rm -rf package-lock.json
  • Run npm install tsdx
  • Run npm login run only if your account is not logged in
  • Run npm publish (may need --access public or update package.json to include access: public)
  • Publish this SDK to NPM as a npm library under your organization (to be used in the interface)_

Running tests

To run the tests, follow these steps. You must have at least node v10 and yarn installed.

First clone the repository:

git clone https://gitlab.com/pranesh.as26/bchswap-sdk

Move into the bchswap-sdk working directory

cd bchswap-sdk/

Install dependencies

yarn install

Run tests

yarn test

You should see output like the following:

yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.

Readme

Keywords

Package Sidebar

Install

npm i @steban1/test-sdk

Weekly Downloads

0

Version

1.0.4

License

GPL-3.0-or-later

Unpacked Size

390 kB

Total Files

31

Last publish

Collaborators

  • steban1