explorer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Estimation

type Estimation interface {
	Low() float64
	Medium() float64
	High() float64
}

Estimation interface defines what data an estimation response must include

type Explorer

type Explorer interface {
	Ping() int
	GetUnspents(address string) ([]Utxo, error)
	GetTransaction(hash string) (Transaction, error)
	GetTransactionHex(hash string) (string, error)
	Broadcast(tx string) (string, error)
	EstimateFees() (Estimation, error)
}

Explorer interface defines method for a block explorer

type Transaction

type Transaction interface {
	Hash() string
	Version() int
	LockTime() int
	Size() int
	Weight() int
	Confirmed() bool
	Fees() int
	Inputs() []TxInput
	Outputs() []TxOutput
}

Transaction interface defines what data a transaction must include

type TxInput

type TxInput interface {
	Hash() string
	Index() int
	ScriptSig() string
	Sequence() int
	OutputValue() int
	Address() string
}

TxInput defines what data a tx input must include

type TxOutput

type TxOutput interface {
	Value() int
	Address() string
	ScriptPubKey() string
	ScriptPubKeyType() string
}

TxOutput interface defines what data a tx output must include

type Utxo

type Utxo interface {
	Hash() string
	Index() uint32
	Value() uint64
	Asset() string
	ValueCommitment() string
	AssetCommitment() string
	Nonce() []byte
	Script() []byte
	RangeProof() []byte
	SurjectionProof() []byte
}

Utxo defines the unspent from the explorer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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