esplora

package
v0.0.0-...-4873376 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfidentialWitnessUtxo

func NewConfidentialWitnessUtxo(
	hash string,
	index uint32,
	valueCommitment, assetCommitment string,
	script, nonce, rangeProof, surjectionProof []byte,
) explorer.Utxo

NewConfidentialWitnessUtxo is the factory for a confidential witnessUtxo.

func NewService

func NewService(apiURL string, requestTimeout int) (explorer.Service, error)

NewService returns a new esplora service as an explorer.Service interface

func NewTxFromHex

func NewTxFromHex(txhex string, confirmed bool) (explorer.Transaction, error)

func NewTxFromJSON

func NewTxFromJSON(txJSON string) (explorer.Transaction, error)

NewTxFromJSON is the factory for a Transaction in given its JSON format.

func NewUnconfidentialWitnessUtxo

func NewUnconfidentialWitnessUtxo(
	hash string,
	index uint32,
	value uint64,
	asset string,
	script []byte,
) explorer.Utxo

NewUnconfidentialWitnessUtxo is the factory for a non-confidential witnessUtxo.

func NewWitnessUtxo

func NewWitnessUtxo(
	hash string, index uint32,
	value uint64, asset string,
	valueCommitment, assetCommitment string,
	valueBlinder, assetBlinder []byte,
	script, nonce, rangeProof, surjectionProof []byte,
	confirmed bool,
) explorer.Utxo

NewWitnessUtxo is the factory for an unblinded confidential witnessUtxo.

Types

type Client

type Client struct {
	*http.Client
}

func NewHTTPClient

func NewHTTPClient(requestTimeout time.Duration) *Client

func (*Client) NewHTTPRequest

func (s *Client) NewHTTPRequest(
	method, url, bodyString string,
	header map[string]string,
) (int, string, error)

NewHTTPRequest function builds http call @param method <string>: http method @param url <string>: URL http to call @return <string>, error

Jump to

Keyboard shortcuts

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