# hive-js-payment-sdk

> Elastos Hive JS Payment SDK

Latest version **1.0.1** (published 2022-05-30) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hive-js-payment-sdk
pnpm add hive-js-payment-sdk
yarn add hive-js-payment-sdk
bun add hive-js-payment-sdk
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-05-30 |
| First published | 2022-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Elastos |
| Maintainers | chenyufei2022 |

## Links

- npm: https://www.npmjs.com/package/hive-js-payment-sdk
- Repository: https://github.com/elastos/Elastos.Hive.JS.SDK
- Homepage: https://github.com/elastos/Elastos.Hive.JS.SDK#readme
- Issues: https://github.com/elastos/Elastos.Hive.JS.SDK/issues
- npm.io page: https://npm.io/package/hive-js-payment-sdk

## Dependencies (4)

- [web3](https://npm.io/package/web3.md) ^1.7.3
- [bn.js](https://npm.io/package/bn.js.md) ^5.2.1
- [npmlog](https://npm.io/package/npmlog.md) ^6.0.2
- [@walletconnect/web3-provider](https://npm.io/package/@walletconnect/web3-provider.md) ^1.7.8

## Recent versions

- 1.0.1 (latest) — 2022-05-30
- 1.0.0 — 2022-05-25

## README

# Elastos Hive Payment JS SDK

Elastos Hive Payment JS SDK is for the payment service of [Elastos Hive JS SDK](https://github.com/elastos/Elastos.Hive.JS.SDK)

## Install

```shell
npm i --save @elastosfoundation/hive-js-sdk
```

## Build

```shell
git clone https://github.com/elastos/Elastos.NET.Hive.Payment.JS.SDK
cd Elastos.NET.Hive.Payment.JS.SDK
npm install
npm run build
```

## Usage

mainnet usage:

```typescript
    // mainnet
    const contract = await new PaymentContract().initialize();
    
    // access API
    const newOrderId = contract.payOrder(2.5, dstWalletAddress, orderProof)
    const orders = contract.getOrders();
    const order = contract.getOrder(1023);
```                                           

testnet usage:

```typescript
    // testnet
    const contract = await new PaymentContract(true).initialize();

    // access API
    const newOrderId = contract.payOrder(2.5, dstWalletAddress, orderProof)
    const orders = contract.getOrders();
    const order = contract.getOrder(1023);
```

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