# sniper-js

> Core JS Module for Sniper.io Platform

Latest version **0.2.0** (published 2018-03-10) · 0 weekly downloads

## Install

```sh
npm install sniper-js
pnpm add sniper-js
yarn add sniper-js
bun add sniper-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2018-03-10 |
| First published | 2018-02-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 126.1 KB |
| Known vulnerabilities | 0 (+3 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | sniper-exchange |
| Keywords | sniper, decentralized, exchange, solidity, ethereum, eos |

## Links

- npm: https://www.npmjs.com/package/sniper-js
- Repository: https://github.com/sniper-exchange/sniper-js
- Homepage: https://github.com/sniper-exchange/sniper-js#readme
- Issues: https://github.com/sniper-exchange/sniper-js/issues
- npm.io page: https://npm.io/package/sniper-js

## Dependencies (7)

- [hoek](https://npm.io/package/hoek.md) 4.2.1
- [web3](https://npm.io/package/web3.md) 1.0.0-beta.30
- [firebase](https://npm.io/package/firebase.md) ^4.10.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) 6.0.0
- [whatwg-fetch](https://npm.io/package/whatwg-fetch.md) ~2.0.3
- [ethereumjs-abi](https://npm.io/package/ethereumjs-abi.md) ^0.6.5
- [ethereumjs-util](https://npm.io/package/ethereumjs-util.md) ^5.1.4

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2018-03-10
- 0.1.1 — 2018-02-07
- 0.1.0 — 2018-02-07

## README

# SniperJS

[![Build Status](https://travis-ci.org/sniper-exchange/sniper-js.svg?branch=master)](https://travis-ci.org/sniper-exchange/sniper-js)
[![npm version](https://badge.fury.io/js/sniper-js.svg)](https://badge.fury.io/js/sniper-js)
[![codecov](https://codecov.io/gh/sniper-exchange/sniper-js/branch/master/graph/badge.svg)](https://codecov.io/gh/sniper-exchange/sniper-js)
[![NSP Status](https://nodesecurity.io/orgs/sniper-exchange/projects/34350ea9-5bcc-455c-9d28-2f807e738fba/badge)](https://nodesecurity.io/orgs/sniper-exchange/projects/34350ea9-5bcc-455c-9d28-2f807e738fba)




### Overview
SniperJS is a javascript library that assists in the of development third-party applications for [sniper.io](https://www.sniper.io/). SniperJS ships as an ECMAScript 6 module, and can run in-browser or in NodeJS. This module aims to provide reusable code in support of a range of applications, from frontends to bots.


### Module Installation
- `npm i --save sniper-js`


### Quickstart
```
import Sniper from 'sniper-js'

// requires web3 Provider
let snpr = new Sniper({
  provider: web3 // can be injected web3 object, or rpc URL string
})

// create an order
snpr.init().then(() => {
  // orderObj contains order data
  snpr.createOrderAsync(orderObj)
  .then((order) => {
    let hash = snpr.getOrderHash(order)

    // verify order signature
    console.log(
      'verification test:',
      snpr.verifySignature(hash, order.maker, order.sig)
    )

    return order
  }).then((order) => {
    // submit order
    snpr.submitOrder(order)
  })
})
```


### Local Installation
- Requires NodeJS & NPM
- `npm i`

#### Test
- `npm test`

#### Develop
- `npm start`

#### Standalone Build
- `npm run build`

---
_Source: https://npm.io/package/sniper-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
