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: sdk-47 #174

Open
wants to merge 113 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
80560ae
feat: clean v1beta3
troian May 3, 2024
c50f444
feat: sdk-47
troian May 7, 2024
96dfa4f
feat: set go package name to pkg.akt.dev/go
troian May 23, 2024
223d296
feat: add sdl parser
troian May 23, 2024
5249d11
fix(go): set up tests for go modules
troian May 26, 2024
9a37151
fix: match replace modules with upstream version of cosmos-sdk
troian May 26, 2024
f1982de
fix: unify register of proto fixes for grpc reflection
troian May 26, 2024
c6424e1
chore: bump dependencies
troian May 26, 2024
a713539
chore: .gitignore go.work.sum
troian May 26, 2024
cedd367
refactor: add cli rip off
troian Jun 27, 2024
41a9fa8
refactor(market): remove legacy events
troian Jul 9, 2024
33dfd2f
fix(market): use filter from v1beta5 api
troian Jul 9, 2024
24624e4
fix: use gogoproto tag for old regen fork
troian Jul 10, 2024
9be7b3f
feat: migrate params to dedicated stores
troian Jul 17, 2024
b89d779
fix(go/cli): split deposit detection
troian Jul 17, 2024
7b8de97
feat: allocate cli flags to own package
troian Jul 18, 2024
c92cf2e
feat(proto): put enums into messages
troian Jul 18, 2024
065c398
fix(go/client): ensure key name is set to tx factory after loaing fro…
troian Jul 18, 2024
015a101
fix(go/cli): use flags from new flags module
troian Jul 18, 2024
04393f4
fix(go): bump cometbft and cosmos-sdk
troian Jul 18, 2024
87fb009
refactor: use flags wrapper for test cli helpers
troian Jul 24, 2024
8f751f1
feat(cli): add trace flag
troian Aug 1, 2024
9e81646
fix(sdk): move grpc reflection server to v1
troian Aug 1, 2024
9fac3a5
fix(sdk): register v1beta3 deployment authorization for migration helper
troian Aug 1, 2024
8ce34c2
fix(sdk): add provider store prefix
troian Aug 1, 2024
76d5ebf
docs(sdk): add deprecation notice to params table
troian Aug 1, 2024
2ee1d95
fix(sdk): make params keys public for take module
troian Aug 1, 2024
781e1dc
fix(sdk): add agov params table for sdk 0.47 migration
troian Aug 1, 2024
a5d67ae
fix(sdk): remove testutil network
troian Aug 1, 2024
3cadc8f
refactor: fix lint issues for go and proto
troian Aug 1, 2024
c4e56d8
fix(sdk): set mod readonly for go tests
troian Aug 2, 2024
dda4e87
refactor(go): make cli package part of pkg.akt.dev/go
troian Aug 3, 2024
f324503
fix: bump legacy akash-api version
troian Aug 5, 2024
1ad75a0
refactor: run lint on go/cli
troian Aug 5, 2024
161d045
fix: pin gogoproto version
troian Aug 5, 2024
79c91de
refactor: put go/cli into dedicated module
troian Aug 5, 2024
f3226d4
feat: move migrations into dedicated module
troian Aug 6, 2024
1950284
fix: remove legacy event parser
troian Aug 8, 2024
37ba22b
fix: make separate message for audit store
troian Aug 8, 2024
979e6e4
fix: bump go package version
troian Aug 8, 2024
af1db91
fix(go/sdl): bump go package version
troian Aug 8, 2024
79672fd
fix(go/cli): bump go and sdl versions
troian Aug 8, 2024
6a4ff09
fix(go/migrate): bump go version
troian Aug 8, 2024
c12bb4c
fix: deployment tests with updated audit types
troian Aug 8, 2024
7ee716c
fix(go/node/migrate): add exp replace
troian Aug 8, 2024
6b1aad2
fix(script): print test module name
troian Aug 8, 2024
9b69791
feat: add make command to bump module version
troian Aug 9, 2024
8bc83ae
fix(go/sdl): bump go lib version
troian Aug 9, 2024
9043273
fix(go/cli): bump go and sdl versions
troian Aug 9, 2024
ba8e7b1
fix(go/migrate): bump go lib version
troian Aug 9, 2024
8da4d9f
fix(script): shellscrip lint
troian Aug 9, 2024
8ee5d1b
fix: protogen split args check
troian Aug 9, 2024
47ce55b
feat: update ts codegen
troian Aug 9, 2024
2c699ee
fix(scripts): add legacy semver parser
troian Aug 23, 2024
05d4063
chore: bump tools versions
troian Aug 23, 2024
d64a684
fix(scripts): arg check count for protocgen
troian Aug 23, 2024
afb8a88
fix(proto): doc generation
troian Aug 23, 2024
5fef0ca
fix: golang lint
troian Aug 23, 2024
7933664
fix: go modules lint
troian Sep 3, 2024
15d4248
feat: add client query utils
troian Sep 6, 2024
2e94e8e
fix(go/client): add legacy gov
troian Sep 6, 2024
52826d5
fix(go/sdkutil): pin uakt as default token
troian Sep 6, 2024
ba5be7a
fix(client/go): add generate only case
troian Sep 8, 2024
4d2f47a
feat(go/cli): pull all cosmos-sdk commands into repo
troian Sep 8, 2024
c32c35a
refactor: run golintci
troian Sep 9, 2024
50d5373
refactor(go): imports
troian Sep 9, 2024
9c557fb
chore: bump api package for sdl
troian Sep 9, 2024
04860ca
chore: bump min go version to v1.23.0
troian Sep 9, 2024
d62a0e3
chore(go/cli): bump api version
troian Sep 9, 2024
5ad698f
chore: run golangci-lint
troian Sep 9, 2024
4691098
chore: increase timeout for golangci-lint
troian Sep 9, 2024
6e35244
chore: list direct-aux in help message
troian Sep 9, 2024
86750b5
feat(go/cli): add crisis tests
troian Sep 9, 2024
bb70a59
feat: adjust ts codegen to sdk-47
ygrishajev Sep 9, 2024
13470cc
feat: add cli tests
troian Sep 10, 2024
291fbc3
fix(go/cli): dist tests
troian Sep 10, 2024
05b752d
chore: refactor gowork detection
troian Sep 10, 2024
336a806
feat: port canonical pubsub
troian Sep 30, 2024
b3f736a
feat: port canonical runner
troian Sep 30, 2024
455c010
chore: backport path parsers
troian Sep 30, 2024
e518200
build(golangci): remove legacy codegen paths
troian Sep 30, 2024
077939d
fix(go/proto): register legacy deployment deposit message
troian Oct 28, 2024
bc86379
refactor: run go lint
troian Oct 28, 2024
2e34052
fix: set default gas mode to auto and adjustment to 1.5
troian Oct 28, 2024
2dd1f49
refactor: import cosmos sdk server flags
troian Oct 29, 2024
49d0adf
chore: bump go client
troian Oct 29, 2024
5ada161
chore: bump grpc
troian Oct 29, 2024
dcaf417
fix: disable gas auto for gentx cmd
troian Oct 29, 2024
69839c9
fix(go): implement GetSignBytes for MsgDepositDeployment (#177)
troian Nov 15, 2024
b128e88
refactor(go/client): unifi client detection of client version
troian Dec 10, 2024
ea3446b
chore: bump buf and protoc versions
troian Dec 10, 2024
3528e63
fix: typo in path clean for gogoproto installer
troian Dec 10, 2024
1b84471
feat(ts): implement exports generation (#181)
ygrishajev Dec 19, 2024
c9312ab
docs: node api (#182)
cloud-j-luna Jan 6, 2025
e1968d5
chore: add PrintJSON method to go client
troian Jan 13, 2025
1e6ddb7
fix: typo in provider cmd name
troian Jan 13, 2025
934e4d0
feat: add encoding config
troian Jan 13, 2025
c609c9f
feat: add config intercept and setup for cli
troian Jan 13, 2025
dfdb47f
chore: gitignore .vscode
troian Jan 13, 2025
80089ef
docs: generate protobuf docs
troian Jan 13, 2025
00747ae
fix: set rosetta settings for default akash app config
troian Jan 15, 2025
bf482c7
build: install semver tool
troian Jan 15, 2025
1f42939
chore(build): add user prompt for bump-go
troian Jan 15, 2025
c730803
chore: publish tag after bump if requested
troian Jan 15, 2025
ad1128e
chore(go/sdl): bump go package
troian Jan 16, 2025
b811126
chore(go/cli): bump dependencies
troian Jan 16, 2025
e735bed
refactor(scripts): resolve symlink if script is linked and used from …
troian Jan 16, 2025
8360dd1
chore: bump dependencies
troian Jan 16, 2025
d8b5628
docs: update readme with new package structure
troian Jan 16, 2025
442bfad
feat: wrap tendermint rpc client
troian Jan 16, 2025
6e3681e
chore: dump dependencies
troian Jan 16, 2025
5a473a7
chore: bump dependencies
troian Jan 16, 2025
8f661c1
refactor: import utils from akash node repo
troian Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ AKASH_TS_ROOT=${AKASH_ROOT}/ts
AKASH_TS_PACKAGE_FILE=${AKASH_TS_ROOT}/package.json
AKASH_TS_NODE_MODULES=${AKASH_TS_ROOT}/node_modules
AKASH_TS_NODE_BIN=${AKASH_TS_NODE_MODULES}/.bin
AKASH_DEVCACHE_TS_TMP=${AKASH_DEVCACHE_BASE}/tmp/ts
AKASH_DEVCACHE_TS_TMP_GRPC_JS=${AKASH_DEVCACHE_TS_TMP}/generated-grpc-js
AKASH_DEVCACHE_TS_TMP_PATCHES=${AKASH_DEVCACHE_TS_TMP}/patches
AKASH_DEVCACHE_TMP=${AKASH_DEVCACHE_BASE}/tmp
AKASH_DEVCACHE_TMP_TS=${AKASH_DEVCACHE_TMP}/ts
AKASH_DEVCACHE_TMP_TS_GRPC_JS=${AKASH_DEVCACHE_TMP_TS}/generated-grpc-js
AKASH_DEVCACHE_TMP_TS_PATCHES=${AKASH_DEVCACHE_TMP_TS}/patches
30 changes: 25 additions & 5 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ AKASH_ROOT=$(pwd)
export AKASH_ROOT

dotenv
dotenv_if_exists dev.env

TOOLS=${AKASH_ROOT}/script/tools.sh
SEMVER=${AKASH_ROOT}/script/semver.sh
SCRIPT_DIR=${AKASH_ROOT}/script

TOOLS=${SCRIPT_DIR}/tools.sh
SEMVER=${SCRIPT_DIR}/semver.sh

GOTOOLCHAIN=$(${TOOLS} gotoolchain)
GOTOOLCHAIN_SEMVER=$(echo "${GOTOOLCHAIN}" | sed 's/go*/v/' | tr -d '\n')
Expand All @@ -19,13 +20,32 @@ fi

AKASH_DIRENV_SET=1

dotenv_if_exists dev.env

if [[ ${GOWORK} != "off" ]] && [[ -f go.work ]]; then
GOWORK=${AKASH_ROOT}/go.work
else
GOWORK=off
fi

export SCRIPT_DIR
export TOOLS
export SEMVER
export GOTOOLCHAIN
export GOTOOLCHAIN_SEMVER
export AKASH_DIRENV_SET

make cache

PATH_add "$AKASH_DEVCACHE_NODE_BIN"
PATH_add "$AKASH_DEVCACHE_BIN"
PATH_add "$AKASH_TS_NODE_BIN"
PATH_add "$AKASH_DEVCACHE_BIN"

make cache
if [ ! -L "$AKASH_DEVCACHE_BIN/repo-tools" ]; then
pushd "$(pwd)" || exit
cd "$AKASH_DEVCACHE_BIN" || exit
ln -snf ../../script/tools.sh repo-tools
popd || exit
fi

make semver
6 changes: 0 additions & 6 deletions .github/workflows/release-ts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,3 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: make release-ts

- name: Upload Test Coverage
uses: codecov/codecov-action@v4
with:
files: ./ts/coverage
token: ${{ secrets.CODECOV_TOKEN }}

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### dev environment configurations
.idea
.cache
.vscode

### Go template
# Test binary, built with `go test -c`
Expand All @@ -13,7 +14,7 @@
vendor/

# Go workspace file
go.work
go.work*

# coverage
coverage.txt
Expand Down
9 changes: 3 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ issues:

# Skip generated k8s code
run:
skip-dirs:
- "^go/node/types/v1beta1"
- "^go/node/types/v1beta2"
- "^go/node/market/v1beta3"
skip-files:
exclude-dirs:
exclude-files:
- "\\.pb\\.go$"
- "\\.pb\\.gw\\.go$"
# Skip vendor/ etc
Expand All @@ -29,7 +26,7 @@ linters:
- staticcheck
- revive
- gosec
- exportloopref
- copyloopvar
- prealloc
linters-settings:
gocritic:
Expand Down
71 changes: 54 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
UNAME_OS := $(shell uname -s)
UNAME_ARCH := $(shell uname -m)
PROTO_LEGACY ?= true

ifeq (0, $(shell id -u))
$(warning "make was started with superuser privileges. it may cause issues with direnv")
Expand All @@ -24,23 +23,52 @@ ifeq (, $(GOTOOLCHAIN))
$(error "GOTOOLCHAIN is not set")
endif

ifeq ($(GO111MODULE),off)
else
GOMOD=readonly
endif

ifneq ($(GOWORK),off)
ifeq ($(shell test -e ${AKASH_ROOT}/go/go.work && echo -n yes),yes)
GOWORK=${AKASH_ROOT}/go/go.work
else
GOWORK=off
endif
endif

ifneq ($(GOWORK),off)
ifeq ($(GOMOD),$(filter $(GOMOD),mod ""))
$(error '-mod may only be set to readonly or vendor when in workspace mode, but it is set to ""')
endif
endif

ifeq ($(GOMOD),vendor)
ifneq ($(wildcard ./vendor/.),)
$(error "go -mod is in vendor mode but vendor dir has not been found. consider to run go mod vendor")
endif
endif

GO_ROOT := go
TS_ROOT := $(AKASH_TS_ROOT)

BUMP_MOD ?=

GO := GO111MODULE=$(GO111MODULE) go
GO_MOD_NAME := $(shell go list -m 2>/dev/null)

BUF_VERSION ?= 1.28.1
PROTOC_VERSION ?= 21.12
GOGOPROTO_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/gogoproto)
# TODO https://github.com/akash-network/support/issues/77
PROTOC_GEN_GOCOSMOS_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/regen-network/cosmos-proto)
PROTOC_GEN_GO_PULSAR_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/cosmos-proto)
PROTOC_GEN_GO_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' google.golang.org/protobuf)
PROTOC_GEN_GRPC_GATEWAY_VERSION := $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/grpc-ecosystem/grpc-gateway)
PROTOC_GEN_DOC_VERSION := $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/pseudomuto/protoc-gen-doc)
GO_MOD_NAME := $(shell cd $(GO_ROOT); GOWORK=off go list -m 2>/dev/null)

