bitcoins

package
v0.0.0-...-24b6856 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	MasterKey(
		words []string,
	) (*hdkeychain.ExtendedKey, error) // generate a bitcoin master key
	Transact(
		masterKey *hdkeychain.ExtendedKey,
		utxoHash string,
		utxoIndex uint32,
		toAddress string,
		amountInSatoshi int64,
		customData []byte,
	) (*wire.MsgTx, error) // creates a bitcoin transaction
	Broadcast(
		trx *wire.MsgTx,
		rpcUser string,
		rpcPassword string,
		rpcPort string,
		rpcHost string,
	) (*chainhash.Hash, error)
}

Application represents the bitcoin application

func NewApplication

func NewApplication() Application

NewApplication creates a new application

type RpcError

type RpcError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type RpcRequest

type RpcRequest struct {
	Jsonrpc string        `json:"jsonrpc"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	Id      int           `json:"id"`
}

type RpcResponse

type RpcResponse struct {
	Result string    `json:"result"`
	Error  *RpcError `json:"error"`
	Id     int       `json:"id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL