0.29.3-debug-best-trade.3 • Published 3 months ago

@pier-wallet/lib v0.29.3-debug-best-trade.3

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
3 months ago

lib

Installation

npm i @pier-wallet/lib

or

yarn add @pier-wallet/lib

Development

To create

npm version prerelease --preid=debug
npm version patch
npm version minor
npm version major

Read about semantic versioning

Usage

import { HarmonyClient, ... } from "@pier-wallet/lib"

Advanced

Build the package to the dist folder by running the following command.

npm run build

Publish the dist folder to the NPM repository.

Exports

  • HarmonyClient.
  • MerkleBytes.
  • MerkleHex.
  • RelayerClient.
  • SmartVault.
  • Totp.
  • Utils.
  • Wallet

Modules

Relayer - should make API calls to relayer server. Blockchain - should handle all the blockchain communications. Smartwallet - should handle creation and management of a smart wallet.

On Relayer Update

Make sure we have the latest version of the relayer --> update package.json Make sure to fix all breaking changes

How to link this library in your project

Due to how webpack resolves modules, npm-linking this library the normal way (npm link @pier-wallet/lib) will not work.

To circumvent this, you can define the destination of the build of this library in a .env file:

# .env
CONSUMER_PROJECT_PATH=/path/to/your/consumer/project

After that, start watching for changes:

... now you can make build this library and see the changes in the consumer project immediately.