Versions in this module Expand all Collapse all v0 v0.0.10 Mar 17, 2021 Changes in this version + const HistoricalBalanceLookup + const MempoolCoins + const MiddlewareVersion + const NodeVersion + var ErrBlockNotFound = &types.Error + var ErrCouldNotGetFeeRate = &types.Error + var ErrDefid = &types.Error + var ErrInvalidCoin = &types.Error + var ErrNotReady = &types.Error + var ErrScriptPubKeysMissing = &types.Error + var ErrTransactionNotFound = &types.Error + var ErrUnableToCalculateSignatureHash = &types.Error + var ErrUnableToComputePkScript = &types.Error + var ErrUnableToDecodeAddress = &types.Error + var ErrUnableToDecodeScriptPubKey = &types.Error + var ErrUnableToDerive = &types.Error + var ErrUnableToGetBalance = &types.Error + var ErrUnableToGetCoins = &types.Error + var ErrUnableToParseIntermediateResult = &types.Error + var ErrUnavailableOffline = &types.Error + var ErrUnclearIntent = &types.Error + var ErrUnimplemented = &types.Error + var ErrUnsupportedScriptType = &types.Error + var Errors = []*types.Error + func LoggerMiddleware(loggerRaw *zap.Logger, inner http.Handler) http.Handler + func NewAccountAPIService(config *configuration.Configuration, i Indexer) server.AccountAPIServicer + func NewBlockAPIService(config *configuration.Configuration, i Indexer) server.BlockAPIServicer + func NewBlockchainRouter(config *configuration.Configuration, client Client, i Indexer, ...) http.Handler + func NewConstructionAPIService(config *configuration.Configuration, client Client, i Indexer) server.ConstructionAPIServicer + func NewMempoolAPIService(config *configuration.Configuration, client Client) server.MempoolAPIServicer + func NewNetworkAPIService(config *configuration.Configuration, client Client, i Indexer) server.NetworkAPIServicer + type AccountAPIService struct + func (s *AccountAPIService) AccountBalance(ctx context.Context, request *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error) + func (s *AccountAPIService) AccountCoins(ctx context.Context, request *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error) + type BlockAPIService struct + func (s *BlockAPIService) Block(ctx context.Context, request *types.BlockRequest) (*types.BlockResponse, *types.Error) + func (s *BlockAPIService) BlockTransaction(ctx context.Context, request *types.BlockTransactionRequest) (*types.BlockTransactionResponse, *types.Error) + type Client interface + GetPeers func(context.Context) ([]*types.Peer, error) + GetRawTransaction func(context.Context, string, string) (*defichain.Transaction, error) + RawMempool func(context.Context) ([]string, error) + SendRawTransaction func(context.Context, string) (string, error) + SuggestedFeeRate func(context.Context, int64) (float64, error) + type ConstructionAPIService struct + func (s *ConstructionAPIService) ConstructionCombine(ctx context.Context, request *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionDerive(ctx context.Context, request *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionHash(ctx context.Context, request *types.ConstructionHashRequest) (*types.TransactionIdentifierResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionMetadata(ctx context.Context, request *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionParse(ctx context.Context, request *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionPayloads(ctx context.Context, request *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionPreprocess(ctx context.Context, request *types.ConstructionPreprocessRequest) (*types.ConstructionPreprocessResponse, *types.Error) + func (s *ConstructionAPIService) ConstructionSubmit(ctx context.Context, request *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error) + type Indexer interface + GetBalance func(context.Context, *types.AccountIdentifier, *types.Currency, ...) (*types.Amount, *types.BlockIdentifier, error) + GetBlockLazy func(context.Context, *types.PartialBlockIdentifier) (*types.BlockResponse, error) + GetBlockTransaction func(context.Context, *types.BlockIdentifier, *types.TransactionIdentifier) (*types.Transaction, error) + GetCoins func(context.Context, *types.AccountIdentifier) ([]*types.Coin, *types.BlockIdentifier, error) + GetScriptPubKeys func(context.Context, []*types.Coin) ([]*defichain.ScriptPubKey, error) + type MempoolAPIService struct + func (s *MempoolAPIService) Mempool(ctx context.Context, request *types.NetworkRequest) (*types.MempoolResponse, *types.Error) + func (s *MempoolAPIService) MempoolTransaction(ctx context.Context, request *types.MempoolTransactionRequest) (*types.MempoolTransactionResponse, *types.Error) + type NetworkAPIService struct + 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 struct + ScriptPubKey *defichain.ScriptPubKey + type StatusRecorder struct + Code int + func NewStatusRecorder(w http.ResponseWriter) *StatusRecorder + func (r *StatusRecorder) WriteHeader(code int)