Skip to content

Instantly share code, notes, and snippets.

@owenkellogg
Created December 29, 2022 09:30
Show Gist options
  • Save owenkellogg/1cdf57c212fc9caa8e05f54d044c6288 to your computer and use it in GitHub Desktop.
Save owenkellogg/1cdf57c212fc9caa8e05f54d044c6288 to your computer and use it in GitHub Desktop.
Spec for powco stream SDK for streaming new b:// protocol messages using BMAP
import { stream } from 'onchain.sv'
const bStream = stream({
app: 'pow.co',
type: 'message',
attributes: {
channel: 'powco-development'
}
})
.on('B', ({txid, txhex, txo}) => {
// One b:// transaction came across matching our requirements
bStream.close()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment