Socket
Book a DemoInstallSign in
Socket

js-buxclient

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

js-buxclient

TypeScript library for connecting to a Bux server

unpublished
latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

JavaScript Bux client

Connect to a bux server from JavaScript

Usage

There is a peer dependency on the bsv library. This version of the JS Bux client supports version 1.x of the bsv library.

import bsv from 'bsv';
import BuxClient from 'js-buxclient';

const server = "http://localhost:3003/v1"
const transportType = 'http'; // or graphql
const Xpriv = bsv.HDPrivateKey.fromRandom();

const buxClient = new BuxClient(server, {
  transportType,
  xPriv,
  signRequest: true,
});

Connection options

OptionDescription
transportTypeTransport type to use for server requests"http" or "graphql"
xPrivbsv HDPrivateKey instance
xPrivStringHD Private key string"xprv....."
xPubbsv HD Public key instance
xPubStringHD Public key string"xpub....."
accessKeyStringHex private part of an access keystring
signRequestWhether to sign all requests sent to the serverboolean
debugWhether to turn debugging onboolean

Connection as a Bux admin

You can add the admin key to the Bux client after initialisation to support admin requests (registering an xPub).

const adminKey = 'xprv.....';
buxClient.SetAdminKey(adminKey);

Keywords

bux

FAQs

Package last updated on 07 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts