Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@hashflow/market-maker

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashflow/market-maker

Javascript library to facilitate interactions with Hashflow backend and smart contracts for market makers

npmnpm
Version
0.0.9
Version published
Weekly downloads
30
400%
Maintainers
2
Weekly downloads
 
Created
Source

maker-js

Typescript library which exposes the hashflow market maker APIs

Initializing the API

All necessary functions are exposed through the HashflowMaker object. This API object takes the following arguments to its constructor:

  • name: Your market maker's name. This must match the name that used when requesting the Hashflow team to add your market maker to the allowlist.
  • authKey: Your authentication key. These are unique keys generated by the Hashflow team during the vetting phase. If you haven't gone through this process, you can contact us on Discord.
  • engine: An instance of MakerEngine which defines the configuration, pricing strategy, and callback to handle trade confirmation. See next section.
  • signer: An instance of eths.Signer that will be used to sign quotes on your behalf.
  • environment (optional): Allows specifying 'staging' for connecting to the non-production API. By default, this is set to 'production'.

Start by importing and initializing the HashflowMaker object.

import { Signer, VoidSigner } from 'ethers';
import { HashflowMaker } from '@hashflow/market-maker';

const signer: Signer = new VoidSigner('...');

const maker = new HashflowMaker(
  'MyMakerName', // address
  '!XYZ...ABC', // auth key
  engine, // see definition in source code
  signer,
  'staging',
);

FAQs

Package last updated on 09 Oct 2023

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