Galay Client
JavaScript client library for the Galoy stack. This is used in front-end applications like the web and mobile wallets.
Installation
Install the package with:
npm i @galoymoney/client
yarn add @galoymoney/client
Usage
parsePaymentDestination
import { parsePaymentDestination } from "@galoymoney/client"
const { valid, paymentType, amount } = parsePaymentDestination({
destination: "username or invoice or bitcoin address",
network: "mainnet",
pubKey: "nodePubKey",
})
Test
Test with Jest framework:
yarn test
Build
Build production (distribution) files in dist folder:
yarn build
Local development
Run:
yarn link
npm link
and in your test project run:
yarn link @galoymoney/client
npm link @galoymoney/client
If you want to remove the symlink, run:
yarn unlink @galoymoney/client
npm unlink @galoymoney/client
yarn unlink
npm unlink
Please check more details in npm link or yarn link