bridgecast

Notify Bridgeport bridges about new transactions

Usage no npm install needed!

<script type="module">
  import bridgecast from 'https://cdn.skypack.dev/bridgecast';
</script>

README

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

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

License

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