Created
December 29, 2022 09:30
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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