mirror of
https://github.com/aljazceru/ark.git
synced 2026-02-21 10:54:19 +01:00
* Add gRPC, REST, and gRPC-Web clients for server access This commit introduces clients for gRPC, REST, and gRPC-Web to access the server. - gRPC client: Includes additional argument opts ...grpc.CallOption in the interface for future extensibility. - REST client: Factory function accepts http.Client as an argument to allow user customization. - gRPC-Web client: Added a Log method for fast debugging in JavaScript. The decision to use different interfaces for each client type is to accommodate specific features and extensibility requirements for each protocol. * remove grpc web * generate rest * use grpc sdk in CLI * temp wasm * ark sdk * renaming * pr review refactor * pr review refactor * walletStore & configStore * ark sdk wasm wrapper * handle event stream with rest * wip on supporting rest * store init * simulate event stream with rest * fix rest sdk wip * Fix returning forfeit txs in round event * wasm first working e2e example * pr review refactor * pr review refactor * pr review refactor * Fixes --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
64 lines
1.7 KiB
Makefile
Executable File
64 lines
1.7 KiB
Makefile
Executable File
.PHONY: build clean cov help intergrationtest lint run test vet proto proto-lint
|
|
|
|
## build: build for all platforms
|
|
build:
|
|
@echo "Building arkd binary..."
|
|
@bash ./scripts/build
|
|
|
|
## clean: cleans the binary
|
|
clean:
|
|
@echo "Cleaning..."
|
|
@go clean
|
|
|
|
## cov: generates coverage report
|
|
cov:
|
|
@echo "Coverage..."
|
|
@go test -cover ./...
|
|
|
|
## help: prints this help message
|
|
help:
|
|
@echo "Usage: \n"
|
|
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
|
|
|
|
## intergrationtest: runs integration tests
|
|
integrationtest:
|
|
@echo "Running integration tests..."
|
|
@go test -v -count=1 -race -timeout 200s github.com/ark-network/ark/test/e2e
|
|
|
|
## lint: lint codebase
|
|
lint:
|
|
@echo "Linting code..."
|
|
@golangci-lint run --fix
|
|
|
|
## run: run in dev mode
|
|
run: clean
|
|
@echo "Running arkd in dev mode..."
|
|
@export ARK_WALLET_ADDR=localhost:18000; \
|
|
export ARK_ROUND_INTERVAL=10; \
|
|
export ARK_LOG_LEVEL=5; \
|
|
export ARK_NETWORK=regtest; \
|
|
export ARK_PORT=8080; \
|
|
go run ./cmd/arkd
|
|
|
|
## test: runs unit and component tests
|
|
test:
|
|
@echo "Running unit tests..."
|
|
@find . -name go.mod -execdir go test -v -count=1 -race ./internal/... \;
|
|
|
|
## vet: code analysis
|
|
vet:
|
|
@echo "Running code analysis..."
|
|
@go vet ./...
|
|
|
|
## proto: compile proto stubs
|
|
proto: proto-lint
|
|
@echo "Compiling stubs..."
|
|
@docker run --rm --volume "$(shell pwd):/workspace" --workdir /workspace buf generate buf.build/vulpemventures/ocean
|
|
@docker run --rm --volume "$(shell pwd):/workspace" --workdir /workspace buf generate
|
|
|
|
## proto-lint: lint protos
|
|
proto-lint:
|
|
@echo "Linting protos..."
|
|
@docker build -q -t buf -f buf.Dockerfile . &> /dev/null
|
|
@docker run --rm --volume "$(shell pwd):/workspace" --workdir /workspace buf lint
|
|
|