This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

hive-js-payment-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Elastos Hive Payment JS SDK

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

Install

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

Build

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:

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

/hive-js-payment-sdk/

    Package Sidebar

    Install

    npm i hive-js-payment-sdk

    Weekly Downloads

    6

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    8

    Last publish

    Collaborators

    • chenyufei2022