Skip to content

Commit

Permalink
chore(deps): bump utxorpc/go-codegen to 0.6.0
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Jul 8, 2024
1 parent 3970db2 commit 962b2b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func fetchBlock(ctx context.Context, client *utxorpc.UtxorpcClient) {
client.AddHeadersToRequest(req)

fmt.Println("connecting to utxorpc host:", client.URL())
chainSync, err := client.ChainSync.FetchBlock(ctx, req)
chainSync, err := client.Sync.FetchBlock(ctx, req)
if err != nil {
utxorpc.HandleError(err)
}
Expand Down Expand Up @@ -64,7 +64,7 @@ func followTip(ctx context.Context, client *utxorpc.UtxorpcClient, blockHash str
}
client.AddHeadersToRequest(req)
fmt.Println("connecting to utxorpc host:", client.URL())
stream, err := client.ChainSync.FollowTip(ctx, req)
stream, err := client.Sync.FollowTip(ctx, req)
if err != nil {
utxorpc.HandleError(err)
return
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.21

require (
connectrpc.com/connect v1.16.2
github.com/utxorpc/go-codegen v0.5.1
github.com/utxorpc/go-codegen v0.6.0
golang.org/x/net v0.26.0
)

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type UtxorpcClient struct {
httpClient connect.HTTPClient
baseUrl string
headers map[string]string
ChainSync syncconnect.ChainSyncServiceClient
Query queryconnect.QueryServiceClient
Submit submitconnect.SubmitServiceClient
Sync syncconnect.SyncServiceClient
Watch watchconnect.WatchServiceClient
}

Expand All @@ -37,9 +37,9 @@ func NewClient(httpClient *http.Client, baseUrl string, options ...ClientOption)
client := &UtxorpcClient{
httpClient: httpClient,
baseUrl: baseUrl,
ChainSync: syncconnect.NewChainSyncServiceClient(httpClient, baseUrl, connect.WithGRPC()),
Query: queryconnect.NewQueryServiceClient(httpClient, baseUrl, connect.WithGRPC()),
Submit: submitconnect.NewSubmitServiceClient(httpClient, baseUrl, connect.WithGRPC()),
Sync: syncconnect.NewSyncServiceClient(httpClient, baseUrl, connect.WithGRPC()),
Watch: watchconnect.NewWatchServiceClient(httpClient, baseUrl, connect.WithGRPC()),
}

Expand Down

0 comments on commit 962b2b7

Please sign in to comment.