sochainbitcoin

package
v0.0.0-...-a3dd10e Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SoChainBitcoinAPI

type SoChainBitcoinAPI struct {
	Proxified bool
	// contains filtered or unexported fields
}

func GetSoChainBitcoinAPI

func GetSoChainBitcoinAPI() SoChainBitcoinAPI

func (SoChainBitcoinAPI) GetHTTPGetMethod

func (api SoChainBitcoinAPI) GetHTTPGetMethod() func(string) (string, error)

func (SoChainBitcoinAPI) GetUTXO

func (api SoChainBitcoinAPI) GetUTXO(publicKey string) ([]insight.Tx, error)

func (SoChainBitcoinAPI) GetWalletBalance

func (api SoChainBitcoinAPI) GetWalletBalance(publicKey string) (insight.WalletBalance, error)

type Tx

type Tx struct {
	TxID          string  `json:"txid"`
	OutputNo      uint64  `json:"output_no"`
	ScriptAsm     string  `json:"script_asm"`
	ScriptHex     string  `json:"script_hex"`
	Value         float64 `json:"value,string"`
	Confirmations uint64  `json:"confirmations"`
	Time          uint64  `json:"time"`
}

func (Tx) ConvertToInsightTx

func (tx Tx) ConvertToInsightTx(address string) insight.Tx

type UtxoResponse

type UtxoResponse struct {
	Status string `json:"status"`
	Data   *struct {
		Network string `json:"network"`
		Address string `json:"address"`
		Txs     []Tx   `json:"txs"`
	} `json:"data"`
}

type WalletBalance

type WalletBalance struct {
	Network            string  `json:"network"`
	Address            string  `json:"address"`
	ConfirmedBalance   float64 `json:"confirmed_balance,string"`
	UnconfirmedBalance float64 `json:"unconfirmed_balance,string"`
}

func (WalletBalance) ConvertToInsightWalletBalance

func (wb WalletBalance) ConvertToInsightWalletBalance() insight.WalletBalance

type WalletBalanceResponse

type WalletBalanceResponse struct {
	Status string         `json:"status"`
	Data   *WalletBalance `json:"data"`
}

Jump to

Keyboard shortcuts

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