BUF_VERSION ?= 1.47.2
PROTOC_VERSION ?= 29.1
GOGOPROTO_VERSION ?= $(shell cd $(GO_ROOT); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/gogoproto)
PROTOC_GEN_GOCOSMOS_VERSION ?= $(GOGOPROTO_VERSION)
PROTOC_GEN_GO_PULSAR_VERSION ?= $(shell cd $(GO_ROOT); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/cosmos-proto)
PROTOC_GEN_GO_VERSION ?= $(shell cd $(GO_ROOT); $(GO) list -mod=readonly -m -f '{{ .Version }}' google.golang.org/protobuf)
PROTOC_GEN_GRPC_GATEWAY_VERSION := $(shell cd $(GO_ROOT); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/grpc-ecosystem/grpc-gateway)
PROTOC_GEN_DOC_VERSION := $(shell cd $(GO_ROOT); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/pseudomuto/protoc-gen-doc)
PROTOC_GEN_SWAGGER_VERSION := $(PROTOC_GEN_GRPC_GATEWAY_VERSION)
MODVENDOR_VERSION ?= v0.5.0
MOCKERY_VERSION ?= 2.42.0
GOLANGCI_LINT_VERSION ?= v1.56.1
MOCKERY_VERSION ?= 2.45.0
GOLANGCI_LINT_VERSION ?= v1.60.3
SEMVER_VERSION ?= v1.2.5

