Skip to content

Instantly share code, notes, and snippets.

View ECBSJ's full-sized avatar

ECBSJ ECBSJ

View GitHub Profile
@ECBSJ
ECBSJ / btc-tx-data.js
Created September 25, 2024 16:25
Fetching bitcoin tx metadata needed for `clarity-bitcoin-lib-v5` contract's `was-tx-mined-compact` function parameters.
import mempoolJS from "@mempool/mempool.js"
import { Transaction } from "bitcoinjs-lib"
const {
bitcoin: { transactions, blocks }
} = mempoolJS({
hostname: "mempool.space"
})
export const getTxHex = async txid => {
@ECBSJ
ECBSJ / snippet-1.tsx
Last active September 18, 2024 13:48
Copy/Paste snippets for the Runes Dashboard end-to-end tutorial.
// insert in the header.tsx file after the Runes-Logo `Link` element
<Link
href={"https://leather.io/learn/bitcoin-runes"}
target="_blank"
className={buttonVariants({ variant: "link" })}
>
What are Runes?
</Link>
<Link