Skip to content

Releases: tigusigalpa/bitquery-go

v2.0.2

Choose a tag to compare

@tigusigalpa tigusigalpa released this 04 Oct 14:23

v2.0.2

v2.0.1

Choose a tag to compare

@tigusigalpa tigusigalpa released this 04 Oct 14:00

v2.0.1

v2.0.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 04 Oct 13:54

Bitquery Go SDK v2.0.0

v2.0.0 is the first major release of the Bitquery Go SDK. It introduces Go semantic import versioning, stronger transport evidence, safer WebSocket lifecycle handling, and optional audit-oriented V2 EVM query helpers.

Breaking changes

  • The Go module path is now:

    github.com/tigusigalpa/bitquery-go/v2

    Update imports accordingly:

    import bitquery "github.com/tigusigalpa/bitquery-go/v2"
    import v1 "github.com/tigusigalpa/bitquery-go/v2/v1"
    import v2 "github.com/tigusigalpa/bitquery-go/v2/v2"
    import "github.com/tigusigalpa/bitquery-go/v2/subscription"
  • Dynamic numeric values in GraphQLError.Path, GraphQLError.Locations, and GraphQLError.Extensions are now decoded as json.Number instead of float64. Update code that type-asserts these values.

Highlights

  • Added bitquery.Version, currently set to 2.0.0; the default User-Agent now includes the SDK version.
  • Added raw HTTP receipt evidence for every response attempt, including retries. Receipts preserve redacted provenance, exact request/response bytes, operation hashes, and body lifecycle state.
  • Added ErrResponseTooLarge and safer handling of truncated, failed, and close-error HTTP bodies.
  • Added optional pinned V2 EVM query projections for transactions, DEX trades, balances, holders, transaction balances, and decoded events.
  • Added subscription delivery metadata, gap records, bounded protocol-frame receipts, receipt observers, and fail-closed overflow behavior.
  • Improved WebSocket reconnect accounting after a successful connection_ack.
  • Fixed terminal handling when a complete frame arrives after an event-queue overflow.
  • Preserved exact raw JSON for each GraphQL error entry in GraphQLError.Raw.

Notes

The SDK keeps receipts and events in memory only. It does not provide durable storage, automatic replay of missed subscription events, blockchain-finality guarantees, or guarantees that a response covers every available dataset record.

Requires Go 1.21 or newer.

v1.1.1

Choose a tag to compare

@tigusigalpa tigusigalpa released this 03 Oct 18:38

bitquery-go v1.1.1

This patch hardens long-lived WebSocket subscriptions by replacing unbounded receipt retention with an explicit, bounded admission contract.

Fixed

  • Prevented unbounded memory growth from accumulated inbound and outbound WebSocket receipts.
  • Preserved the raw frame that triggers a fail-closed receipt overflow in the terminal typed error for auditability.
  • Made receipt and gap loss observable instead of silent.

Added

  • Bounded WebSocket receipt retention, defaulting to 1,024 frames with OverflowFail.
  • WithSubscriptionReceiptBuffer to configure receipt capacity and overflow behaviour.
  • WithSubscriptionReceiptObserver for synchronous caller-controlled persistence or backpressure.
  • Stream.DrainReceipts() for safe transfer-and-clear consumption.
  • Stream.DroppedReceipts() and Stream.DroppedGaps() observability counters.
  • Receipt overflow and observer-failure gap reasons.

Notes

Receipt observers run on the connection worker, receive the subscription context, and must return promptly. A callback error terminates the stream without reconnecting. Reconnect gaps remain evidence of a possible discontinuity only; this release does not add automatic replay, recovery, persistence, or completeness guarantees.

Validation

The release is covered by offline HTTP/WebSocket mock tests, including bounded retention, overflow behaviour, observer cancellation, reconnect handling, and race detection. No live Bitquery API calls or credentials are required.

v1.1.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 03 Oct 15:03

Bitquery Go SDK v1.1.0

This minor release adds audit-friendly query projections and transport evidence while preserving the SDK’s raw GraphQL-first design.

Added

  • Optional pinned V2 EVM projection helpers for:
    • transaction lookup by hash
    • DEX trades
    • balances
    • token holders
    • transaction balance changes
    • decoded smart-contract events
  • Explicit EVMSource configuration for network, dataset, and block selection.
  • Optional[T] variables that preserve the difference between an omitted value, explicit GraphQL null, and a zero value.
  • Immutable raw Receipt snapshots for HTTP responses, including retry attempts.
  • WebSocket frame receipts for inbound and outbound subscription protocol messages.
  • Subscription delivery metadata: connection epoch, receive sequence, receive time, and reconnect-gap markers.
  • Stream.Gaps() observability for reconnects and fail-closed queue overflows.

Reliability and auditability

Receipts retain the exact serialized GraphQL operation, raw response or frame bytes, capture time, source metadata, and an operation SHA-256 hash. Targets are redacted before storage.

Reconnect and overflow-gap signals indicate possible discontinuity only. The SDK does not automatically replay missed events, claim delivery completeness, or persist audit evidence; those responsibilities remain with the consuming application.

Compatibility

This release is additive and introduces no breaking public API changes. Existing raw Operation, Response.RawBody, Response.Data, and WebSocket event behavior remain compatible.

Quality

The release is covered by offline HTTP and WebSocket contract tests, race-detector validation, and static analysis. Library test coverage is above 84%.

v1.0.0

Choose a tag to compare

@tigusigalpa tigusigalpa released this 22 Sep 07:25

Bitquery Go SDK v1.0.0

We’re happy to announce the first stable release of the Bitquery Go SDK.

Highlights

  • Separate, typed clients for Bitquery V1 historical GraphQL and V2 streaming GraphQL APIs
  • OAuth2 client-credentials and static-token authentication providers
  • Regional endpoints for Europe, Asia, and the US, plus custom HTTP, OAuth, and WebSocket endpoints
  • Built-in retry handling, rate limiting, request timeouts, and context cancellation
  • Tolerant and strict GraphQL error handling with partial-response preservation
  • Credential-safe structured logging and sanitized error messages
  • Resilient GraphQL-over-WebSocket subscriptions with reconnect and queue-overflow controls
  • Reusable V1, EVM, and Solana query factories that keep dynamic values in GraphQL variables
  • Runnable examples for HTTP queries, OAuth, custom endpoints, historical V1 data, Solana V2 data, and subscriptions

Quality and compatibility

The release includes unit tests, race-detector validation, static analysis, and Codecov coverage above 80%. It targets Go 1.21 and later.

Getting started

go get github.com/tigusigalpa/bitquery-go@v1.0.0

See the README for setup instructions, authentication examples, query patterns, and subscription lifecycle guidance.