BUF_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/buf/$(BUF_VERSION)
PROTOC_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc/$(PROTOC_VERSION)
Expand All @@ -55,11 +83,12 @@ MODVENDOR_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/modvendor/$(M
GIT_CHGLOG_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/git-chglog/$(GIT_CHGLOG_VERSION)
MOCKERY_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/mockery/v$(MOCKERY_VERSION)
GOLANGCI_LINT_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/golangci-lint/$(GOLANGCI_LINT_VERSION)
SEMVER_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/semver/$(SEMVER_VERSION)

BUF := $(AKASH_DEVCACHE_BIN)/buf
PROTOC := $(AKASH_DEVCACHE_BIN)/protoc
# TODO https://github.com/akash-network/support/issues/77
PROTOC_GEN_GOCOSMOS := $(AKASH_DEVCACHE_BIN)/legacy/protoc-gen-gocosmos
PROTOC_GEN_GOCOSMOS := $(AKASH_DEVCACHE_BIN)/protoc-gen-gocosmos
GOGOPROTO := $(AKASH_DEVCACHE_BIN)/gogoproto
PROTOC_GEN_GO_PULSAR := $(AKASH_DEVCACHE_BIN)/protoc-gen-go-pulsar
PROTOC_GEN_GO := $(AKASH_DEVCACHE_BIN)/protoc-gen-go
PROTOC_GEN_GRPC_GATEWAY := $(AKASH_DEVCACHE_BIN)/protoc-gen-grpc-gateway
Expand All @@ -70,13 +99,17 @@ GIT_CHGLOG := $(AKASH_DEVCACHE_BIN)/git-chglog
SWAGGER_COMBINE := $(AKASH_DEVCACHE_NODE_BIN)/swagger-combine
MOCKERY := $(AKASH_DEVCACHE_BIN)/mockery
GOLANGCI_LINT := $(AKASH_DEVCACHE_BIN)/golangci-lint
SEMVER := $(AKASH_DEVCACHE_BIN)/semver

GOLANGCI_LINT_RUN := $(GOLANGCI_LINT) run
GOLINT := $(GOLANGCI_LINT_RUN) ./... --disable-all --deadline=5m --enable
GOLINT := $(GOLANGCI_LINT_RUN) ./... --disable-all --deadline=10m --enable

DOCKER_RUN := docker run --rm -v $(shell pwd):/workspace -w /workspace
DOCKER_BUF := $(DOCKER_RUN) bufbuild/buf:$(BUF_VERSION)

GO_MODULES ?= $(shell find * -name go.mod -exec dirname {} \;)
GO_TEST_DIRS ?= ./...

include $(AKASH_ROOT)/make/setup-cache.mk
include $(AKASH_ROOT)/make/mod.mk
include $(AKASH_ROOT)/make/test.mk
Expand All @@ -85,6 +118,10 @@ include $(AKASH_ROOT)/make/lint.mk
include $(AKASH_ROOT)/make/release-ts.mk
include $(AKASH_ROOT)/make/code-style.mk

.PHONY: bump-%
bump-%:
@./script/tools.sh bump "$*" "$(BUMP_MOD)"

.PHONY: clean
clean:
rm -rf $(AKASH_DEVCACHE)
Expand Down
93 changes: 72 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,78 @@
# Akash API
# Akash Chain SDK

[![Lint Status](https://github.com/akash-network/akash-api/actions/workflows/lint.yaml/badge.svg)](https://github.com/akash-network/akash-api/actions/workflows/lint.yaml)
[![Test Status](https://github.com/akash-network/akash-api/actions/workflows/tests.yaml/badge.svg)](https://github.com/akash-network/akash-api/actions/workflows/tests.yaml)

## Overview

This repository consolidates gRPC API definitions for the [Akash Node](https://github.com/akash-network/node) and [Akash Provider](https://github.com/akash-network/provider). It also includes related code generation.
This repository is a development gateway to the Akash Blockchain.
It aims following:
- Define data types and API via [protobuf](./proto)
- Akash Blockchain and it's stores, aka [node](./proto/node)
- Akash Provider Interface, aka [provider](./proto/provider)
- Define data types and API (both REST and GRPC) of Akash Provider Interface
- Provide official reference clients for supported [programming languages](#supported-languages)

Currently, two `buf` packages are defined, with potential future publication to BSR based on demand:
- **Node Package**: `buf.build/akash-network/node`
- Akash protobuf definitions, previously located in the [proto directory](https://github.com/akash-network/node/tree/master/proto/akash), are now under [proto/node/akash](./proto/node/akash).
- Generated code is available [here](./go/node).
- **Provider Package**: `buf.build/akash-network/provider`
- Akash manifest definitions, previously defined as plain Go structs, have been converted into Protobuf [definitions](./proto/provider/akash).

Proto documentation is available for:
- [Node](docs/proto/node.md)
- [Provider](docs/proto/provider.md)
## Supported languages

## Contributing
### Golang

Please submit issues via the [support repository](https://github.com/akash-network/support/issues) and tag them with `repo/akash-api`. All pull requests must be associated with an open issue in the support repository.
[This implementation](./go) provider all necessary code-generation as well as client defining Akash Blockchain
There are a few packages this implementation exports. All packages available via Vanity URLs which are hosted as [Github Pages](https://github.com/akash-network/vanity).
#### Go package

## Releases
Source code is located within [go](./go) directory

Releases indicate changes to the repository itself. API versions are defined within each module.
Contains all the types, clients and utilities nesessary to communicate with Akash Blockchain

```go
import "pkg.akt.dev/go"
```

## Pre-generated Packages
##### Migrate package

We provide generated code to allow developers to focus on features rather than stub generation:
- [Go](./go)
- [TS](./ts)
Depending on difference in API and stores between current and previous versions of the blockchain, there may be a **migrate** package. It is intended to be used by [node](https://github.com/akash-network/node) only.
```go
import "pkg.akt.dev/go/node/migrate"
```

## How to run protobuf codegen
#### SDL package

Reference implementation of the SDL.
```go
import "pkg.akt.dev/go/sdl"
```

#### CLI package

CLI package which combines improved version of cli clients from node](https://github.com/akash-network/node) and [cosmos-sdk](https://github.com/cosmos/cosmos-sdk)
```go
import "pkg.akt.dev/go/cli"
```

### TS

Source code is located within [ts](./ts) directory


## Protobuf

All protobuf definitions are located within [proto](./proto) directory.

This repository consolidates gRPC API definitions for the [Akash Node](https://github.com/akash-network/node) and [Akash Provider](https://github.com/akash-network/provider). It also includes related code generation.

Currently, two `buf` packages are defined, with potential future publication to BSR based on demand:
- **Node Package**: `buf.build/pkg.akt.dev/node`
- **Provider Package**: `buf.build/pkg.akt.dev/provider`

Proto documentation is available for:
- [Node](docs/proto/node.md)
- [Provider](docs/proto/provider.md)

Documentation in swagger format combining both node and provider packages can be located [here](./docs/swagger-ui/swagger.yaml)

### How to run protobuf codegen

If there is a need to run regenerate protobuf (in case of API or documentation changes):

Expand All @@ -48,9 +88,20 @@ If there is a need to run regenerate protobuf (in case of API or documentation c

3. Run codegen. This will
- Install all required tools into local cache
- generate changes for both `Go` and `TS` packages.
- generate changes to all [supported programming languages](#supported-languages)

```shell
make proto-gen
```
- to run codegen for specific language use `make proto-gen-<lang>`. For example
```shell
make proto-gen-go
```

## Releases

Releases indicate changes to the repository itself. API versions are defined within each module.

## Contributing

Please submit issues via the [support repository](https://github.com/akash-network/support/issues) and tag them with `repo/akash-api`. All pull requests must be associated with an open issue in the support repository.
File renamed without changes.
11 changes: 11 additions & 0 deletions buf.gen.ts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: v1
plugins:
- name: ts
strategy: all
path: ./ts/node_modules/.bin/protoc-gen-ts_proto
out: ./ts/src/generated
opt: "esModuleInterop=true,forceLong=long,outputTypeRegistry=true,useExactTypes=false,exportCommonSymbols=false"
- name: grpc-gateway-ts
path: ./ts/node_modules/.bin/protoc-gen-ts_proto
out: ./.cache/tmp/ts/generated-grpc-js
opt: "esModuleInterop=true,forceLong=long,useExactTypes=false,exportCommonSymbols=false,outputServices=grpc-js"
2 changes: 0 additions & 2 deletions buf.work.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ directories:
- proto/node
- proto/provider
- .cache/include
- vendor/github.com/cosmos/cosmos-sdk/proto
- vendor/github.com/cosmos/cosmos-sdk/third_party/proto
Loading
Loading