Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastos Hive Payment JS SDK

Elastos Hive Payment JS SDK is for the payment service of Elastos Hive JS SDK

The payment service supports essentials and metamask applications.

Install

npm i --save @elastosfoundation/hive-payment-js-sdk

Build

git clone https://github.com/elastos-trinity/Elastos.Hive.Payment.JS.SDK.git
cd Elastos.Hive.Payment.JS.SDK
npm install
npm run build

Usage

mainnet usage:

// 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:

// 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);

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages