func main() { flag.Parse() logger := log.New(os.Stdout, "", log.Ltime|log.Llongfile) logger.Println(valout, valout) params := btcbuilder.BuilderParams{ Fee: int64(*fee), DustAmnt: 546, InTarget: int64(*valout), } btcparams, err := btcbuilder.NetParamsFromStr(*network) if err != nil { logger.Fatal(err) } params = btcbuilder.SetParams(btcparams.Net, params) single := btcbuilder.NewPayToPubKeyHash(params, 1) fmt.Println(single.Summarize()) list := []btcbuilder.TxBuilder{ single, } fanout := btcbuilder.NewFanOutBuilder(params, list, *numouts) fmt.Println(btcbuilder.Send(fanout, params)) }
func main() { logger = log.New(os.Stdout, "", log.Ltime) bp := btcbuilder.BuilderParams{ InTarget: 110000, Fee: 10000, DustAmnt: 546, Logger: logger, } params = btcbuilder.SetParams(btcwire.TestNet3, bp) defer params.Client.Shutdown() http.HandleFunc("/", handler) where := "0.0.0.0:1050" logger.Printf("Listening on %s\n", where) err := http.ListenAndServeTLS(where, "cert.pem", "key.pem", nil) //err := http.ListenAndServe(where, nil) if err != nil { logger.Fatal(err) } }