clients

package
v0.0.0-...-5ec660f Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainSoResponse

type ChainSoResponse struct {
	Status string          `json:"status"`
	Data   json.RawMessage `json:"data"`
}

type ClientCore

type ClientCore interface {
	// NetworkParams should return the network parameters of the underlying
	// ZCash blockchain.
	NetworkParams() *chaincfg.Params

	GetUTXO(txhash string, vout uint32) (UTXO, error)
	GetUTXOs(address string, limit, confitmations int64) ([]UTXO, error)
	Confirmations(txHash string) (int64, error)

	// ScriptFunded checks whether a script is funded.
	ScriptFunded(address string, value int64) (bool, int64, error)

	// ScriptRedeemed checks whether a script is redeemed.
	ScriptRedeemed(address string, value int64) (bool, int64, error)

	// ScriptSpent checks whether a script is spent.
	ScriptSpent(script, spender string) (bool, string, error)

	// PublishTransaction should publish a signed transaction to the ZCash
	// blockchain.
	PublishTransaction(signedTransaction []byte) error
}

func NewChainSoClientCore

func NewChainSoClientCore(network string) (ClientCore, error)

func NewMercuryClientCore

func NewMercuryClientCore(network string) (ClientCore, error)

type MercuryError

type MercuryError struct {
	Error string `json:"error"`
}

type RawAddress

type RawAddress struct {
	Balance  string `json:"balance"`
	Received string `json:"received_value"`
	Txs      []Tx   `json:"txs"`
}

type Tx

type Tx struct {
	ID            string `json:"txid"`
	Value         string `json:"value"`
	ScriptHex     string `json:"script_hex"`
	OutNo         uint32 `json:"output_no"`
	Confirmations int64  `json:"confirmations"`
}

type UTXO

type UTXO struct {
	TxHash       string `json:"txHash"`
	Amount       int64  `json:"amount"`
	ScriptPubKey string `json:"scriptPubKey"`
	Vout         uint32 `json:"vout"`
}

type UnspentTxResponse

type UnspentTxResponse struct {
	Network string `json:"network"`
	Address string `json:"address"`
	Txs     []Tx   `json:"txs"`
}

Jump to

Keyboard shortcuts

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