services

package
v0.0.0-...-50c8bdb Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NodeVersion is the version of
	// bitcoin core we are using.
	NodeVersion = "0.20.1"

	// HistoricalBalanceLookup indicates
	// that historical balance lookup is supported.
	HistoricalBalanceLookup = true

	// MempoolCoins indicates that
	// including mempool coins in the /account/coins
	// response is not supported.
	MempoolCoins = false

	// MiddlewareVersion is the version
	// of rosetta-bitcoin. We set this as a
	// variable instead of a constant because
	// we typically need the pointer of this
	// value.
	MiddlewareVersion = "0.0.9"
)

Variables

This section is empty.

Functions

func NewBlockchainRouter

func NewBlockchainRouter(
	config *configuration.Configuration,
	client Client,
	asserter *asserter.Asserter,
) http.Handler

NewBlockchainRouter creates a Mux http.Handler from a collection of server controllers.

func NewNetworkAPIService

func NewNetworkAPIService(
	config *configuration.Configuration,
	client Client,
) server.NetworkAPIServicer

NewNetworkAPIService creates a new instance of a NetworkAPIService.

Types

type Client

type Client interface {
	GetPeers(context.Context) ([]*types.Peer, error)
	SendRawTransaction(context.Context, string) (string, error)
	SuggestedFeeRate(context.Context, int64) (float64, error)
	RawMempool(context.Context) ([]string, error)
}

Client is used by the servicers to get Peer information and to submit transactions.

type NetworkAPIService

type NetworkAPIService struct {
	// contains filtered or unexported fields
}

NetworkAPIService implements the server.NetworkAPIServicer interface.

func (*NetworkAPIService) NetworkList

NetworkList implements the /network/list endpoint

func (*NetworkAPIService) NetworkOptions

func (s *NetworkAPIService) NetworkOptions(
	ctx context.Context,
	request *types.NetworkRequest,
) (*types.NetworkOptionsResponse, *types.Error)

NetworkOptions implements the /network/options endpoint.

func (*NetworkAPIService) NetworkStatus

NetworkStatus implements the /network/status endpoint.

type ParseOperationMetadata

type ParseOperationMetadata struct {
	ScriptPubKey *bitcoin.ScriptPubKey `json:"scriptPubKey"`
}

ParseOperationMetadata is returned from ConstructionParse.

Jump to

Keyboard shortcuts

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