Skip to content

Instantly share code, notes, and snippets.

@onggunhao
onggunhao / blockchain-websocket-api.md
Last active August 9, 2023 20:26
Annotated version of Blockchain.info's Websocket Transaction

Annotated Blockchain.info Websocket API

This is an annotated version of Blockchain.info's Websocket API with explanations of message contents.

Multiple Inputs and Outputs

Bitcoin transactions (especially if large) may have multiple inputs and outputs in a single transaction. http://chimera.labs.oreilly.com/books/1234000001802/ch02.html explains this very concisely.

Sample Transaction

The JSON object below is the actual message received from the Blockchain.info Websockets API for the transaction 0857b9de1884eec314ecf67c040a2657b8e083e1f95e31d0b5ba3d328841fc7f. You can see the Blockchain.info transaction page for this transaction here.

Transaction Page:

@moimikey
moimikey / colors.js
Last active August 23, 2022 17:08
colors!
var colors = {
indigo: "#4b0082",
gold: "#ffd700",
hotpink: "#ff69b4",
firebrick: "#b22222",
indianred: "#cd5c5c",
yellow: "#ffff00",
mistyrose: "#ffe4e1",
darkolivegreen: "#556b2f",
olive: "#808000",