Beispiel #1
0
func init() {
	Info("DAEMON STARTED")
	for _, coin := range Config.Coins {
		if coin.Type == bitcoin.COIN_TYPE_CRYPTO {
			go Sync(coin.Name)
			go treasury.Process(coin.Name)
		}
	}
	go ProcessOrders()
}
Beispiel #2
0
func makeTreasury() {
	treasury.StorePrivateKeyForMPKPubKey("0271b114194fd037a410366b693b338ef7d190c8c2a20ce6164f0c9bc40df417d9", "8b8e225c197e9606e04ae9f0a7582e43177934b7383efbc452055abfbf3a5d0e")

	// Get the main wallet for testing.
	user := auth.LoadUserByEmail("*****@*****.**")

	// Create a withdrawal request.
	account.AddWithdrawal(user.Id, "12uPSJQ9j3cHPwt2k2JgfkQ4MULwf5cxJH", "BTC", 20000)

	// Process the withdrawal request.
	treasury.Process("BTC")
}