![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@faast/coin-payments
Advanced tools
Library to assist in processing cryptocurrency payments, such as deriving addresses and sweeping funds
Library to assist in processing cryptocurrency payments.
npm i @faast/coin-payments
import { CoinPayments } from '@faast/coin-payments'
const coinPayments = new CoinPayments({
seed: '5cf2d4a8b0...ca676651f'
})
To begin processing payments, select your asset
const xrpPayments = coinPayments.forAsset('XRP')
await xrpPayments.init()
Generate a deposit address.
This is useful if you are a hot wallet and don't store the private key. You will need
to keep track of which path node you are on (increasing int
):
let { address, extraId } = xrpPayments.getPayport(1234)
// Customer sends deposit to `address` with destination tag `extraId`
Validate an address:
if (xrpPayments.isValidAddress(depositAddress)) {
// do something
}
Get the balance of an address:
let { confirmedBalance, unconfirmedBalance } = await xrpPayments.getBalance(1234)
Generate a sweep transaction for an address, then broadcast it:
let unsignedTx = await xrpPayments.createSweepTransaction(1234, to)
let signedTx = await xrpPayments.signTransaction(unsignedTx)
let { id: txHash } = await xrpPayments.broadcastTransaction(signedtx)
Generate a simple send transaction
let unsignedTx = await xrpPayments.createTransaction(1234, to, '1.234')
// Then sign and broadcast the transaction
Get a transaction and check if it is confirmed:
let txInfo = await xrpPayments.getTransactionInfo(txHash)
if (txInfo.isConfirmed) {
// txInfo.confirmations > 0
}
In some circumstances, you may want a read-only copy that can do everything but sign. First create it with your seed as usual, then get the public config to use for read only version.
const readOnlyConfig = coinPayments.getPublicConfig()
const readOnlyCoinPayments = new CoinPayments(readOnlyConfig)
See tests or types for more utilities
MIT
FAQs
Library to assist in processing cryptocurrency payments, such as deriving addresses and sweeping funds
The npm package @faast/coin-payments receives a total of 0 weekly downloads. As such, @faast/coin-payments popularity was classified as not popular.
We found that @faast/coin-payments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.