dashpro
v0.0.1
Published
``` import { dashpro, Wallet } from 'dashpro'
Downloads
1
Readme
import { dashpro, Wallet } from 'dashpro'
const wallet = Wallet(process.env.DASHPRO_WALLET_BACKUP_PHRASE)
const newWallet = Wallet()
console.log('New Dash wallet created, please write down your backup phrase to access your funds:\n\n')
console.log(newWallet.backup_phrase)
const { uri, check, paid, cancel } = await dashpro({
to: [{
address: newWallet.address,
amount: {
value: 2500000,
currency: 'ARS'
}
}, {
address: wallet.address,
amount: {
value: 25,
currency: 'DASH'
}
}],
webhook_url: process.env.DASHPRO_WEBHOOK_URL,
memo: 'Split Payment to Two Wallets'
})
paid.then(({ txid, txhex }) => {
})
const shouldCancel = false
if (shouldCancel) {
cancel()
}
const { txid, txhex } = await wallet.pay(uri)
const { status } = await check()
const { uri: receive } = await wallet.receive({
amount: {
currency: 'USD',
value: 52.00
}
})