payed

1.0.1 • Public • Published

Payed

Payed is a NodeJS module that lets you check if a transaction is made on the ethereum network. It works using the etherscan API so you will need to get an etherscan API key

Install

npm i payed

Initializing

First you will need import Payed:

import Payed from "payed"

Then you can initialize it by providing your API key:

const payed = new Payed("YOUR_API_KEY")

Usage

To use payed to confirm a payment, you can use the confirm method

let res = await payed.confirm(
    "SOURCE_ADDRESS", 
    "DESTINATION_ADDRESS", 
    "PAYMENT_AMOUNT_IN_USD"
)
console.log("Confirmed?", res)

Or you can use the .then() syntax:

payed.confirm(
    "SOURCE_ADDRESS", 
    "DESTINATION_ADDRESS", 
    "PAYMENT_AMOUNT_IN_USD"
).then(res=>{
    console.log("Confirmed?", res)
}).catch(err=>{
    console.log("Error!", err)
})

License

This project is under MIT license, feel free to use it in your projects

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i payed

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.59 kB

    Total Files

    5

    Last publish

    Collaborators

    • ngn13