1.0.1 • Published 1 year ago

payed v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

1.0.1

1 year ago

1.0.0

1 year ago