Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

@dazaar/scatter-pay

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dazaar/scatter-pay

Pay for Dazaar feeds using Scatter

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

dazaar-scatter-pay

Pay for Dazaar feeds using Scatter

const DazaarPay = require('dazaar-scatter-pay')

// pass in an array of dazaard card entries
const payments = [{ currency: 'EOS', payTo: 'dazaartest22' }]
const sellerKey = Buffer.from('dazaar-seller-key', 'hex')

const pay = new DazaarPay(payments, sellerKey)

for (const provider of pay.supported) {
  console.log('Supports', provider.name)
}

// Will call out to Scatter to request the purchase
pay.supported[0].buy(buyerKey, '1.0000 EOS', function (err) {
  console.log('bought for 1 EOS?', err)
})

API

pay = new DazaarScatterPay(payments, sellerKey)

Make a new instance.

payments should be an array of payment objects, usually retrieved using a Dazaar card. sellerKey should be the Dazaar sellers key as a buffer.

pay.supported

A list of supported Payment objects corresponding to your payments input.

payment = pay.match(paymentEntry)

Match a specific entry from your payments input to a provider. If not supported null is returned.

payment.buy(buyerKey, amount, cb)

Purchase Dazaar time for the given amount. buyerKey should be the buyer's key as a buffer.

FAQs

Package last updated on 24 Jun 2020

Did you know?

Socket

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.

Install

Related posts