bridgecast

0.1.4 • Public • Published

bridgecast

Notify Bridgeport bridges about new transactions

The code is hosted on GitHub and the package is available through NPM.

Installation

npm i bridgecast

Example Usage

const bridgecast = require('bridgecast')

const acceptingBridges = await bridgecast({
  tx: { // An Everett-stype Transaction Envelope
    rawTx: '...',
    inputs: {
      '...': '...'
    },
    mapiResponses: [{'...': '...'}]
  },
  bridges: [
    '...', // Bridge ID 1
    '...' // Bridge ID 2
  ]
})

// acceptingBridges is now an array of the bridge IDs that have processed the transaction
console.log(acceptingBridges)

API

Table of Contents

bridgecast

Notify Bridgeport bridges about new transactions

Parameters

  • obj Object All parameters are provided in an object (optional, default {})

    • obj.bridges Array<String> The array of Bridge IDs to notify (optional, default [])
    • obj.tx Object An Everett-style transaction envelope
    • obj.bridgeportResolvers array<string> The BHRP resolvers used when broadcasting the transaction

Returns Promise<Array<String>> Bridge IDs that accepted the transaction

License

The license for the code in this repository is the Open BSV License.

Package Sidebar

Install

npm i bridgecast

Weekly Downloads

0

Version

0.1.4

License

Open BSV License

Unpacked Size

4.84 kB

Total Files

3

Last publish

Collaborators

  • tonesnotes
  • braydude
  • tyeverett