Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add submit example with refactor of common functions #30

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

verbotenj
Copy link
Collaborator

@verbotenj verbotenj commented Jul 2, 2024

This also fixes #10

main.go Outdated
var client UtxorpcClient
chainSyncClient := syncconnect.NewChainSyncServiceClient(httpClient, baseUrl, connect.WithGRPC())
queryClient := queryconnect.NewQueryServiceClient(httpClient, baseUrl, connect.WithGRPC())
submitClient := submitconnect.NewSubmitServiceClient(httpClient, baseUrl, connect.WithGRPC())
watchClient := watchconnect.NewWatchServiceClient(httpClient, baseUrl, connect.WithGRPC())
client.httpClient = httpClient
client.baseUrl = baseUrl
client.apiKey = apiKey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently implementation-specific (demeter) and isn't required by UTxO RPC. This should be a more generic "request headers" implementation if it's going into the main SDK code.

@verbotenj verbotenj force-pushed the feat/submit-examxample branch 2 times, most recently from 2248c28 to 4118be9 Compare July 2, 2024 21:03
main.go Outdated
client.Query = queryClient
client.Submit = submitClient
client.Watch = watchClient
type ClientOptinon func(*UtxorpcClient)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo... ClientOption (across file)

@verbotenj verbotenj merged commit b734233 into main Jul 2, 2024
4 checks passed
@verbotenj verbotenj deleted the feat/submit-examxample branch July 2, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom HTTP headers
2 participants