-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from coinbase/depend-on-bsr
This PR modifies the code generation process to depend on BSR registries rather than depending on protos directly in the same repo. This allows us to remove the protos files from this repo and simplify the overall `buf` workflow.
- Loading branch information
Showing
26 changed files
with
1,129 additions
and
207 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: v1 | ||
plugins: | ||
- name: grpc-gateway-ts | ||
out: ./src/gen/ | ||
opt: | ||
- paths=source_relative | ||
- name: openapiv2 | ||
out: ./docs/openapi | ||
opt: | ||
- allow_merge=true | ||
- merge_file_name=orchestration |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: v1 | ||
plugins: | ||
- name: grpc-gateway-ts | ||
out: ./src/gen/ | ||
opt: | ||
- paths=source_relative | ||
- name: openapiv2 | ||
out: ./docs/openapi | ||
opt: | ||
- allow_merge=true | ||
- merge_file_name=rewards |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
buf generate --template protos/buf.gen.orchestration.yaml buf.build/cdp/orchestration --path coinbase/staking/orchestration/v1 --include-imports --include-wkt | ||
buf generate --template protos/buf.gen.rewards.yaml buf.build/cdp/rewards --path coinbase/staking/rewards/v1 --include-imports --include-wkt | ||
# TODO: Remove this once the generation issue is fixed. | ||
find ./src/gen -type f -exec sed -I '' -e 's/parentprotocols/parent/g' -e 's/parentprotocolsnetworks/parents/g' -e 's/parentnetworks/parent/g' -e 's/nameprojectsworkflows/name/g' -e 's/parentprojects/parent/g' -e 's/nameworkflows/name/g' {} \; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
/* | ||
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY | ||
*/ | ||
|
||
import * as CoinbaseStakingOrchestrationV1Common from "./common.pb" | ||
|
||
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined }; | ||
type OneOf<T> = | ||
| { [k in keyof T]?: undefined } | ||
| ( | ||
keyof T extends infer K ? | ||
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K> | ||
: never) | ||
: never); | ||
|
||
type BaseEthereumStakingParameters = { | ||
} | ||
|
||
export type EthereumStakingParameters = BaseEthereumStakingParameters | ||
& OneOf<{ nativeStakeParameters: EthereumNativeStakeParameters }> | ||
|
||
export type EthereumNativeStakeParameters = { | ||
withdrawalAddress?: string | ||
feeRecipient?: string | ||
amount?: CoinbaseStakingOrchestrationV1Common.Amount | ||
} |
Oops, something went wrong.