Skip to content

Instantly share code, notes, and snippets.

@davecgh
davecgh / commands.sh
Created January 31, 2016 22:21
Using OpenSSL To Generate a Wildcard Decred Certificate Pair
openssl ecparam -name secp521r1 -genkey -out dcrd.key
openssl req -new -x509 -key dcrd.key -out dcrd.cert -sha512 -days 3650 -extensions v3_req -config ./openssl.cnf
@davecgh
davecgh / build_btcd.sh
Created October 20, 2015 18:13
Shell script to build btcd with the git commit in the description.
#!/bin/sh
cd $GOPATH/src/github.com/btcsuite/btcd
go build -ldflags "-X main.appBuild=$(git describe)"
@davecgh
davecgh / btcd_pull_request_management.md
Last active September 20, 2018 19:43
Managing a btcd Pull Request for Code Contibutions

Initial Preparation

The first step is to read the Code Contribution Guidelines documentation to get a good understanding of policies used by the project

Once that is done, the following commands illustrate a straight forward setup for submitting pull requests to the project:

One time setup

  • Fork btcd on github
  • Run the following command to obtain btcd, all dependencies, and install it (this has probably already been done):
@davecgh
davecgh / example_txscript_signaturescript.go
Last active September 20, 2018 19:45
Example of signing a transaction using txscript.SignatureScript
package main
import (
"encoding/hex"
"fmt"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
@davecgh
davecgh / example_txscript_step.go
Last active March 8, 2019 07:01
Example of stepping through a script using the txscript API.
package main
import (
"encoding/hex"
"fmt"
"os"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
@davecgh
davecgh / simnetblksubmit.go
Created February 18, 2015 21:05
Example of connecting to a simnet btcd instance, manually generating blocks, and submitting them.
package main
import (
"encoding/binary"
"errors"
"io/ioutil"
"log"
"math"
"math/big"
"path/filepath"
@davecgh
davecgh / example_txscript_signtxoutput.go
Last active September 20, 2018 19:47
Example of signing a transaction using txscript.SignTxOutput.
package main
import (
"encoding/hex"
"fmt"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
@davecgh
davecgh / btcd_code_reorg.md
Last active August 29, 2015 14:11
Btcd Code Reorg

What?

All of the Conformal Bitcoin-related code will be moving to a new home at the https://github.com/btcsuite organization.

When?

This will take place sometime during the next several weeks.

Why?

@davecgh
davecgh / btcdwstest.html
Last active July 29, 2020 10:16
btcd Browser Websocket Connection Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>WebSocket Test</title>
<script language="javascript" type="text/javascript">
var wsUri = 'wss://127.0.0.1:8334/ws';
var rpcUser = "rpcuser";
var rpcPass = "rpcpass";