Skip to content

Commit

Permalink
Merge pull request #29 from coinbase/chore/add-version
Browse files Browse the repository at this point in the history
[chore] Adds an SDK language and version to the heads passed to cdp-service
  • Loading branch information
deangalvin-cb authored Sep 12, 2024
2 parents e5b6ed2 + f2755b3 commit d746e42
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## [0.0.7] - 2024-09-12

- Adds headers to requests with SDK version & language

## [0.0.6] - 2024-09-12

### Added
Expand Down Expand Up @@ -39,9 +43,9 @@

Initial release of the Coinbase Go SDK

- Support for Staking on External Wallets
- Support for Staking on External Wallets
- Full support for Shared ETH Staking
- Partial support for Dedicated ETH Staking
- Partial support for Dedicated ETH Staking
- Only stake is supported, unstake will be coming soon
- On networks `holesky` and `mainnet`
- Support for getting stakeable balances on External Wallets
Expand Down
9 changes: 9 additions & 0 deletions pkg/auth/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,14 @@ func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {

req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", jwt))

req.Header.Set(
"Correlation-Context",
fmt.Sprintf(
"%s,%s",
fmt.Sprintf("%s=%s", "sdk_version", "0.0.7"),
fmt.Sprintf("%s=%s", "sdk_language", "go"),
),
)

return t.transport.RoundTrip(req)
}

0 comments on commit d746e42

Please sign in to comment.