feat: support account API keys across Go clients - #28
Open
KillerQueen-Z wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add account API-key constructors across the Go SDK and a shared account transport for chat, native Anthropic Messages, media and data services. APIRequest provides generic JSON/binary/SSE access to account routes. Account requests carry a Bearer key bound to the configured origin, never payment proofs; account errors retain HTTP status and Retry-After without entering x402 signing.
Explicit wallet credentials retain wallet mode. An explicitly configured empty/malformed API environment now fails instead of silently selecting a funded wallet. New-wallet setup prefers Solana while preserving existing chain/Base-wallet choices. Accepted jobs recover from temporary gateway failures by polling the same complete URL within the original context deadline, never creating another job. Auth, credit and rate-limit errors are not retried.
Align Surf catalog estimates and timeout billing guidance. README covers API registration, key creation, credits, Activity, source-versus-release installation, complete signed polling URLs and independent account/wallet balances.
Validation:
go test -race ./...andgo vet ./...pass. Regressions cover empty API settings, explicit Base/Solana wallet selection, authenticated service requests, quota/error propagation, existing-job recovery and context behavior. A standalone consumer module also passes HTTP integration with the merged Enterprise gateway source; the combined five-product run has 72 requests and reconciles simulated meter/debit records.Provider responses and balances in local integration are fixtures. No claim of every live endpoint/model or real Solana/Base settlement, no package tag/publication and no deployment.