Skip to content

Instantly share code, notes, and snippets.

View murchandamus's full-sized avatar

Mark "Murch" Erhardt murchandamus

View GitHub Profile
@murchandamus
murchandamus / Bech32m-address-samples.txt
Created July 28, 2021 21:42
Mainnet bech32m address examples
Bech32m encoding: bc1pqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqsyjer9e
Superseded bech32 encoding: bc1pqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs3wf0qm
Created by transaction: b53e3bc5edbb41b34a963ecf67eb045266cf841cab73a780940ce6845377f141
Bech32m encoding: bc1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5sspknck9
Superseded bech32 encoding: bc1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ss52r5n8
Created by transaction: fd43650477e0ba6825ae0482a8b0b2b509d5443fa2a8cdd101872752a9171dd6
@murchandamus
murchandamus / Cost of 2-of-3 taproot inputs
Last active May 19, 2020 04:13
Short overview of the costs of 2-of-3 taproot inputs
Everything below is best effort. Corrections welcome! –Murch
==== Key path spending costs ====
* outpoint (txid:vout): 32+4vB
* scriptSig size: 1vB
* nSequence: 4vB
* num witness items: 1WU
* witness item size: 1WU
* signature: 64WU
@murchandamus
murchandamus / bech32InsertionDeletionWeaknessTestVectors.js
Last active December 14, 2019 02:27
Test vectors for bech32 insertion/deletion weakness for 20 and 32 byte starting lengths
const bech32InsertionDeletionWeaknessTestVectors = [
[
// valid 32 byte bech32
'bc1qvfu057ptzatpxf30xc2yunuqad4dg54gkuvx04fuzch6gezltk2q63lcap',
// 33 byte with q insertion at second last position
'bc1qvfu057ptzatpxf30xc2yunuqad4dg54gkuvx04fuzch6gezltk2q63lcaqp'
],
[
// valid 32 byte bech32
'bc1ql6mqttdzpekxmdp9gaglvjtnfg4ydwzdtgcqxxru7f6m0eg9pckqnncqqp',
Verifying that +murchandamus is my blockchain ID. https://onename.com/murchandamus