diff --git a/.github/workflows/ci.intergation.yaml b/.github/workflows/ark.intergation.yaml similarity index 74% rename from .github/workflows/ci.intergation.yaml rename to .github/workflows/ark.intergation.yaml index f15d10ded..a9d3d9356 100755 --- a/.github/workflows/ci.intergation.yaml +++ b/.github/workflows/ark.intergation.yaml @@ -2,12 +2,18 @@ name: ci_integration on: push: - branches: [master] + branches: + - master + paths: + - "asp/**" jobs: test: name: integration tests runs-on: ubuntu-latest + defaults: + run: + working-directory: ./asp steps: - uses: actions/setup-go@v3 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/ark.release.yaml similarity index 93% rename from .github/workflows/release.yaml rename to .github/workflows/ark.release.yaml index 41b148d21..d8d0f76f7 100755 --- a/.github/workflows/release.yaml +++ b/.github/workflows/ark.release.yaml @@ -5,10 +5,15 @@ on: push: tags: - "*" + paths: + - "asp/**" jobs: goreleaser: runs-on: ubuntu-20.04 + defaults: + run: + working-directory: ./asp env: DOCKER_CLI_EXPERIMENTAL: "enabled" diff --git a/.github/workflows/ci.unit.yaml b/.github/workflows/ark.unit.yaml similarity index 79% rename from .github/workflows/ci.unit.yaml rename to .github/workflows/ark.unit.yaml index f3786acb2..3dc4f974e 100755 --- a/.github/workflows/ci.unit.yaml +++ b/.github/workflows/ark.unit.yaml @@ -2,14 +2,22 @@ name: ci_unit on: push: + paths: + - "asp/**" branches: [master] pull_request: - branches: [master] + branches: + - master + paths: + - "asp/**" jobs: test: name: unit tests runs-on: ubuntu-latest + defaults: + run: + working-directory: ./asp steps: - uses: actions/setup-go@v3 with: @@ -19,6 +27,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: v1.54 + working-directory: ./asp - name: check code integrity uses: securego/gosec@master with: diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 9e7d032c9..83810e3a4 --- a/README.md +++ b/README.md @@ -1 +1,9 @@ -# ark \ No newline at end of file +# Ark monorepo + +This is the monorepo containing the initial Ark products. + +In this repository you can find: + +* `asp` - a proof of concept of an Ark Service Provider. +* `dev-portal` - the website where to find documentation about Ark protocol and products. +* `noah` - the initial Ark wallet, served as CLI. \ No newline at end of file diff --git a/.dockerignore b/asp/.dockerignore similarity index 100% rename from .dockerignore rename to asp/.dockerignore diff --git a/.gitignore b/asp/.gitignore similarity index 100% rename from .gitignore rename to asp/.gitignore diff --git a/.goreleaser.yaml b/asp/.goreleaser.yaml similarity index 72% rename from .goreleaser.yaml rename to asp/.goreleaser.yaml index c030126f6..ab83b2a02 100755 --- a/.goreleaser.yaml +++ b/asp/.goreleaser.yaml @@ -1,6 +1,6 @@ builds: - - id: "coordinatord" - main: ./cmd/coordinatord + - id: "arkd" + main: ./cmd/arkd ldflags: - -s -X 'main.version={{.Version}}' -X 'main.commit={{.Commit}}' -X 'main.date={{.Date}}' goos: @@ -9,7 +9,7 @@ builds: goarch: - amd64 - arm64 - binary: coordinatord + binary: arkd ## flag the semver v**.**.**-.* as pre-release on Github release: @@ -25,11 +25,11 @@ changelog: use: github-native archives: - - id: coordinatord + - id: arkd format: binary builds: - - coordinatord - name_template: "coordinatord-v{{ .Version }}-{{ .Os }}-{{ .Arch }}" + - arkd + name_template: "arkd-v{{ .Version }}-{{ .Os }}-{{ .Arch }}" dockers: ########################### @@ -38,12 +38,12 @@ dockers: #amd64 - image_templates: - - "ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64" + - "ghcr.io/ark-network/arkd:{{ .Tag }}-amd64" # push always either release or prerelease with a docker tag with the semver only skip_push: "false" use: buildx ids: - - coordinatord + - arkd dockerfile: goreleaser.Dockerfile # GOOS of the built binaries/packages that should be used. goos: linux @@ -54,19 +54,19 @@ dockers: - "--platform=linux/amd64" - "--pull" - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.title=coordinatord" + - "--label=org.opencontainers.image.title=arkd" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - "--build-arg=VERSION={{.Version}}" - "--build-arg=COMMIT={{.Commit}}" - "--build-arg=DATE={{.Date}}" - image_templates: - - "ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8" + - "ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8" # push always either release or prerelease with a docker tag with the semver only skip_push: "false" use: buildx ids: - - coordinatord + - arkd dockerfile: goreleaser.Dockerfile # GOOS of the built binaries/packages that should be used. goos: linux @@ -77,7 +77,7 @@ dockers: - "--platform=linux/arm64/v8" - "--pull" - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.title=coordinatord" + - "--label=org.opencontainers.image.title=arkd" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - "--build-arg=VERSION={{.Version}}" @@ -85,15 +85,15 @@ dockers: - "--build-arg=DATE={{.Date}}" docker_manifests: - - name_template: ghcr.io/ark-network/coordinatord:{{ .Tag }} + - name_template: ghcr.io/ark-network/arkd:{{ .Tag }} image_templates: - - ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64 - - ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8 + - ghcr.io/ark-network/arkd:{{ .Tag }}-amd64 + - ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8 skip_push: "false" - - name_template: ghcr.io/ark-network/coordinatord:latest + - name_template: ghcr.io/ark-network/arkd:latest image_templates: - - ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64 - - ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8 + - ghcr.io/ark-network/arkd:{{ .Tag }}-amd64 + - ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8 skip_push: auto \ No newline at end of file diff --git a/Dockerfile b/asp/Dockerfile similarity index 67% rename from Dockerfile rename to asp/Dockerfile index a44fedf6b..502875ff6 100755 --- a/Dockerfile +++ b/asp/Dockerfile @@ -11,9 +11,9 @@ WORKDIR /app COPY . . -RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${COMMIT}' -X 'main.Commit=${COMMIT}' -X 'main.Date=${COMMIT}'" -o bin/coordinatord cmd/coordinatord/main.go +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${COMMIT}' -X 'main.Commit=${COMMIT}' -X 'main.Date=${COMMIT}'" -o bin/arkd cmd/arkd/main.go -# Second image, running the coordinatord executable +# Second image, running the arkd executable FROM debian:buster-slim # $USER name, and data $DIR to be used in the 'final' image @@ -31,11 +31,11 @@ RUN adduser --disabled-password \ "$USER" USER $USER -# Prevents 'VOLUME $DIR/.coordinatord/' being created as owned by 'root' -RUN mkdir -p "$DIR/.coordinatord/" +# Prevents 'VOLUME $DIR/.arkd/' being created as owned by 'root' +RUN mkdir -p "$DIR/.arkd/" -# Expose volume containing all 'coordinatord' data -VOLUME $DIR/.coordinatord/ +# Expose volume containing all 'arkd' data +VOLUME $DIR/.arkd/ -ENTRYPOINT [ "coordinatord" ] +ENTRYPOINT [ "arkd" ] \ No newline at end of file diff --git a/LICENSE b/asp/LICENSE similarity index 100% rename from LICENSE rename to asp/LICENSE diff --git a/Makefile b/asp/Makefile similarity index 88% rename from Makefile rename to asp/Makefile index d3b49f243..9f3fe38ac 100755 --- a/Makefile +++ b/asp/Makefile @@ -2,7 +2,7 @@ ## build: build for all platforms build: - @echo "Building coordinatord binary..." + @echo "Building arkd binary..." @bash ./scripts/build build-noah: @@ -36,9 +36,9 @@ lint: ## run: run in dev mode run: clean - @echo "Running coordinatord in dev mode..." - @export ARK_COORDINATOR_WALLET_ADDR=localhost:18000; \ - go run ./cmd/coordinatord + @echo "Running arkd in dev mode..." + @export ARK_WALLET_ADDR=localhost:18000; \ + go run ./cmd/arkd ## test: runs unit and component tests test: diff --git a/internal/interface/grpc/handlers/.gitkeep b/asp/README.md similarity index 100% rename from internal/interface/grpc/handlers/.gitkeep rename to asp/README.md diff --git a/api-spec/openapi/swagger/coordinator/v1/service.swagger.json b/asp/api-spec/openapi/swagger/ark/v1/service.swagger.json similarity index 92% rename from api-spec/openapi/swagger/coordinator/v1/service.swagger.json rename to asp/api-spec/openapi/swagger/ark/v1/service.swagger.json index e50644407..4d2851e9a 100644 --- a/api-spec/openapi/swagger/coordinator/v1/service.swagger.json +++ b/asp/api-spec/openapi/swagger/ark/v1/service.swagger.json @@ -1,12 +1,12 @@ { "swagger": "2.0", "info": { - "title": "coordinator/v1/service.proto", + "title": "ark/v1/service.proto", "version": "version not set" }, "tags": [ { - "name": "CoordinatorService" + "name": "ArkService" } ], "consumes": [ @@ -18,7 +18,7 @@ "paths": { "/v1/payment/claim": { "post": { - "operationId": "CoordinatorService_ClaimPayment", + "operationId": "ArkService_ClaimPayment", "responses": { "200": { "description": "A successful response.", @@ -44,13 +44,13 @@ } ], "tags": [ - "CoordinatorService" + "ArkService" ] } }, "/v1/payment/finalize": { "post": { - "operationId": "CoordinatorService_FinalizePayment", + "operationId": "ArkService_FinalizePayment", "responses": { "200": { "description": "A successful response.", @@ -76,13 +76,13 @@ } ], "tags": [ - "CoordinatorService" + "ArkService" ] } }, "/v1/payment/register": { "post": { - "operationId": "CoordinatorService_RegisterPayment", + "operationId": "ArkService_RegisterPayment", "responses": { "200": { "description": "A successful response.", @@ -108,13 +108,13 @@ } ], "tags": [ - "CoordinatorService" + "ArkService" ] } }, "/v1/round/{txid}": { "get": { - "operationId": "CoordinatorService_GetRound", + "operationId": "ArkService_GetRound", "responses": { "200": { "description": "A successful response.", @@ -138,13 +138,13 @@ } ], "tags": [ - "CoordinatorService" + "ArkService" ] } }, "/v1/rounds": { "post": { - "operationId": "CoordinatorService_ListRounds", + "operationId": "ArkService_ListRounds", "responses": { "200": { "description": "A successful response.", @@ -170,7 +170,7 @@ } ], "tags": [ - "CoordinatorService" + "ArkService" ] } } diff --git a/api-spec/openapi/swagger/ocean/v1/account.swagger.json b/asp/api-spec/openapi/swagger/ocean/v1/account.swagger.json similarity index 100% rename from api-spec/openapi/swagger/ocean/v1/account.swagger.json rename to asp/api-spec/openapi/swagger/ocean/v1/account.swagger.json diff --git a/api-spec/openapi/swagger/ocean/v1/notification.swagger.json b/asp/api-spec/openapi/swagger/ocean/v1/notification.swagger.json similarity index 100% rename from api-spec/openapi/swagger/ocean/v1/notification.swagger.json rename to asp/api-spec/openapi/swagger/ocean/v1/notification.swagger.json diff --git a/api-spec/openapi/swagger/ocean/v1/transaction.swagger.json b/asp/api-spec/openapi/swagger/ocean/v1/transaction.swagger.json similarity index 100% rename from api-spec/openapi/swagger/ocean/v1/transaction.swagger.json rename to asp/api-spec/openapi/swagger/ocean/v1/transaction.swagger.json diff --git a/api-spec/openapi/swagger/ocean/v1/types.swagger.json b/asp/api-spec/openapi/swagger/ocean/v1/types.swagger.json similarity index 100% rename from api-spec/openapi/swagger/ocean/v1/types.swagger.json rename to asp/api-spec/openapi/swagger/ocean/v1/types.swagger.json diff --git a/api-spec/openapi/swagger/ocean/v1/wallet.swagger.json b/asp/api-spec/openapi/swagger/ocean/v1/wallet.swagger.json similarity index 100% rename from api-spec/openapi/swagger/ocean/v1/wallet.swagger.json rename to asp/api-spec/openapi/swagger/ocean/v1/wallet.swagger.json diff --git a/api-spec/protobuf/coordinator/v1/service.proto b/asp/api-spec/protobuf/ark/v1/service.proto similarity index 97% rename from api-spec/protobuf/coordinator/v1/service.proto rename to asp/api-spec/protobuf/ark/v1/service.proto index c91d184fe..ccb4c537d 100755 --- a/api-spec/protobuf/coordinator/v1/service.proto +++ b/asp/api-spec/protobuf/ark/v1/service.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package coordinator.v1; +package ark.v1; import "google/api/annotations.proto"; -service CoordinatorService { +service ArkService { rpc RegisterPayment(RegisterPaymentRequest) returns (RegisterPaymentResponse) { option (google.api.http) = { post: "/v1/payment/register" diff --git a/api-spec/protobuf/buf.lock b/asp/api-spec/protobuf/buf.lock similarity index 100% rename from api-spec/protobuf/buf.lock rename to asp/api-spec/protobuf/buf.lock diff --git a/api-spec/protobuf/buf.yaml b/asp/api-spec/protobuf/buf.yaml similarity index 78% rename from api-spec/protobuf/buf.yaml rename to asp/api-spec/protobuf/buf.yaml index 5b887f144..54dab7201 100755 --- a/api-spec/protobuf/buf.yaml +++ b/asp/api-spec/protobuf/buf.yaml @@ -1,5 +1,5 @@ version: v1 -name: buf.build/ark-network/coordinator +name: buf.build/ark-network/ark deps: - buf.build/googleapis/googleapis breaking: diff --git a/asp/api-spec/protobuf/gen/ark/v1/service.pb.go b/asp/api-spec/protobuf/gen/ark/v1/service.pb.go new file mode 100644 index 000000000..1e18d657c --- /dev/null +++ b/asp/api-spec/protobuf/gen/ark/v1/service.pb.go @@ -0,0 +1,946 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: ark/v1/service.proto + +package arkv1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterPaymentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unsigned forfeit tx sending all funds back to the ASP. + Vtx string `protobuf:"bytes,1,opt,name=vtx,proto3" json:"vtx,omitempty"` +} + +func (x *RegisterPaymentRequest) Reset() { + *x = RegisterPaymentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterPaymentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterPaymentRequest) ProtoMessage() {} + +func (x *RegisterPaymentRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterPaymentRequest.ProtoReflect.Descriptor instead. +func (*RegisterPaymentRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterPaymentRequest) GetVtx() string { + if x != nil { + return x.Vtx + } + return "" +} + +type RegisterPaymentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mocks wabisabi's credentials. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Forfeit tx signed by the ASP. + SignedVtx string `protobuf:"bytes,2,opt,name=signed_vtx,json=signedVtx,proto3" json:"signed_vtx,omitempty"` +} + +func (x *RegisterPaymentResponse) Reset() { + *x = RegisterPaymentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterPaymentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterPaymentResponse) ProtoMessage() {} + +func (x *RegisterPaymentResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterPaymentResponse.ProtoReflect.Descriptor instead. +func (*RegisterPaymentResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *RegisterPaymentResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *RegisterPaymentResponse) GetSignedVtx() string { + if x != nil { + return x.SignedVtx + } + return "" +} + +type ClaimPaymentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mocks wabisabi's credentials. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // List of receivers for a registered payment. + Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` +} + +func (x *ClaimPaymentRequest) Reset() { + *x = ClaimPaymentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClaimPaymentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimPaymentRequest) ProtoMessage() {} + +func (x *ClaimPaymentRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimPaymentRequest.ProtoReflect.Descriptor instead. +func (*ClaimPaymentRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ClaimPaymentRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ClaimPaymentRequest) GetOutputs() []*Output { + if x != nil { + return x.Outputs + } + return nil +} + +type ClaimPaymentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ClaimPaymentResponse) Reset() { + *x = ClaimPaymentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClaimPaymentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimPaymentResponse) ProtoMessage() {} + +func (x *ClaimPaymentResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimPaymentResponse.ProtoReflect.Descriptor instead. +func (*ClaimPaymentResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{3} +} + +type FinalizePaymentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Forfeit tx signed also by the user. + SignedVtx string `protobuf:"bytes,1,opt,name=signed_vtx,json=signedVtx,proto3" json:"signed_vtx,omitempty"` +} + +func (x *FinalizePaymentRequest) Reset() { + *x = FinalizePaymentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FinalizePaymentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinalizePaymentRequest) ProtoMessage() {} + +func (x *FinalizePaymentRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinalizePaymentRequest.ProtoReflect.Descriptor instead. +func (*FinalizePaymentRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *FinalizePaymentRequest) GetSignedVtx() string { + if x != nil { + return x.SignedVtx + } + return "" +} + +type FinalizePaymentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FinalizePaymentResponse) Reset() { + *x = FinalizePaymentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FinalizePaymentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinalizePaymentResponse) ProtoMessage() {} + +func (x *FinalizePaymentResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinalizePaymentResponse.ProtoReflect.Descriptor instead. +func (*FinalizePaymentResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{5} +} + +type ListRoundsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *ListRoundsRequest) Reset() { + *x = ListRoundsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRoundsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoundsRequest) ProtoMessage() {} + +func (x *ListRoundsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRoundsRequest.ProtoReflect.Descriptor instead. +func (*ListRoundsRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ListRoundsRequest) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *ListRoundsRequest) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +type ListRoundsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rounds []*Round `protobuf:"bytes,1,rep,name=rounds,proto3" json:"rounds,omitempty"` +} + +func (x *ListRoundsResponse) Reset() { + *x = ListRoundsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRoundsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoundsResponse) ProtoMessage() {} + +func (x *ListRoundsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRoundsResponse.ProtoReflect.Descriptor instead. +func (*ListRoundsResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *ListRoundsResponse) GetRounds() []*Round { + if x != nil { + return x.Rounds + } + return nil +} + +type GetRoundRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` +} + +func (x *GetRoundRequest) Reset() { + *x = GetRoundRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoundRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoundRequest) ProtoMessage() {} + +func (x *GetRoundRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRoundRequest.ProtoReflect.Descriptor instead. +func (*GetRoundRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *GetRoundRequest) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +type GetRoundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Round *Round `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"` +} + +func (x *GetRoundResponse) Reset() { + *x = GetRoundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoundResponse) ProtoMessage() {} + +func (x *GetRoundResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRoundResponse.ProtoReflect.Descriptor instead. +func (*GetRoundResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{9} +} + +func (x *GetRoundResponse) GetRound() *Round { + if x != nil { + return x.Round + } + return nil +} + +type Round struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + Txid string `protobuf:"bytes,3,opt,name=txid,proto3" json:"txid,omitempty"` + Outputs []*Output `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` +} + +func (x *Round) Reset() { + *x = Round{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Round) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Round) ProtoMessage() {} + +func (x *Round) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Round.ProtoReflect.Descriptor instead. +func (*Round) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *Round) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Round) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +func (x *Round) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +func (x *Round) GetOutputs() []*Output { + if x != nil { + return x.Outputs + } + return nil +} + +type Output struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Output) Reset() { + *x = Output{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Output) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output) ProtoMessage() {} + +func (x *Output) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output.ProtoReflect.Descriptor instead. +func (*Output) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{11} +} + +func (x *Output) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *Output) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +var File_ark_v1_service_proto protoreflect.FileDescriptor + +var file_ark_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x16, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x74, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x74, 0x78, 0x22, 0x48, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x74, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, + 0x74, 0x78, 0x22, 0x4f, 0x0a, 0x13, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x16, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x76, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x56, 0x74, 0x78, 0x22, 0x19, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, + 0x22, 0x37, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x6d, 0x0a, 0x05, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x28, + 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x38, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x32, 0x94, 0x04, 0x0a, 0x0a, 0x41, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x0c, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x12, + 0x73, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x5a, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, + 0x64, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, + 0x12, 0x57, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x61, + 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x2f, 0x7b, 0x74, 0x78, 0x69, 0x64, 0x7d, 0x42, 0x92, 0x01, 0x0a, 0x0a, 0x63, 0x6f, + 0x6d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x6b, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x61, 0x72, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x72, 0x6b, 0x2f, 0x76, + 0x31, 0x3b, 0x61, 0x72, 0x6b, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x06, + 0x41, 0x72, 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x41, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x12, 0x41, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x41, 0x72, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ark_v1_service_proto_rawDescOnce sync.Once + file_ark_v1_service_proto_rawDescData = file_ark_v1_service_proto_rawDesc +) + +func file_ark_v1_service_proto_rawDescGZIP() []byte { + file_ark_v1_service_proto_rawDescOnce.Do(func() { + file_ark_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ark_v1_service_proto_rawDescData) + }) + return file_ark_v1_service_proto_rawDescData +} + +var file_ark_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ark_v1_service_proto_goTypes = []interface{}{ + (*RegisterPaymentRequest)(nil), // 0: ark.v1.RegisterPaymentRequest + (*RegisterPaymentResponse)(nil), // 1: ark.v1.RegisterPaymentResponse + (*ClaimPaymentRequest)(nil), // 2: ark.v1.ClaimPaymentRequest + (*ClaimPaymentResponse)(nil), // 3: ark.v1.ClaimPaymentResponse + (*FinalizePaymentRequest)(nil), // 4: ark.v1.FinalizePaymentRequest + (*FinalizePaymentResponse)(nil), // 5: ark.v1.FinalizePaymentResponse + (*ListRoundsRequest)(nil), // 6: ark.v1.ListRoundsRequest + (*ListRoundsResponse)(nil), // 7: ark.v1.ListRoundsResponse + (*GetRoundRequest)(nil), // 8: ark.v1.GetRoundRequest + (*GetRoundResponse)(nil), // 9: ark.v1.GetRoundResponse + (*Round)(nil), // 10: ark.v1.Round + (*Output)(nil), // 11: ark.v1.Output +} +var file_ark_v1_service_proto_depIdxs = []int32{ + 11, // 0: ark.v1.ClaimPaymentRequest.outputs:type_name -> ark.v1.Output + 10, // 1: ark.v1.ListRoundsResponse.rounds:type_name -> ark.v1.Round + 10, // 2: ark.v1.GetRoundResponse.round:type_name -> ark.v1.Round + 11, // 3: ark.v1.Round.outputs:type_name -> ark.v1.Output + 0, // 4: ark.v1.ArkService.RegisterPayment:input_type -> ark.v1.RegisterPaymentRequest + 2, // 5: ark.v1.ArkService.ClaimPayment:input_type -> ark.v1.ClaimPaymentRequest + 4, // 6: ark.v1.ArkService.FinalizePayment:input_type -> ark.v1.FinalizePaymentRequest + 6, // 7: ark.v1.ArkService.ListRounds:input_type -> ark.v1.ListRoundsRequest + 8, // 8: ark.v1.ArkService.GetRound:input_type -> ark.v1.GetRoundRequest + 1, // 9: ark.v1.ArkService.RegisterPayment:output_type -> ark.v1.RegisterPaymentResponse + 3, // 10: ark.v1.ArkService.ClaimPayment:output_type -> ark.v1.ClaimPaymentResponse + 5, // 11: ark.v1.ArkService.FinalizePayment:output_type -> ark.v1.FinalizePaymentResponse + 7, // 12: ark.v1.ArkService.ListRounds:output_type -> ark.v1.ListRoundsResponse + 9, // 13: ark.v1.ArkService.GetRound:output_type -> ark.v1.GetRoundResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_ark_v1_service_proto_init() } +func file_ark_v1_service_proto_init() { + if File_ark_v1_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ark_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterPaymentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterPaymentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClaimPaymentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClaimPaymentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FinalizePaymentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FinalizePaymentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRoundsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRoundsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRoundRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRoundResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Round); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ark_v1_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Output); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ark_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ark_v1_service_proto_goTypes, + DependencyIndexes: file_ark_v1_service_proto_depIdxs, + MessageInfos: file_ark_v1_service_proto_msgTypes, + }.Build() + File_ark_v1_service_proto = out.File + file_ark_v1_service_proto_rawDesc = nil + file_ark_v1_service_proto_goTypes = nil + file_ark_v1_service_proto_depIdxs = nil +} diff --git a/asp/api-spec/protobuf/gen/ark/v1/service.pb.gw.go b/asp/api-spec/protobuf/gen/ark/v1/service.pb.gw.go new file mode 100644 index 000000000..c97216a51 --- /dev/null +++ b/asp/api-spec/protobuf/gen/ark/v1/service.pb.gw.go @@ -0,0 +1,509 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ark/v1/service.proto + +/* +Package arkv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package arkv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_ArkService_RegisterPayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterPaymentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RegisterPayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_RegisterPayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterPaymentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RegisterPayment(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_ClaimPayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClaimPaymentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ClaimPayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_ClaimPayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClaimPaymentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ClaimPayment(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_FinalizePayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq FinalizePaymentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.FinalizePayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_FinalizePayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq FinalizePaymentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.FinalizePayment(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_ListRounds_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRoundsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListRounds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_ListRounds_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRoundsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListRounds(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_GetRound_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRoundRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["txid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "txid") + } + + protoReq.Txid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "txid", err) + } + + msg, err := client.GetRound(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_GetRound_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRoundRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["txid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "txid") + } + + protoReq.Txid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "txid", err) + } + + msg, err := server.GetRound(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterArkServiceHandlerServer registers the http handlers for service ArkService to "mux". +// UnaryRPC :call ArkServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterArkServiceHandlerFromEndpoint instead. +func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArkServiceServer) error { + + mux.Handle("POST", pattern_ArkService_RegisterPayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/RegisterPayment", runtime.WithHTTPPathPattern("/v1/payment/register")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_RegisterPayment_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_RegisterPayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_ClaimPayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/ClaimPayment", runtime.WithHTTPPathPattern("/v1/payment/claim")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_ClaimPayment_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_ClaimPayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_FinalizePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/FinalizePayment", runtime.WithHTTPPathPattern("/v1/payment/finalize")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_FinalizePayment_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_FinalizePayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_ListRounds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/ListRounds", runtime.WithHTTPPathPattern("/v1/rounds")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_ListRounds_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_ListRounds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_GetRound_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/GetRound", runtime.WithHTTPPathPattern("/v1/round/{txid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_GetRound_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_GetRound_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterArkServiceHandlerFromEndpoint is same as RegisterArkServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterArkServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterArkServiceHandler(ctx, mux, conn) +} + +// RegisterArkServiceHandler registers the http handlers for service ArkService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterArkServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterArkServiceHandlerClient(ctx, mux, NewArkServiceClient(conn)) +} + +// RegisterArkServiceHandlerClient registers the http handlers for service ArkService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ArkServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ArkServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ArkServiceClient" to call the correct interceptors. +func RegisterArkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArkServiceClient) error { + + mux.Handle("POST", pattern_ArkService_RegisterPayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/RegisterPayment", runtime.WithHTTPPathPattern("/v1/payment/register")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_RegisterPayment_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_RegisterPayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_ClaimPayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/ClaimPayment", runtime.WithHTTPPathPattern("/v1/payment/claim")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_ClaimPayment_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_ClaimPayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_FinalizePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/FinalizePayment", runtime.WithHTTPPathPattern("/v1/payment/finalize")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_FinalizePayment_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_FinalizePayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_ListRounds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/ListRounds", runtime.WithHTTPPathPattern("/v1/rounds")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_ListRounds_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_ListRounds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_GetRound_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/GetRound", runtime.WithHTTPPathPattern("/v1/round/{txid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_GetRound_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArkService_GetRound_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ArkService_RegisterPayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "register"}, "")) + + pattern_ArkService_ClaimPayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "claim"}, "")) + + pattern_ArkService_FinalizePayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "finalize"}, "")) + + pattern_ArkService_ListRounds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "rounds"}, "")) + + pattern_ArkService_GetRound_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "round", "txid"}, "")) +) + +var ( + forward_ArkService_RegisterPayment_0 = runtime.ForwardResponseMessage + + forward_ArkService_ClaimPayment_0 = runtime.ForwardResponseMessage + + forward_ArkService_FinalizePayment_0 = runtime.ForwardResponseMessage + + forward_ArkService_ListRounds_0 = runtime.ForwardResponseMessage + + forward_ArkService_GetRound_0 = runtime.ForwardResponseMessage +) diff --git a/asp/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go b/asp/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go new file mode 100644 index 000000000..e89481937 --- /dev/null +++ b/asp/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go @@ -0,0 +1,243 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package arkv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ArkServiceClient is the client API for ArkService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ArkServiceClient interface { + RegisterPayment(ctx context.Context, in *RegisterPaymentRequest, opts ...grpc.CallOption) (*RegisterPaymentResponse, error) + ClaimPayment(ctx context.Context, in *ClaimPaymentRequest, opts ...grpc.CallOption) (*ClaimPaymentResponse, error) + FinalizePayment(ctx context.Context, in *FinalizePaymentRequest, opts ...grpc.CallOption) (*FinalizePaymentResponse, error) + ListRounds(ctx context.Context, in *ListRoundsRequest, opts ...grpc.CallOption) (*ListRoundsResponse, error) + GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error) +} + +type arkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewArkServiceClient(cc grpc.ClientConnInterface) ArkServiceClient { + return &arkServiceClient{cc} +} + +func (c *arkServiceClient) RegisterPayment(ctx context.Context, in *RegisterPaymentRequest, opts ...grpc.CallOption) (*RegisterPaymentResponse, error) { + out := new(RegisterPaymentResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/RegisterPayment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arkServiceClient) ClaimPayment(ctx context.Context, in *ClaimPaymentRequest, opts ...grpc.CallOption) (*ClaimPaymentResponse, error) { + out := new(ClaimPaymentResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/ClaimPayment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arkServiceClient) FinalizePayment(ctx context.Context, in *FinalizePaymentRequest, opts ...grpc.CallOption) (*FinalizePaymentResponse, error) { + out := new(FinalizePaymentResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/FinalizePayment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arkServiceClient) ListRounds(ctx context.Context, in *ListRoundsRequest, opts ...grpc.CallOption) (*ListRoundsResponse, error) { + out := new(ListRoundsResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/ListRounds", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arkServiceClient) GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error) { + out := new(GetRoundResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetRound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ArkServiceServer is the server API for ArkService service. +// All implementations should embed UnimplementedArkServiceServer +// for forward compatibility +type ArkServiceServer interface { + RegisterPayment(context.Context, *RegisterPaymentRequest) (*RegisterPaymentResponse, error) + ClaimPayment(context.Context, *ClaimPaymentRequest) (*ClaimPaymentResponse, error) + FinalizePayment(context.Context, *FinalizePaymentRequest) (*FinalizePaymentResponse, error) + ListRounds(context.Context, *ListRoundsRequest) (*ListRoundsResponse, error) + GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) +} + +// UnimplementedArkServiceServer should be embedded to have forward compatible implementations. +type UnimplementedArkServiceServer struct { +} + +func (UnimplementedArkServiceServer) RegisterPayment(context.Context, *RegisterPaymentRequest) (*RegisterPaymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterPayment not implemented") +} +func (UnimplementedArkServiceServer) ClaimPayment(context.Context, *ClaimPaymentRequest) (*ClaimPaymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimPayment not implemented") +} +func (UnimplementedArkServiceServer) FinalizePayment(context.Context, *FinalizePaymentRequest) (*FinalizePaymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizePayment not implemented") +} +func (UnimplementedArkServiceServer) ListRounds(context.Context, *ListRoundsRequest) (*ListRoundsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRounds not implemented") +} +func (UnimplementedArkServiceServer) GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRound not implemented") +} + +// UnsafeArkServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ArkServiceServer will +// result in compilation errors. +type UnsafeArkServiceServer interface { + mustEmbedUnimplementedArkServiceServer() +} + +func RegisterArkServiceServer(s grpc.ServiceRegistrar, srv ArkServiceServer) { + s.RegisterService(&ArkService_ServiceDesc, srv) +} + +func _ArkService_RegisterPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterPaymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).RegisterPayment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/RegisterPayment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).RegisterPayment(ctx, req.(*RegisterPaymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArkService_ClaimPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClaimPaymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).ClaimPayment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/ClaimPayment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).ClaimPayment(ctx, req.(*ClaimPaymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArkService_FinalizePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinalizePaymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).FinalizePayment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/FinalizePayment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).FinalizePayment(ctx, req.(*FinalizePaymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArkService_ListRounds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRoundsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).ListRounds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/ListRounds", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).ListRounds(ctx, req.(*ListRoundsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArkService_GetRound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRoundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).GetRound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/GetRound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).GetRound(ctx, req.(*GetRoundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ArkService_ServiceDesc is the grpc.ServiceDesc for ArkService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ArkService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ark.v1.ArkService", + HandlerType: (*ArkServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterPayment", + Handler: _ArkService_RegisterPayment_Handler, + }, + { + MethodName: "ClaimPayment", + Handler: _ArkService_ClaimPayment_Handler, + }, + { + MethodName: "FinalizePayment", + Handler: _ArkService_FinalizePayment_Handler, + }, + { + MethodName: "ListRounds", + Handler: _ArkService_ListRounds_Handler, + }, + { + MethodName: "GetRound", + Handler: _ArkService_GetRound_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ark/v1/service.proto", +} diff --git a/api-spec/protobuf/gen/ocean/v1/account.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/account.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/account.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/account.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/account_grpc.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/account_grpc.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/account_grpc.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/account_grpc.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/notification.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/notification.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/notification.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/notification.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/notification_grpc.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/notification_grpc.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/notification_grpc.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/notification_grpc.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/transaction.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/transaction.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/transaction.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/transaction.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/transaction_grpc.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/transaction_grpc.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/transaction_grpc.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/transaction_grpc.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/types.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/types.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/types.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/types.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/wallet.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/wallet.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/wallet.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/wallet.pb.go diff --git a/api-spec/protobuf/gen/ocean/v1/wallet_grpc.pb.go b/asp/api-spec/protobuf/gen/ocean/v1/wallet_grpc.pb.go similarity index 100% rename from api-spec/protobuf/gen/ocean/v1/wallet_grpc.pb.go rename to asp/api-spec/protobuf/gen/ocean/v1/wallet_grpc.pb.go diff --git a/buf.gen.yaml b/asp/buf.gen.yaml similarity index 100% rename from buf.gen.yaml rename to asp/buf.gen.yaml diff --git a/buf.work.yaml b/asp/buf.work.yaml similarity index 100% rename from buf.work.yaml rename to asp/buf.work.yaml diff --git a/cmd/coordinatord/main.go b/asp/cmd/arkd/main.go similarity index 100% rename from cmd/coordinatord/main.go rename to asp/cmd/arkd/main.go diff --git a/go.mod b/asp/go.mod similarity index 81% rename from go.mod rename to asp/go.mod index 07d7d6801..40cb113a8 100644 --- a/go.mod +++ b/asp/go.mod @@ -2,26 +2,29 @@ module github.com/ark-network/ark go 1.21.0 -replace github.com/ark-network/ark/common => ./pkg/common +replace github.com/ark-network/ark/common => ../common require ( github.com/ark-network/ark/common v0.0.0-00010101000000-000000000000 - github.com/btcsuite/btcd/btcec/v2 v2.2.0 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/go-co-op/gocron v1.36.0 github.com/google/uuid v1.4.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.4 - github.com/urfave/cli/v2 v2.25.7 github.com/vulpemventures/go-elements v0.4.7 - golang.org/x/crypto v0.14.0 - golang.org/x/term v0.13.0 + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 ) -require github.com/robfig/cron/v3 v3.0.1 // indirect +require ( + github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/robfig/cron/v3 v3.0.1 // indirect + golang.org/x/crypto v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect +) require ( github.com/btcsuite/btcd v0.23.1 // indirect @@ -29,18 +32,15 @@ require ( github.com/btcsuite/btcd/btcutil/psbt v1.1.4 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect @@ -49,7 +49,6 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941 // indirect - github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect diff --git a/go.sum b/asp/go.sum similarity index 98% rename from go.sum rename to asp/go.sum index 70ff78892..4f319fec6 100644 --- a/go.sum +++ b/asp/go.sum @@ -75,8 +75,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -170,6 +168,8 @@ github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -223,8 +223,6 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= @@ -256,16 +254,12 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= -github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941 h1:CTcw80hz/Sw8hqlKX5ZYvBUF5gAHSHwdjXxRf/cjDcI= github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941/go.mod h1:GXBJykxW2kUcktGdsgyay7uwwWvkljASfljNcT0mbh8= github.com/vulpemventures/go-elements v0.4.7 h1:M5dtBHwRXqct75DJeEv5b0PUFS93t0gh2naJaGlvp60= github.com/vulpemventures/go-elements v0.4.7/go.mod h1:aBGuWXHaiAIUIcwqCdtEh2iQ3kJjKwHU9ywvhlcRSeU= github.com/vulpemventures/go-secp256k1-zkp v1.1.6 h1:BmsrmXRLUibwa75Qkk8yELjpzCzlAjYFGLiLiOdq7Xo= github.com/vulpemventures/go-secp256k1-zkp v1.1.6/go.mod h1:zo7CpgkuPgoe7fAV+inyxsI9IhGmcoFgyD8nqZaPSOM= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -428,8 +422,6 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -556,6 +548,10 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/goreleaser.Dockerfile b/asp/goreleaser.Dockerfile similarity index 67% rename from goreleaser.Dockerfile rename to asp/goreleaser.Dockerfile index 22737f9be..753614ed9 100755 --- a/goreleaser.Dockerfile +++ b/asp/goreleaser.Dockerfile @@ -9,7 +9,7 @@ COPY . . RUN set -ex \ && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=amd64; fi \ && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=arm64; fi \ - && mv "coordinatord-linux-$TARGETPLATFORM" /usr/local/bin/coordinatord + && mv "arkd-linux-$TARGETPLATFORM" /usr/local/bin/arkd # $USER name, and data $DIR to be used in the 'final' image @@ -25,11 +25,11 @@ RUN adduser --disabled-password \ "$USER" USER $USER -# Prevents 'VOLUME $DIR/.coordinatord/' being created as owned by 'root' -RUN mkdir -p "$DIR/.coordinatord/" +# Prevents 'VOLUME $DIR/.arkd/' being created as owned by 'root' +RUN mkdir -p "$DIR/.arkd/" -# Expose volume containing all coordinatord data -VOLUME $DIR/.coordinatord/ +# Expose volume containing all arkd data +VOLUME $DIR/.arkd/ -ENTRYPOINT [ "coordinatord" ] +ENTRYPOINT [ "arkd" ] \ No newline at end of file diff --git a/internal/config/config.go b/asp/internal/config/config.go similarity index 92% rename from internal/config/config.go rename to asp/internal/config/config.go index 4a7067d5e..ffe7d1faf 100644 --- a/internal/config/config.go +++ b/asp/internal/config/config.go @@ -18,12 +18,12 @@ var ( WalletAddr = "WALLET_ADDR" RoundInterval = "ROUND_INTERVAL" - defaultDatadir = common.AppDataDir("coordinatord", false) + defaultDatadir = common.AppDataDir("arkd", false) defaultRoundInterval = 60 ) func LoadConfig() (*Config, error) { - viper.SetEnvPrefix("ARK_COORDINATOR") + viper.SetEnvPrefix("ARK") viper.AutomaticEnv() viper.SetDefault(Datadir, defaultDatadir) diff --git a/internal/core/application/service.go b/asp/internal/core/application/service.go similarity index 100% rename from internal/core/application/service.go rename to asp/internal/core/application/service.go diff --git a/internal/core/application/utils.go b/asp/internal/core/application/utils.go similarity index 100% rename from internal/core/application/utils.go rename to asp/internal/core/application/utils.go diff --git a/internal/core/domain/events.go b/asp/internal/core/domain/events.go similarity index 100% rename from internal/core/domain/events.go rename to asp/internal/core/domain/events.go diff --git a/internal/core/domain/payment.go b/asp/internal/core/domain/payment.go similarity index 100% rename from internal/core/domain/payment.go rename to asp/internal/core/domain/payment.go diff --git a/internal/core/domain/round.go b/asp/internal/core/domain/round.go similarity index 100% rename from internal/core/domain/round.go rename to asp/internal/core/domain/round.go diff --git a/internal/core/domain/round_repo.go b/asp/internal/core/domain/round_repo.go similarity index 100% rename from internal/core/domain/round_repo.go rename to asp/internal/core/domain/round_repo.go diff --git a/internal/core/ports/repo_manager.go b/asp/internal/core/ports/repo_manager.go similarity index 100% rename from internal/core/ports/repo_manager.go rename to asp/internal/core/ports/repo_manager.go diff --git a/internal/core/ports/scheduler.go b/asp/internal/core/ports/scheduler.go similarity index 100% rename from internal/core/ports/scheduler.go rename to asp/internal/core/ports/scheduler.go diff --git a/internal/core/ports/tx_builder.go b/asp/internal/core/ports/tx_builder.go similarity index 100% rename from internal/core/ports/tx_builder.go rename to asp/internal/core/ports/tx_builder.go diff --git a/internal/core/ports/wallet.go b/asp/internal/core/ports/wallet.go similarity index 100% rename from internal/core/ports/wallet.go rename to asp/internal/core/ports/wallet.go diff --git a/internal/infrastructure/ocean-wallet/account.go b/asp/internal/infrastructure/ocean-wallet/account.go similarity index 100% rename from internal/infrastructure/ocean-wallet/account.go rename to asp/internal/infrastructure/ocean-wallet/account.go diff --git a/internal/infrastructure/ocean-wallet/notify.go b/asp/internal/infrastructure/ocean-wallet/notify.go similarity index 100% rename from internal/infrastructure/ocean-wallet/notify.go rename to asp/internal/infrastructure/ocean-wallet/notify.go diff --git a/internal/infrastructure/ocean-wallet/service.go b/asp/internal/infrastructure/ocean-wallet/service.go similarity index 100% rename from internal/infrastructure/ocean-wallet/service.go rename to asp/internal/infrastructure/ocean-wallet/service.go diff --git a/internal/infrastructure/ocean-wallet/transaction.go b/asp/internal/infrastructure/ocean-wallet/transaction.go similarity index 100% rename from internal/infrastructure/ocean-wallet/transaction.go rename to asp/internal/infrastructure/ocean-wallet/transaction.go diff --git a/internal/infrastructure/ocean-wallet/wallet.go b/asp/internal/infrastructure/ocean-wallet/wallet.go similarity index 100% rename from internal/infrastructure/ocean-wallet/wallet.go rename to asp/internal/infrastructure/ocean-wallet/wallet.go diff --git a/internal/infrastructure/scheduler/gocron/service.go b/asp/internal/infrastructure/scheduler/gocron/service.go similarity index 100% rename from internal/infrastructure/scheduler/gocron/service.go rename to asp/internal/infrastructure/scheduler/gocron/service.go diff --git a/internal/infrastructure/tx-builder/dummy/builder.go b/asp/internal/infrastructure/tx-builder/dummy/builder.go similarity index 100% rename from internal/infrastructure/tx-builder/dummy/builder.go rename to asp/internal/infrastructure/tx-builder/dummy/builder.go diff --git a/internal/infrastructure/tx-builder/dummy/builder_test.go b/asp/internal/infrastructure/tx-builder/dummy/builder_test.go similarity index 100% rename from internal/infrastructure/tx-builder/dummy/builder_test.go rename to asp/internal/infrastructure/tx-builder/dummy/builder_test.go diff --git a/internal/infrastructure/tx-builder/dummy/connectors.go b/asp/internal/infrastructure/tx-builder/dummy/connectors.go similarity index 100% rename from internal/infrastructure/tx-builder/dummy/connectors.go rename to asp/internal/infrastructure/tx-builder/dummy/connectors.go diff --git a/internal/infrastructure/tx-builder/dummy/forfeit.go b/asp/internal/infrastructure/tx-builder/dummy/forfeit.go similarity index 100% rename from internal/infrastructure/tx-builder/dummy/forfeit.go rename to asp/internal/infrastructure/tx-builder/dummy/forfeit.go diff --git a/internal/infrastructure/tx-builder/dummy/tree.go b/asp/internal/infrastructure/tx-builder/dummy/tree.go similarity index 100% rename from internal/infrastructure/tx-builder/dummy/tree.go rename to asp/internal/infrastructure/tx-builder/dummy/tree.go diff --git a/internal/interface/grpc/interceptors/.gitkeep b/asp/internal/interface/grpc/handlers/.gitkeep similarity index 100% rename from internal/interface/grpc/interceptors/.gitkeep rename to asp/internal/interface/grpc/handlers/.gitkeep diff --git a/internal/interface/grpc/permissions/.gitkeep b/asp/internal/interface/grpc/interceptors/.gitkeep similarity index 100% rename from internal/interface/grpc/permissions/.gitkeep rename to asp/internal/interface/grpc/interceptors/.gitkeep diff --git a/internal/test/.gitkeep b/asp/internal/interface/grpc/permissions/.gitkeep similarity index 100% rename from internal/test/.gitkeep rename to asp/internal/interface/grpc/permissions/.gitkeep diff --git a/internal/interface/grpc/service.go b/asp/internal/interface/grpc/service.go similarity index 100% rename from internal/interface/grpc/service.go rename to asp/internal/interface/grpc/service.go diff --git a/internal/interface/service.go b/asp/internal/interface/service.go similarity index 100% rename from internal/interface/service.go rename to asp/internal/interface/service.go diff --git a/asp/internal/test/.gitkeep b/asp/internal/test/.gitkeep new file mode 100755 index 000000000..e69de29bb diff --git a/asp/pkg/.gitkeep b/asp/pkg/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/scripts/build b/asp/scripts/build similarity index 63% rename from scripts/build rename to asp/scripts/build index 00d126a32..c9b0b0284 100755 --- a/scripts/build +++ b/asp/scripts/build @@ -13,6 +13,6 @@ ARCH=$(eval "go env GOARCH") pushd $PARENT_PATH mkdir -p build -GO111MODULE=on go build -ldflags="-s -w" -o build/coordinatord-$OS-$ARCH cmd/coordinatord/main.go +GO111MODULE=on go build -ldflags="-s -w" -o build/arkd-$OS-$ARCH cmd/arkd/main.go popd \ No newline at end of file diff --git a/scripts/build-noah b/asp/scripts/build-noah similarity index 100% rename from scripts/build-noah rename to asp/scripts/build-noah diff --git a/pkg/common/appdata.go b/common/appdata.go similarity index 100% rename from pkg/common/appdata.go rename to common/appdata.go diff --git a/pkg/common/bip68.go b/common/bip68.go similarity index 100% rename from pkg/common/bip68.go rename to common/bip68.go diff --git a/pkg/common/bip68_test.go b/common/bip68_test.go similarity index 100% rename from pkg/common/bip68_test.go rename to common/bip68_test.go diff --git a/pkg/common/encoding.go b/common/encoding.go similarity index 100% rename from pkg/common/encoding.go rename to common/encoding.go diff --git a/pkg/common/encoding_test.go b/common/encoding_test.go similarity index 100% rename from pkg/common/encoding_test.go rename to common/encoding_test.go diff --git a/pkg/common/fixtures/bip68.json b/common/fixtures/bip68.json similarity index 100% rename from pkg/common/fixtures/bip68.json rename to common/fixtures/bip68.json diff --git a/pkg/common/fixtures/encoding.json b/common/fixtures/encoding.json similarity index 100% rename from pkg/common/fixtures/encoding.json rename to common/fixtures/encoding.json diff --git a/pkg/common/go.mod b/common/go.mod similarity index 100% rename from pkg/common/go.mod rename to common/go.mod diff --git a/pkg/common/go.sum b/common/go.sum similarity index 100% rename from pkg/common/go.sum rename to common/go.sum diff --git a/pkg/common/network.go b/common/network.go similarity index 100% rename from pkg/common/network.go rename to common/network.go diff --git a/cmd/noah/balance.go b/noah/balance.go similarity index 100% rename from cmd/noah/balance.go rename to noah/balance.go diff --git a/cmd/noah/common.go b/noah/common.go similarity index 100% rename from cmd/noah/common.go rename to noah/common.go diff --git a/cmd/noah/config.go b/noah/config.go similarity index 100% rename from cmd/noah/config.go rename to noah/config.go diff --git a/cmd/noah/cypher.go b/noah/cypher.go similarity index 100% rename from cmd/noah/cypher.go rename to noah/cypher.go diff --git a/noah/go.mod b/noah/go.mod new file mode 100644 index 000000000..82adacd2d --- /dev/null +++ b/noah/go.mod @@ -0,0 +1,22 @@ +module github.com/ark-network/noah + +go 1.21.0 + +replace github.com/ark-network/ark/common => ../common + +require ( + github.com/ark-network/ark/common v0.0.0-00010101000000-000000000000 + github.com/btcsuite/btcd/btcec/v2 v2.3.2 + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 + github.com/urfave/cli/v2 v2.25.7 + golang.org/x/crypto v0.15.0 + golang.org/x/term v0.14.0 +) + +require ( + github.com/btcsuite/btcd/btcutil v1.1.3 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + golang.org/x/sys v0.14.0 // indirect +) diff --git a/noah/go.sum b/noah/go.sum new file mode 100644 index 000000000..755b6d17b --- /dev/null +++ b/noah/go.sum @@ -0,0 +1,119 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= +github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= +github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/cmd/noah/init.go b/noah/init.go similarity index 100% rename from cmd/noah/init.go rename to noah/init.go diff --git a/cmd/noah/main.go b/noah/main.go similarity index 100% rename from cmd/noah/main.go rename to noah/main.go diff --git a/cmd/noah/receive.go b/noah/receive.go similarity index 100% rename from cmd/noah/receive.go rename to noah/receive.go diff --git a/cmd/noah/redeem.go b/noah/redeem.go similarity index 100% rename from cmd/noah/redeem.go rename to noah/redeem.go diff --git a/cmd/noah/send.go b/noah/send.go similarity index 100% rename from cmd/noah/send.go rename to noah/send.go