Versions in this module Expand all Collapse all v0 v0.7.10 Apr 21, 2022 Changes in this version + const DefaultElapsedTime + const DefaultHTTPTimeout + const DefaultIdleConnTimeout + const DefaultMaxConnections + const DefaultRetries + const DefaultUserAgent + var ErrCouldNotAcquireSemaphore = errors.New("could not acquire semaphore") + var ErrExhaustedRetries = errors.New("retries exhausted") + var ErrNetworkMissing = errors.New("network missing") + var ErrNoNetworks = errors.New("no networks available") + var ErrRequestFailed = errors.New("request failed") + func CheckNetworkListForNetwork(networkList *types.NetworkListResponse, ...) (bool, []*types.NetworkIdentifier) + func Err(err error) bool + type Backoff struct + type Error struct + ClientErr *types.Error + Err error + Retry bool + type Fetcher struct + Asserter *asserter.Asserter + func New(serverAddress string, options ...Option) *Fetcher + func (f *Fetcher) AccountBalance(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.BlockIdentifier, []*types.Amount, map[string]interface{}, *Error) + func (f *Fetcher) AccountBalanceRetry(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.BlockIdentifier, []*types.Amount, map[string]interface{}, *Error) + func (f *Fetcher) AccountCoins(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.BlockIdentifier, []*types.Coin, map[string]interface{}, *Error) + func (f *Fetcher) AccountCoinsRetry(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.BlockIdentifier, []*types.Coin, map[string]interface{}, *Error) + func (f *Fetcher) Block(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.Block, *Error) + func (f *Fetcher) BlockRetry(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.Block, *Error) + func (f *Fetcher) Call(ctx context.Context, network *types.NetworkIdentifier, method string, ...) (map[string]interface{}, bool, *Error) + func (f *Fetcher) CallRetry(ctx context.Context, network *types.NetworkIdentifier, method string, ...) (map[string]interface{}, bool, *Error) + func (f *Fetcher) ConstructionCombine(ctx context.Context, network *types.NetworkIdentifier, ...) (string, *Error) + func (f *Fetcher) ConstructionDerive(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.AccountIdentifier, map[string]interface{}, *Error) + func (f *Fetcher) ConstructionHash(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.TransactionIdentifier, *Error) + func (f *Fetcher) ConstructionMetadata(ctx context.Context, network *types.NetworkIdentifier, ...) (map[string]interface{}, []*types.Amount, *Error) + func (f *Fetcher) ConstructionParse(ctx context.Context, network *types.NetworkIdentifier, signed bool, ...) ([]*types.Operation, []*types.AccountIdentifier, map[string]interface{}, *Error) + func (f *Fetcher) ConstructionPayloads(ctx context.Context, network *types.NetworkIdentifier, ...) (string, []*types.SigningPayload, *Error) + func (f *Fetcher) ConstructionPreprocess(ctx context.Context, network *types.NetworkIdentifier, ...) (map[string]interface{}, []*types.AccountIdentifier, *Error) + func (f *Fetcher) ConstructionSubmit(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.TransactionIdentifier, map[string]interface{}, *Error) + func (f *Fetcher) EventsBlocks(ctx context.Context, network *types.NetworkIdentifier, offset *int64, ...) (int64, []*types.BlockEvent, *Error) + func (f *Fetcher) EventsBlocksRetry(ctx context.Context, network *types.NetworkIdentifier, offset *int64, ...) (int64, []*types.BlockEvent, *Error) + func (f *Fetcher) InitializeAsserter(ctx context.Context, networkIdentifier *types.NetworkIdentifier, ...) (*types.NetworkIdentifier, *types.NetworkStatusResponse, *Error) + func (f *Fetcher) Mempool(ctx context.Context, network *types.NetworkIdentifier) ([]*types.TransactionIdentifier, *Error) + func (f *Fetcher) MempoolTransaction(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.Transaction, map[string]interface{}, *Error) + func (f *Fetcher) NetworkList(ctx context.Context, metadata map[string]interface{}) (*types.NetworkListResponse, *Error) + func (f *Fetcher) NetworkListRetry(ctx context.Context, metadata map[string]interface{}) (*types.NetworkListResponse, *Error) + func (f *Fetcher) NetworkOptions(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.NetworkOptionsResponse, *Error) + func (f *Fetcher) NetworkOptionsRetry(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.NetworkOptionsResponse, *Error) + func (f *Fetcher) NetworkStatus(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.NetworkStatusResponse, *Error) + func (f *Fetcher) NetworkStatusRetry(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.NetworkStatusResponse, *Error) + func (f *Fetcher) RequestFailedError(rosettaErr *types.Error, err error, message string) *Error + func (f *Fetcher) SearchTransactions(ctx context.Context, request *types.SearchTransactionsRequest) (*int64, []*types.BlockTransaction, *Error) + func (f *Fetcher) SearchTransactionsRetry(ctx context.Context, request *types.SearchTransactionsRequest) (*int64, []*types.BlockTransaction, *Error) + func (f *Fetcher) UnsafeBlock(ctx context.Context, network *types.NetworkIdentifier, ...) (*types.Block, *Error) + func (f *Fetcher) UnsafeTransactions(ctx context.Context, network *types.NetworkIdentifier, ...) ([]*types.Transaction, *Error) + type Option func(f *Fetcher) + func WithAsserter(asserter *asserter.Asserter) Option + func WithClient(client *client.APIClient) Option + func WithForceRetry() Option + func WithInsecureTLS() Option + func WithMaxConnections(connections int) Option + func WithMaxRetries(maxRetries uint64) Option + func WithRetryElapsedTime(retryElapsedTime time.Duration) Option + func WithTimeout(timeout time.Duration) Option