Skip to content

Instantly share code, notes, and snippets.

@osoftware
osoftware / covenant.ts
Last active Aug 31, 2019
Bitcoin Cash Covenant with Spedn
View covenant.ts
import { BITBOX } from "bitbox-sdk";
import { SigHash, Spedn, TxBuilder } from "spedn";
async function main() {
// BITBOX boilerplace
const bitbox = new BITBOX();
const mnemonic = "draw parade crater busy book swim soldier tragic exit feel top civil";
const wallet = bitbox.HDNode.fromSeed(bitbox.Mnemonic.toSeed(mnemonic));
const alice = bitbox.HDNode.derivePath(wallet, "m/44'/145'/0'/0/0");
@osoftware
osoftware / Main.hs
Last active Jun 9, 2019
Using a Haskell program compiled with GHCJS as a library in a nodejs app.
View Main.hs
-- Just a sample Haskell program with some functions.
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.JSString
main :: IO JSString
main = return "elo"
You can’t perform that action at this time.