Skip to content

blinkbitcoin/blink-client

 
 

Repository files navigation

Galoy Client

JavaScript client library for the Blink stack. This is used in front-end applications like the web and mobile wallets.

Installation

Install the package with:

yarn add @blinkbitcoin/blink-client

Usage

parsePaymentDestination

import { parsePaymentDestination } from "@blinkbitcoin/blink-client"

const { valid, paymentType, amount } = parsePaymentDestination({
  destination: "username or invoice or bitcoin address",
  network: "mainnet", // or signet or regtest
})

Test

Test with Jest framework:

pnpm test

Build

Build production (distribution) files in dist folder:

pnpm build

Local development

using pnpm

Run:

pnpm link --global

and in your test project run:

pnpm link --global @blinkbitcoin/blink-client

If you want to remove the link, run:

# in your test project
pnpm unlink @blinkbitcoin/blink-client

# in blinkbitcoin/client folder
pnpm unlink --global
using yarn

Run:

yarn link

and in your test project run:

yarn link @galoymoney/client

If you want to remove the symlink, run:

# in your test project
yarn unlink @galoymoney/client

# in galoymoney/client folder
yarn unlink
using yalc

Run:

# in galoymoney/client folder
yalc publish

in your test project run:

yalc add @galoymoney/client

If you want to remove the symlink, run:

# in your test project
yalc remove @galoymoney/client

to update changes, you have to run yalc publish before run:

# in your test project
yalc update

About

JavaScript client library for the Blink stack

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 85.9%
  • JavaScript 11.2%
  • Shell 2.0%
  • Nix 0.9%