Documentation ¶
Index ¶
- Constants
- func NewBlockchainRouter(config *configuration.Configuration, client Client, ...) http.Handler
- func NewNetworkAPIService(config *configuration.Configuration, client Client) server.NetworkAPIServicer
- type Client
- type NetworkAPIService
- func (s *NetworkAPIService) NetworkList(ctx context.Context, request *types.MetadataRequest) (*types.NetworkListResponse, *types.Error)
- func (s *NetworkAPIService) NetworkOptions(ctx context.Context, request *types.NetworkRequest) (*types.NetworkOptionsResponse, *types.Error)
- func (s *NetworkAPIService) NetworkStatus(ctx context.Context, request *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error)
- type ParseOperationMetadata
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 ¶
func (s *NetworkAPIService) NetworkList( ctx context.Context, request *types.MetadataRequest, ) (*types.NetworkListResponse, *types.Error)
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 ¶
func (s *NetworkAPIService) NetworkStatus( ctx context.Context, request *types.NetworkRequest, ) (*types.NetworkStatusResponse, *types.Error)
NetworkStatus implements the /network/status endpoint.
type ParseOperationMetadata ¶
type ParseOperationMetadata struct {
ScriptPubKey *bitcoin.ScriptPubKey `json:"scriptPubKey"`
}
ParseOperationMetadata is returned from ConstructionParse.
Click to show internal directories.
Click to hide internal directories.