├── .chglog
├── CHANGELOG.tpl.md
└── config.yaml
├── .env
├── .envrc
├── .github
├── CODEOWNERS
├── labeler.yaml
└── workflows
│ ├── breakage.yaml
│ ├── labeler.yaml
│ ├── lint-shell.yaml
│ ├── lint.yaml
│ ├── release-ts.yaml
│ ├── release.yaml
│ └── tests.yaml
├── .gitignore
├── .golangci.yaml
├── .mockery.yaml
├── LICENSE
├── Makefile
├── README.md
├── buf.gen.gogo.yaml
├── buf.gen.pulsar.yaml
├── buf.gen.swagger.yaml
├── buf.work.yaml
├── changelog.md
├── codecov.yml
├── docs
├── config.yaml
├── proto
│ ├── node.md
│ └── provider.md
├── protodoc-markdown.tmpl
└── swagger-ui
│ └── swagger.yaml
├── go.mod
├── go.sum
├── go
├── grpc
│ └── gogoreflection
│ │ ├── doc.go
│ │ ├── fix_registration.go
│ │ ├── fix_registration_test.go
│ │ └── serverreflection.go
├── inventory
│ └── v1
│ │ ├── cluster.go
│ │ ├── cluster.pb.go
│ │ ├── cpu.go
│ │ ├── cpu.pb.go
│ │ ├── gpu.go
│ │ ├── gpu.pb.go
│ │ ├── memory.go
│ │ ├── memory.pb.go
│ │ ├── metrics.go
│ │ ├── node.go
│ │ ├── node.pb.go
│ │ ├── resourcepair.go
│ │ ├── resourcepair.pb.go
│ │ ├── resources.go
│ │ ├── resources.pb.go
│ │ ├── service.pb.go
│ │ ├── service.pb.gw.go
│ │ ├── storage.go
│ │ ├── storage.pb.go
│ │ └── types.go
├── manifest
│ ├── v2beta1
│ │ ├── group.go
│ │ ├── group.pb.go
│ │ ├── httpoptions.pb.go
│ │ ├── manifest.go
│ │ ├── manifest_cross_validation_test.go
│ │ ├── manifest_test.go
│ │ ├── manifest_validation_errors.go
│ │ ├── parse.go
│ │ ├── service.go
│ │ ├── service.pb.go
│ │ └── serviceexpose.pb.go
│ └── v2beta2
│ │ ├── errors.go
│ │ ├── group.go
│ │ ├── group.pb.go
│ │ ├── groups.go
│ │ ├── helpers.go
│ │ ├── httpoptions.pb.go
│ │ ├── manifest.go
│ │ ├── manifest_cross_validation_test.go
│ │ ├── manifest_test.go
│ │ ├── parse.go
│ │ ├── service.go
│ │ ├── service.pb.go
│ │ ├── service_expose_test.go
│ │ ├── serviceexpose.go
│ │ ├── serviceexpose.pb.go
│ │ ├── serviceexposes.go
│ │ └── services.go
├── node
│ ├── audit
│ │ ├── v1beta1
│ │ │ ├── audit.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── event.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ │ ├── v1beta2
│ │ │ ├── audit.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── event.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ │ └── v1beta3
│ │ │ ├── audit.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── event.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ ├── cert
│ │ ├── v1beta1
│ │ │ ├── cert.go
│ │ │ ├── cert.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── genesis.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ │ ├── v1beta2
│ │ │ ├── cert.go
│ │ │ ├── cert.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── genesis.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ │ └── v1beta3
│ │ │ ├── cert.go
│ │ │ ├── cert.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── genesis.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── types.go
│ │ │ └── utils
│ │ │ ├── constants.go
│ │ │ ├── key_pair_manager.go
│ │ │ └── utils.go
│ ├── client
│ │ ├── akash.pb.go
│ │ ├── client.go
│ │ ├── client_info.pb.go
│ │ ├── types
│ │ │ └── options.go
│ │ ├── v1beta1
│ │ │ ├── client.go
│ │ │ └── mocks
│ │ │ │ ├── client.go
│ │ │ │ ├── node.go
│ │ │ │ ├── query.go
│ │ │ │ └── tx.go
│ │ └── v1beta2
│ │ │ ├── client.go
│ │ │ ├── errors.go
│ │ │ ├── mocks
│ │ │ ├── client.go
│ │ │ ├── node_client.go
│ │ │ ├── query_client.go
│ │ │ └── tx_client.go
│ │ │ ├── node.go
│ │ │ ├── options.go
│ │ │ ├── query.go
│ │ │ └── tx.go
│ ├── deployment
│ │ ├── v1beta1
│ │ │ ├── authz.pb.go
│ │ │ ├── codec.go
│ │ │ ├── deployment.pb.go
│ │ │ ├── deployment_validation_test.go
│ │ │ ├── deposit_deployment_authorization.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── group.pb.go
│ │ │ ├── group_pricing_validation.go
│ │ │ ├── group_validation.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── msgs_test.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── resource_list_validation.go
│ │ │ ├── types.go
│ │ │ ├── types_test.go
│ │ │ └── validation_config.go
│ │ ├── v1beta2
│ │ │ ├── authz.pb.go
│ │ │ ├── codec.go
│ │ │ ├── deployment.pb.go
│ │ │ ├── deploymentmsg.pb.go
│ │ │ ├── deposit_deployment_authorization.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── group.pb.go
│ │ │ ├── group_pricing_validation.go
│ │ │ ├── group_validation.go
│ │ │ ├── groupid.pb.go
│ │ │ ├── groupmsg.pb.go
│ │ │ ├── groupspec.go
│ │ │ ├── groupspec.pb.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── migrate
│ │ │ │ └── v1beta1.go
│ │ │ ├── msgs.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── resource.pb.go
│ │ │ ├── resource_list_validation.go
│ │ │ ├── service.pb.go
│ │ │ ├── types.go
│ │ │ └── validation_config.go
│ │ └── v1beta3
│ │ │ ├── authz.pb.go
│ │ │ ├── codec.go
│ │ │ ├── deployment.pb.go
│ │ │ ├── deployment_validation_test.go
│ │ │ ├── deploymentmsg.pb.go
│ │ │ ├── deposit_deployment_authorization.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── group.pb.go
│ │ │ ├── group_validation.go
│ │ │ ├── groupid.pb.go
│ │ │ ├── groupmsg.pb.go
│ │ │ ├── groupspec.go
│ │ │ ├── groupspec.pb.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── migrate
│ │ │ └── v1beta2.go
│ │ │ ├── msgs.go
│ │ │ ├── msgs_test.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── resource_list_validation.go
│ │ │ ├── resource_list_validation_test.go
│ │ │ ├── resourcelimits.go
│ │ │ ├── resourceunit.go
│ │ │ ├── resourceunit.pb.go
│ │ │ ├── resourceunits.go
│ │ │ ├── service.pb.go
│ │ │ ├── types.go
│ │ │ ├── types_test.go
│ │ │ └── validation_config.go
│ ├── escrow
│ │ ├── v1beta1
│ │ │ ├── codec.go
│ │ │ ├── error.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── types.pb.go
│ │ │ └── validate.go
│ │ ├── v1beta2
│ │ │ ├── codec.go
│ │ │ ├── error.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── types.pb.go
│ │ │ └── validate.go
│ │ └── v1beta3
│ │ │ ├── account.go
│ │ │ ├── codec.go
│ │ │ ├── error.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── types.pb.go
│ │ │ └── validate.go
│ ├── gov
│ │ └── v1beta3
│ │ │ ├── codec.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── params.go
│ │ │ └── params.pb.go
│ ├── inflation
│ │ ├── types
│ │ │ └── v1beta2
│ │ │ │ ├── genesis.pb.go
│ │ │ │ └── params.pb.go
│ │ ├── v1beta2
│ │ │ ├── errors.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── inflation_calculator.go
│ │ │ ├── inflation_calculator_test.go
│ │ │ ├── key.go
│ │ │ ├── params.go
│ │ │ └── params.pb.go
│ │ └── v1beta3
│ │ │ ├── errors.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── inflation_calculator.go
│ │ │ ├── inflation_calculator_test.go
│ │ │ ├── key.go
│ │ │ ├── params.go
│ │ │ └── params.pb.go
│ ├── market
│ │ ├── v1beta1
│ │ │ ├── bid.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── lease.pb.go
│ │ │ ├── msgs.go
│ │ │ ├── order.pb.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── service.pb.go
│ │ │ └── types.go
│ │ ├── v1beta2
│ │ │ ├── bid.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── lease.pb.go
│ │ │ ├── migrate
│ │ │ │ └── v1beta1.go
│ │ │ ├── msgs.go
│ │ │ ├── order.pb.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── service.pb.go
│ │ │ └── types.go
│ │ ├── v1beta3
│ │ │ ├── bid.pb.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── lease.pb.go
│ │ │ ├── migrate
│ │ │ │ └── v1beta2.go
│ │ │ ├── msgs.go
│ │ │ ├── order.pb.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── service.pb.go
│ │ │ └── types.go
│ │ └── v1beta4
│ │ │ ├── bid.go
│ │ │ ├── bid.pb.go
│ │ │ ├── bid_test.go
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── escrow.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── id.go
│ │ │ ├── key.go
│ │ │ ├── lease.pb.go
│ │ │ ├── migrate
│ │ │ └── v1beta3.go
│ │ │ ├── msgs.go
│ │ │ ├── order.pb.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ ├── service.pb.go
│ │ │ └── types.go
│ ├── provider
│ │ ├── v1beta1
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── msgs_test.go
│ │ │ ├── provider.pb.go
│ │ │ └── types.go
│ │ ├── v1beta2
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── event.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── provider.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ │ └── v1beta3
│ │ │ ├── codec.go
│ │ │ ├── errors.go
│ │ │ ├── event.go
│ │ │ ├── events_test.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── msgs.go
│ │ │ ├── msgs_test.go
│ │ │ ├── provider.pb.go
│ │ │ ├── query.pb.go
│ │ │ ├── query.pb.gw.go
│ │ │ └── types.go
│ ├── staking
│ │ └── v1beta3
│ │ │ ├── codec.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── params.go
│ │ │ └── params.pb.go
│ ├── take
│ │ └── v1beta3
│ │ │ ├── codec.go
│ │ │ ├── denom_take_rate.go
│ │ │ ├── errors.go
│ │ │ ├── genesis.pb.go
│ │ │ ├── key.go
│ │ │ ├── params.go
│ │ │ ├── params.pb.go
│ │ │ └── query.pb.go
│ └── types
│ │ ├── constants
│ │ └── constants.go
│ │ ├── unit
│ │ └── unit.go
│ │ ├── v1beta1
│ │ ├── attribute.go
│ │ ├── attribute.pb.go
│ │ ├── attribute_test.go
│ │ ├── endpoint.pb.go
│ │ ├── requirements.go
│ │ ├── resource.go
│ │ ├── resource.pb.go
│ │ ├── resourcevalue.go
│ │ ├── resourcevalue.pb.go
│ │ └── resourcevalue_test.go
│ │ ├── v1beta2
│ │ ├── attribute.go
│ │ ├── attribute.pb.go
│ │ ├── endpoint.go
│ │ ├── endpoint.pb.go
│ │ ├── migrate
│ │ │ └── v1beta1.go
│ │ ├── requirements.go
│ │ ├── resource.go
│ │ ├── resource.pb.go
│ │ ├── resourceunits.pb.go
│ │ ├── resourcevalue.go
│ │ └── resourcevalue.pb.go
│ │ └── v1beta3
│ │ ├── attribute.go
│ │ ├── attribute.pb.go
│ │ ├── attribute_test.go
│ │ ├── cpu.pb.go
│ │ ├── endpoint.go
│ │ ├── endpoint.pb.go
│ │ ├── gpu.pb.go
│ │ ├── memory.pb.go
│ │ ├── migrate
│ │ └── v1beta2.go
│ │ ├── requirements.go
│ │ ├── resources.go
│ │ ├── resources.pb.go
│ │ ├── resources_test.go
│ │ ├── resourcevalue.go
│ │ ├── resourcevalue.pb.go
│ │ └── storage.pb.go
├── provider
│ ├── client
│ │ ├── client.go
│ │ ├── client_shell.go
│ │ ├── client_shell_test.go
│ │ ├── constants.go
│ │ ├── options.go
│ │ ├── path.go
│ │ └── types.go
│ ├── lease
│ │ └── v1
│ │ │ └── service.pb.go
│ └── v1
│ │ ├── metrics.go
│ │ ├── service.pb.go
│ │ ├── service.pb.gw.go
│ │ ├── status.go
│ │ └── status.pb.go
├── sdkutil
│ ├── address.go
│ ├── config.go
│ ├── event.go
│ └── init.go
├── testutil
│ ├── base.go
│ ├── cert.go
│ ├── channel_wait.go
│ ├── deployment.go
│ ├── ids.go
│ ├── log.go
│ ├── sdk.go
│ ├── types.go
│ ├── v1beta1
│ │ ├── base.go
│ │ ├── deployment.go
│ │ ├── event.go
│ │ ├── ids.go
│ │ ├── provider.go
│ │ └── types.go
│ ├── v1beta2
│ │ ├── base.go
│ │ ├── deployment.go
│ │ ├── event.go
│ │ ├── ids.go
│ │ ├── provider.go
│ │ └── types.go
│ └── v1beta3
│ │ ├── base.go
│ │ ├── deployment.go
│ │ ├── event.go
│ │ ├── ids.go
│ │ ├── provider.go
│ │ └── types.go
└── util
│ ├── ctxlog
│ ├── ctxlog.go
│ └── ctxlog_test.go
│ ├── jwt
│ ├── es256k.go
│ ├── es256k_test.go
│ ├── jwt.go
│ ├── jwt_test.go
│ ├── schema.go
│ └── suite_test.go
│ ├── tls
│ └── verify.go
│ ├── units
│ ├── units.go
│ └── units_test.go
│ └── wsutil
│ ├── wsutil.go
│ └── wsutil_test.go
├── make
├── code-style.mk
├── codegen.mk
├── lint.mk
├── mod.mk
├── release-ts.mk
├── setup-cache.mk
└── test.mk
├── proto
├── node
│ ├── akash
│ │ ├── audit
│ │ │ ├── v1beta1
│ │ │ │ └── audit.proto
│ │ │ ├── v1beta2
│ │ │ │ ├── audit.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ └── query.proto
│ │ │ └── v1beta3
│ │ │ │ ├── audit.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ └── query.proto
│ │ ├── base
│ │ │ ├── v1beta1
│ │ │ │ ├── attribute.proto
│ │ │ │ ├── endpoint.proto
│ │ │ │ ├── resource.proto
│ │ │ │ └── resourcevalue.proto
│ │ │ ├── v1beta2
│ │ │ │ ├── attribute.proto
│ │ │ │ ├── endpoint.proto
│ │ │ │ ├── resource.proto
│ │ │ │ ├── resourceunits.proto
│ │ │ │ └── resourcevalue.proto
│ │ │ └── v1beta3
│ │ │ │ ├── attribute.proto
│ │ │ │ ├── cpu.proto
│ │ │ │ ├── endpoint.proto
│ │ │ │ ├── gpu.proto
│ │ │ │ ├── memory.proto
│ │ │ │ ├── resources.proto
│ │ │ │ ├── resourcevalue.proto
│ │ │ │ └── storage.proto
│ │ ├── cert
│ │ │ ├── v1beta2
│ │ │ │ ├── cert.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ └── query.proto
│ │ │ └── v1beta3
│ │ │ │ ├── cert.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ └── query.proto
│ │ ├── deployment
│ │ │ ├── v1beta1
│ │ │ │ ├── authz.proto
│ │ │ │ ├── deployment.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── group.proto
│ │ │ │ ├── params.proto
│ │ │ │ └── query.proto
│ │ │ ├── v1beta2
│ │ │ │ ├── authz.proto
│ │ │ │ ├── deployment.proto
│ │ │ │ ├── deploymentmsg.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── group.proto
│ │ │ │ ├── groupid.proto
│ │ │ │ ├── groupmsg.proto
│ │ │ │ ├── groupspec.proto
│ │ │ │ ├── params.proto
│ │ │ │ ├── query.proto
│ │ │ │ ├── resource.proto
│ │ │ │ └── service.proto
│ │ │ └── v1beta3
│ │ │ │ ├── authz.proto
│ │ │ │ ├── deployment.proto
│ │ │ │ ├── deploymentmsg.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── group.proto
│ │ │ │ ├── groupid.proto
│ │ │ │ ├── groupmsg.proto
│ │ │ │ ├── groupspec.proto
│ │ │ │ ├── params.proto
│ │ │ │ ├── query.proto
│ │ │ │ ├── resourceunit.proto
│ │ │ │ └── service.proto
│ │ ├── discovery
│ │ │ └── v1
│ │ │ │ ├── akash.proto
│ │ │ │ └── client_info.proto
│ │ ├── escrow
│ │ │ ├── v1beta1
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── query.proto
│ │ │ │ └── types.proto
│ │ │ ├── v1beta2
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── query.proto
│ │ │ │ └── types.proto
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── query.proto
│ │ │ │ └── types.proto
│ │ ├── gov
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.proto
│ │ │ │ └── params.proto
│ │ ├── inflation
│ │ │ ├── v1beta2
│ │ │ │ ├── genesis.proto
│ │ │ │ └── params.proto
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.proto
│ │ │ │ └── params.proto
│ │ ├── market
│ │ │ ├── v1beta2
│ │ │ │ ├── bid.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── lease.proto
│ │ │ │ ├── order.proto
│ │ │ │ ├── params.proto
│ │ │ │ ├── query.proto
│ │ │ │ └── service.proto
│ │ │ ├── v1beta3
│ │ │ │ ├── bid.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── lease.proto
│ │ │ │ ├── order.proto
│ │ │ │ ├── params.proto
│ │ │ │ ├── query.proto
│ │ │ │ └── service.proto
│ │ │ └── v1beta4
│ │ │ │ ├── bid.proto
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── lease.proto
│ │ │ │ ├── order.proto
│ │ │ │ ├── params.proto
│ │ │ │ ├── query.proto
│ │ │ │ └── service.proto
│ │ ├── provider
│ │ │ ├── v1beta1
│ │ │ │ └── provider.proto
│ │ │ ├── v1beta2
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── provider.proto
│ │ │ │ └── query.proto
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.proto
│ │ │ │ ├── provider.proto
│ │ │ │ └── query.proto
│ │ ├── staking
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.proto
│ │ │ │ └── params.proto
│ │ └── take
│ │ │ └── v1beta3
│ │ │ ├── genesis.proto
│ │ │ ├── params.proto
│ │ │ └── query.proto
│ ├── buf.lock
│ └── buf.yaml
└── provider
│ ├── akash
│ ├── inventory
│ │ └── v1
│ │ │ ├── cluster.proto
│ │ │ ├── cpu.proto
│ │ │ ├── gpu.proto
│ │ │ ├── memory.proto
│ │ │ ├── node.proto
│ │ │ ├── resourcepair.proto
│ │ │ ├── resources.proto
│ │ │ ├── service.proto
│ │ │ └── storage.proto
│ ├── manifest
│ │ ├── v2beta1
│ │ │ ├── group.proto
│ │ │ ├── httpoptions.proto
│ │ │ ├── service.proto
│ │ │ └── serviceexpose.proto
│ │ └── v2beta2
│ │ │ ├── group.proto
│ │ │ ├── httpoptions.proto
│ │ │ ├── service.proto
│ │ │ └── serviceexpose.proto
│ └── provider
│ │ ├── lease
│ │ └── v1
│ │ │ └── service.proto
│ │ └── v1
│ │ ├── service.proto
│ │ └── status.proto
│ ├── buf.lock
│ └── buf.yaml
├── script
├── changelog.sh
├── gofmt-staged.sh
├── grpc-probe.sh
├── protoc-gen-swagger.sh
├── protocgen-legacy.sh
├── protocgen.sh
├── release-ts.sh
├── semver.sh
├── shellcheck.sh
├── tools.sh
└── ts-patches.sh
├── specs
├── jwt-schema.json
└── specs.go
├── testdata
└── jwt
│ ├── cases_es256k.json
│ ├── cases_jwt.json.tmpl
│ ├── jwt.go
│ └── mnemonic
├── tools.go
└── ts
├── .eslintrc.json
├── .gitignore
├── .npmignore
├── .npmrc
├── .prettierrc
├── .releaserc
├── README.md
├── jest.config.js
├── package-lock.json
├── package.json
├── script
├── generate-exports.js
└── remove-exports.js
├── src
├── deprecated
│ ├── akash
│ │ ├── base
│ │ │ └── v1beta1
│ │ │ │ ├── attribute.ts
│ │ │ │ ├── endpoint.ts
│ │ │ │ ├── resource.ts
│ │ │ │ └── resourcevalue.ts
│ │ ├── cert
│ │ │ └── v1beta1
│ │ │ │ ├── cert.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ └── query.ts
│ │ ├── deployment
│ │ │ └── v1beta1
│ │ │ │ ├── authz.ts
│ │ │ │ ├── deployment.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── group.ts
│ │ │ │ ├── params.ts
│ │ │ │ └── query.ts
│ │ └── market
│ │ │ └── v1beta1
│ │ │ ├── bid.ts
│ │ │ ├── lease.ts
│ │ │ └── order.ts
│ ├── cosmos
│ │ └── base
│ │ │ ├── query
│ │ │ └── v1beta1
│ │ │ │ └── pagination.ts
│ │ │ └── v1beta1
│ │ │ └── coin.ts
│ ├── index.akash.cert.v1beta1.ts
│ ├── index.akash.market.v1beta1.ts
│ └── typeRegistry.ts
├── generated
│ ├── akash
│ │ ├── audit
│ │ │ ├── v1beta1
│ │ │ │ └── audit.ts
│ │ │ ├── v1beta2
│ │ │ │ ├── audit.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ └── query.ts
│ │ │ └── v1beta3
│ │ │ │ ├── audit.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ └── query.ts
│ │ ├── base
│ │ │ ├── v1beta1
│ │ │ │ ├── attribute.ts
│ │ │ │ ├── endpoint.ts
│ │ │ │ ├── resource.ts
│ │ │ │ └── resourcevalue.ts
│ │ │ ├── v1beta2
│ │ │ │ ├── attribute.ts
│ │ │ │ ├── endpoint.ts
│ │ │ │ ├── resource.ts
│ │ │ │ ├── resourceunits.ts
│ │ │ │ └── resourcevalue.ts
│ │ │ └── v1beta3
│ │ │ │ ├── attribute.ts
│ │ │ │ ├── cpu.ts
│ │ │ │ ├── endpoint.ts
│ │ │ │ ├── gpu.ts
│ │ │ │ ├── memory.ts
│ │ │ │ ├── resources.ts
│ │ │ │ ├── resourcevalue.ts
│ │ │ │ └── storage.ts
│ │ ├── cert
│ │ │ ├── v1beta2
│ │ │ │ ├── cert.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ └── query.ts
│ │ │ └── v1beta3
│ │ │ │ ├── cert.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ └── query.ts
│ │ ├── deployment
│ │ │ ├── v1beta1
│ │ │ │ ├── authz.ts
│ │ │ │ ├── deployment.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── group.ts
│ │ │ │ ├── params.ts
│ │ │ │ └── query.ts
│ │ │ ├── v1beta2
│ │ │ │ ├── authz.ts
│ │ │ │ ├── deployment.ts
│ │ │ │ ├── deploymentmsg.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── group.ts
│ │ │ │ ├── groupid.ts
│ │ │ │ ├── groupmsg.ts
│ │ │ │ ├── groupspec.ts
│ │ │ │ ├── params.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── resource.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ └── service.ts
│ │ │ └── v1beta3
│ │ │ │ ├── authz.ts
│ │ │ │ ├── deployment.ts
│ │ │ │ ├── deploymentmsg.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── group.ts
│ │ │ │ ├── groupid.ts
│ │ │ │ ├── groupmsg.ts
│ │ │ │ ├── groupspec.ts
│ │ │ │ ├── params.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── resourceunit.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ └── service.ts
│ │ ├── discovery
│ │ │ └── v1
│ │ │ │ ├── akash.ts
│ │ │ │ └── client_info.ts
│ │ ├── escrow
│ │ │ ├── v1beta1
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── query.ts
│ │ │ │ └── types.ts
│ │ │ ├── v1beta2
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── query.ts
│ │ │ │ └── types.ts
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── query.ts
│ │ │ │ └── types.ts
│ │ ├── gov
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.ts
│ │ │ │ └── params.ts
│ │ ├── inflation
│ │ │ ├── v1beta2
│ │ │ │ ├── genesis.ts
│ │ │ │ └── params.ts
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.ts
│ │ │ │ └── params.ts
│ │ ├── inventory
│ │ │ └── v1
│ │ │ │ ├── cluster.ts
│ │ │ │ ├── cpu.ts
│ │ │ │ ├── gpu.ts
│ │ │ │ ├── memory.ts
│ │ │ │ ├── node.ts
│ │ │ │ ├── resourcepair.ts
│ │ │ │ ├── resources.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ ├── service.ts
│ │ │ │ └── storage.ts
│ │ ├── manifest
│ │ │ ├── v2beta1
│ │ │ │ ├── group.ts
│ │ │ │ ├── httpoptions.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ ├── service.ts
│ │ │ │ └── serviceexpose.ts
│ │ │ └── v2beta2
│ │ │ │ ├── group.ts
│ │ │ │ ├── httpoptions.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ ├── service.ts
│ │ │ │ └── serviceexpose.ts
│ │ ├── market
│ │ │ ├── v1beta2
│ │ │ │ ├── bid.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── lease.ts
│ │ │ │ ├── order.ts
│ │ │ │ ├── params.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ └── service.ts
│ │ │ ├── v1beta3
│ │ │ │ ├── bid.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── lease.ts
│ │ │ │ ├── order.ts
│ │ │ │ ├── params.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ └── service.ts
│ │ │ └── v1beta4
│ │ │ │ ├── bid.ts
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── lease.ts
│ │ │ │ ├── order.ts
│ │ │ │ ├── params.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ └── service.ts
│ │ ├── provider
│ │ │ ├── lease
│ │ │ │ └── v1
│ │ │ │ │ ├── service.grpc-js.ts
│ │ │ │ │ └── service.ts
│ │ │ ├── v1
│ │ │ │ ├── service.grpc-js.ts
│ │ │ │ ├── service.ts
│ │ │ │ └── status.ts
│ │ │ ├── v1beta1
│ │ │ │ └── provider.ts
│ │ │ ├── v1beta2
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── provider.ts
│ │ │ │ └── query.ts
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.ts
│ │ │ │ ├── provider.ts
│ │ │ │ └── query.ts
│ │ ├── staking
│ │ │ └── v1beta3
│ │ │ │ ├── genesis.ts
│ │ │ │ └── params.ts
│ │ └── take
│ │ │ └── v1beta3
│ │ │ ├── genesis.ts
│ │ │ ├── params.ts
│ │ │ └── query.ts
│ ├── cosmos
│ │ └── base
│ │ │ ├── query
│ │ │ └── v1beta1
│ │ │ │ └── pagination.ts
│ │ │ └── v1beta1
│ │ │ ├── coin.original.ts
│ │ │ └── coin.ts
│ ├── cosmos_proto
│ │ └── cosmos.ts
│ ├── gogoproto
│ │ └── gogo.ts
│ ├── google
│ │ ├── api
│ │ │ ├── annotations.ts
│ │ │ └── http.ts
│ │ └── protobuf
│ │ │ ├── descriptor.ts
│ │ │ ├── empty.ts
│ │ │ └── timestamp.ts
│ ├── index.akash.audit.ts
│ ├── index.akash.audit.v1beta1.ts
│ ├── index.akash.audit.v1beta2.ts
│ ├── index.akash.audit.v1beta3.ts
│ ├── index.akash.base.ts
│ ├── index.akash.base.v1beta1.ts
│ ├── index.akash.base.v1beta2.ts
│ ├── index.akash.base.v1beta3.ts
│ ├── index.akash.cert.ts
│ ├── index.akash.cert.v1beta2.ts
│ ├── index.akash.cert.v1beta3.ts
│ ├── index.akash.deployment.ts
│ ├── index.akash.deployment.v1beta1.ts
│ ├── index.akash.deployment.v1beta2.grpc-js.ts
│ ├── index.akash.deployment.v1beta2.ts
│ ├── index.akash.deployment.v1beta3.grpc-js.ts
│ ├── index.akash.deployment.v1beta3.ts
│ ├── index.akash.discovery.ts
│ ├── index.akash.discovery.v1.ts
│ ├── index.akash.escrow.ts
│ ├── index.akash.escrow.v1beta1.ts
│ ├── index.akash.escrow.v1beta2.ts
│ ├── index.akash.escrow.v1beta3.ts
│ ├── index.akash.gov.ts
│ ├── index.akash.gov.v1beta3.ts
│ ├── index.akash.inflation.ts
│ ├── index.akash.inflation.v1beta2.ts
│ ├── index.akash.inflation.v1beta3.ts
│ ├── index.akash.inventory.ts
│ ├── index.akash.inventory.v1.grpc-js.ts
│ ├── index.akash.inventory.v1.ts
│ ├── index.akash.manifest.ts
│ ├── index.akash.manifest.v2beta1.grpc-js.ts
│ ├── index.akash.manifest.v2beta1.ts
│ ├── index.akash.manifest.v2beta2.grpc-js.ts
│ ├── index.akash.manifest.v2beta2.ts
│ ├── index.akash.market.ts
│ ├── index.akash.market.v1beta2.grpc-js.ts
│ ├── index.akash.market.v1beta2.ts
│ ├── index.akash.market.v1beta3.grpc-js.ts
│ ├── index.akash.market.v1beta3.ts
│ ├── index.akash.market.v1beta4.grpc-js.ts
│ ├── index.akash.market.v1beta4.ts
│ ├── index.akash.provider.lease.ts
│ ├── index.akash.provider.lease.v1.grpc-js.ts
│ ├── index.akash.provider.lease.v1.ts
│ ├── index.akash.provider.ts
│ ├── index.akash.provider.v1.grpc-js.ts
│ ├── index.akash.provider.v1.ts
│ ├── index.akash.provider.v1beta1.ts
│ ├── index.akash.provider.v1beta2.ts
│ ├── index.akash.provider.v1beta3.ts
│ ├── index.akash.staking.ts
│ ├── index.akash.staking.v1beta3.ts
│ ├── index.akash.take.ts
│ ├── index.akash.take.v1beta3.ts
│ ├── index.akash.ts
│ ├── index.cosmos.base.query.ts
│ ├── index.cosmos.base.query.v1beta1.ts
│ ├── index.cosmos.base.ts
│ ├── index.cosmos.base.v1beta1.ts
│ ├── index.cosmos.ts
│ ├── index.cosmos_proto.ts
│ ├── index.gogoproto.ts
│ ├── index.google.api.ts
│ ├── index.google.protobuf.ts
│ ├── index.google.ts
│ ├── index.k8s.io.apimachinery.pkg.api.resource.ts
│ ├── index.k8s.io.apimachinery.pkg.api.ts
│ ├── index.k8s.io.apimachinery.pkg.ts
│ ├── index.k8s.io.apimachinery.ts
│ ├── index.k8s.io.ts
│ ├── index.k8s.ts
│ ├── index.ts
│ ├── k8s.io
│ │ └── apimachinery
│ │ │ └── pkg
│ │ │ └── api
│ │ │ └── resource
│ │ │ └── generated.ts
│ └── typeRegistry.ts
├── index.v1beta1.ts
├── index.v1beta2.ts
├── index.v1beta3.ts
├── index.v1beta4.ts
└── patch
│ ├── cosmos
│ └── base
│ │ └── v1beta1
│ │ ├── coin.spec.ts
│ │ └── coin.ts
│ ├── index.akash.base.v1beta3.ts
│ ├── index.akash.base.v1beta4.ts
│ ├── index.akash.deployment.v1beta2.ts
│ ├── index.akash.deployment.v1beta3.ts
│ └── index.akash.market.v1beta4.ts
├── static-exports.json
├── test
├── setup-functional-tests.ts
├── setup-unit-tests.ts
└── setup.ts
├── tsconfig.build.json
└── tsconfig.json
/.chglog/CHANGELOG.tpl.md:
--------------------------------------------------------------------------------
1 | {{ range .Versions }}
2 |
3 | ## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }}
4 |
5 | > {{ datetime "2006-01-02" .Tag.Date }}
6 |
7 | {{ range .CommitGroups -}}
8 | ### {{ .Title }}
9 |
10 | {{ range .Commits -}}
11 | * {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
12 | {{ end }}
13 | {{ end -}}
14 |
15 | {{- if .RevertCommits -}}
16 | ### Reverts
17 |
18 | {{ range .RevertCommits -}}
19 | * {{ .Revert.Header }}
20 | {{ end }}
21 | {{ end -}}
22 |
23 | {{- if .MergeCommits -}}
24 | ### Pull Requests
25 |
26 | {{ range .MergeCommits -}}
27 | * {{ .Header }}
28 | {{ end }}
29 | {{ end -}}
30 |
31 | {{- if .NoteGroups -}}
32 | {{ range .NoteGroups -}}
33 | ### {{ .Title }}
34 |
35 | {{ range .Notes }}
36 | {{ .Body }}
37 | {{ end }}
38 | {{ end -}}
39 | {{ end -}}
40 | {{ end -}}
--------------------------------------------------------------------------------
/.chglog/config.yaml:
--------------------------------------------------------------------------------
1 | style: github
2 | template: CHANGELOG.tpl.md
3 | info:
4 | title: CHANGELOG
5 | repository_url: https://github.com/akash-network/akash-api
6 | options:
7 | commits:
8 | # filters:
9 | # Type:
10 | # - feat
11 | # - fix
12 | # - perf
13 | # - refactor
14 | commit_groups:
15 | title_maps:
16 | feat: Features
17 | fix: Bug Fixes
18 | perf: Performance Improvements
19 | refactor: Code Refactoring
20 | header:
21 | pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
22 | pattern_maps:
23 | - Type
24 | - Scope
25 | - Subject
26 | notes:
27 | keywords:
28 | - BREAKING CHANGE
29 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | GIT_CHGLOG_VERSION=v0.15.0
2 | GO111MODULE=on
3 | ROOT_DIR=${AKASH_ROOT}
4 | AKASH_DEVCACHE_BASE=${AKASH_ROOT}/.cache
5 | AKASH_DEVCACHE=${AKASH_DEVCACHE_BASE}
6 | AKASH_DEVCACHE_BIN=${AKASH_DEVCACHE}/bin
7 | AKASH_DEVCACHE_INCLUDE=${AKASH_DEVCACHE}/include
8 | AKASH_DEVCACHE_VERSIONS=${AKASH_DEVCACHE}/versions
9 | AKASH_DEVCACHE_NODE_MODULES=${AKASH_DEVCACHE}
10 | AKASH_DEVCACHE_NODE_BIN=${AKASH_DEVCACHE_NODE_MODULES}/node_modules/.bin
11 | AKASH_TS_ROOT=${AKASH_ROOT}/ts
12 | AKASH_TS_PACKAGE_FILE=${AKASH_TS_ROOT}/package.json
13 | AKASH_TS_NODE_MODULES=${AKASH_TS_ROOT}/node_modules
14 | AKASH_TS_NODE_BIN=${AKASH_TS_NODE_MODULES}/.bin
15 | AKASH_DEVCACHE_TS_TMP=${AKASH_DEVCACHE_BASE}/tmp/ts
16 | AKASH_DEVCACHE_TS_TMP_GRPC_JS=${AKASH_DEVCACHE_TS_TMP}/generated-grpc-js
17 | AKASH_DEVCACHE_TS_TMP_PATCHES=${AKASH_DEVCACHE_TS_TMP}/patches
--------------------------------------------------------------------------------
/.envrc:
--------------------------------------------------------------------------------
1 | AKASH_ROOT=$(pwd)
2 | export AKASH_ROOT
3 |
4 | dotenv
5 | dotenv_if_exists dev.env
6 |
7 | if [[ ${GOWORK} != "off" ]] && [[ -f go.work ]]; then
8 | GOWORK=${AKASH_ROOT}/go.work
9 | else
10 | GOWORK=off
11 | fi
12 |
13 | TOOLS=${AKASH_ROOT}/script/tools.sh
14 | SEMVER=${AKASH_ROOT}/script/semver.sh
15 |
16 | GOTOOLCHAIN=$(${TOOLS} gotoolchain)
17 | GOTOOLCHAIN_SEMVER=$(echo "${GOTOOLCHAIN}" | sed 's/go*/v/' | tr -d '\n')
18 |
19 | if [[ "$OSTYPE" == "darwin"* ]]; then
20 | # on MacOS disable deprecation warnings security framework
21 | CGO_CFLAGS=-Wno-deprecated-declarations
22 |
23 | export CGO_CFLAGS
24 | fi
25 |
26 | export SEMVER
27 | export GOTOOLCHAIN
28 | export GOTOOLCHAIN_SEMVER
29 | export AKASH_DIRENV_SET
30 | export GOWORK
31 |
32 | PATH_add "$AKASH_DEVCACHE_NODE_BIN"
33 | PATH_add "$AKASH_DEVCACHE_BIN"
34 | PATH_add "$AKASH_TS_NODE_BIN"
35 |
36 | AKASH_DIRENV_SET=1
37 |
38 | make cache
39 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | ts/** @akash-network/console
2 | ./buf.gen.ts.yaml @akash-network/console
3 | * @akash-network/core
4 |
--------------------------------------------------------------------------------
/.github/labeler.yaml:
--------------------------------------------------------------------------------
1 | "C:go/node":
2 | - changed-files:
3 | - any-glob-to-any-file: go/node/**/*
4 | "C:go/manifest":
5 | - changed-files:
6 | - any-glob-to-any-file: go/manifest/**/*
7 | "C:go/testutil":
8 | - changed-files:
9 | - any-glob-to-any-file: go/testutil/**/*
10 | "C:go/sdkutil":
11 | - changed-files:
12 | - any-glob-to-any-file: go/sdkutil/**/*
13 | "C:proto":
14 | - changed-files:
15 | - any-glob-to-any-file: proto/akash
16 | "C:proto/provider":
17 | - changed-files:
18 | - any-glob-to-any-file: proto/provider/**/*
19 | "Type: Build":
20 | - changed-files:
21 | - any-glob-to-any-file: Makefile
22 | - changed-files:
23 | - any-glob-to-any-file: Dockerfile
24 | - changed-files:
25 | - any-glob-to-any-file: script/*
26 | - changed-files:
27 | - any-glob-to-any-file: make/*
28 | - changed-files:
29 | - any-glob-to-any-file: .goreleaser*
30 | "Type: CI":
31 | - changed-files:
32 | - any-glob-to-any-file: .github/**/*
33 | "Typ: Docs":
34 | - changed-files:
35 | - any-glob-to-any-file: docs/**/*
36 |
--------------------------------------------------------------------------------
/.github/workflows/breakage.yaml:
--------------------------------------------------------------------------------
1 | name: proto
2 |
3 | on:
4 | pull_request:
5 | paths:
6 | - "**.proto"
7 | jobs:
8 | breakage:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v4
12 | with:
13 | fetch-depth: 0
14 | - name: Setup env
15 | uses: HatsuneMiku3939/direnv-action@v1
16 | - run: |
17 | toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
18 | echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
19 | - uses: actions/setup-go@v5
20 | with:
21 | go-version: "${{ env.GOVERSION }}"
22 | - name: go mod vendor
23 | run: make modvendor
24 | - name: check-breakage
25 | run: make check-breaking
26 |
--------------------------------------------------------------------------------
/.github/workflows/labeler.yaml:
--------------------------------------------------------------------------------
1 | name: github
2 | on:
3 | - pull_request_target
4 |
5 | permissions:
6 | contents: read
7 |
8 | jobs:
9 | labeler:
10 | permissions:
11 | contents: read # for actions/labeler to determine modified files
12 | pull-requests: write # for actions/labeler to add labels to PRs
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v4
16 | - uses: actions/labeler@v5
17 | with:
18 | configuration-path: .github/labeler.yaml
19 | repo-token: "${{ secrets.GITHUB_TOKEN }}"
20 | dot: true
21 |
--------------------------------------------------------------------------------
/.github/workflows/lint-shell.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: lint
3 | on:
4 | push:
5 | paths:
6 | - "**.sh"
7 | - ".github/workflows/lint-shell.yaml"
8 | jobs:
9 | shell:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v4
13 | - run: git fetch --prune --unshallow
14 | - name: Setup env
15 | uses: HatsuneMiku3939/direnv-action@v1
16 | - uses: actions/setup-go@v3
17 | with:
18 | go-version: "${{ env.GOLANG_VERSION }}"
19 | - run: make lint-shell
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### dev environment configurations
2 | .idea
3 | .cache
4 |
5 | ### Go template
6 | # Test binary, built with `go test -c`
7 | *.test
8 |
9 | # Output of the go coverage tool, specifically when used with LiteIDE
10 | *.out
11 |
12 | # Dependency directories (remove the comment below to include it)
13 | vendor/
14 |
15 | # Go workspace file
16 | go.work*
17 |
18 | # coverage
19 | coverage.txt
20 |
21 | dev.env
22 |
23 | .editorconfig
24 |
--------------------------------------------------------------------------------
/.golangci.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | issues:
3 | exclude:
4 | - comment on exported (method|function|type|const|var)
5 | exclude-use-default: true
6 | exclude-dirs:
7 | - "^go/node/types/v1beta1"
8 | - "^go/node/types/v1beta2"
9 | - "^go/node/market/v1beta3"
10 | exclude-files:
11 | - "\\.pb\\.go$"
12 | - "\\.pb\\.gw\\.go$"
13 | # Skip vendor/ etc
14 | exclude-dirs-use-default: true
15 | # Skip generated k8s code
16 | linters:
17 | disable-all: true
18 | enable:
19 | - unused
20 | - misspell
21 | - gofmt
22 | - gocritic
23 | - goconst
24 | - govet
25 | - ineffassign
26 | - unparam
27 | - staticcheck
28 | - revive
29 | - gosec
30 | - copyloopvar
31 | - prealloc
32 | linters-settings:
33 | gocritic:
34 | disabled-checks:
35 | - ifElseChain
36 | - singleCaseSwitch
37 |
--------------------------------------------------------------------------------
/.mockery.yaml:
--------------------------------------------------------------------------------
1 | quiet: False
2 | inpackage: False
3 | with-expecter: True
4 | keeptree: True
5 | case: underscore
6 |
--------------------------------------------------------------------------------
/buf.gen.gogo.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | plugins:
3 | - name: gocosmos
4 | out: .
5 | opt:
6 | - plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types
7 | - name: grpc-gateway
8 | out: .
9 | opt: logtostderr=true,allow_colon_final_segments=true
10 |
--------------------------------------------------------------------------------
/buf.gen.pulsar.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | managed:
3 | enabled: true
4 | go_package_prefix:
5 | default: cosmossdk.io/api
6 | except:
7 | - buf.build/googleapis/googleapis
8 | - buf.build/cosmos/gogo-proto
9 | - buf.build/cosmos/cosmos-proto
10 | override:
11 | plugins:
12 | - name: go-pulsar
13 | out: ../api
14 | opt: paths=source_relative
15 | - name: go-grpc
16 | out: ../api
17 | opt: paths=source_relative
18 |
--------------------------------------------------------------------------------
/buf.gen.swagger.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | plugins:
3 | - name: swagger
4 | out: ./.cache/tmp/swagger-gen
5 | opt: logtostderr=true,fqn_for_swagger_name=true,simple_operation_ids=true
6 |
--------------------------------------------------------------------------------
/buf.work.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | directories:
3 | - proto/node
4 | - proto/provider
5 | - .cache/include
6 | - vendor/github.com/cosmos/cosmos-sdk/proto
7 | - vendor/github.com/cosmos/cosmos-sdk/third_party/proto
8 |
--------------------------------------------------------------------------------
/changelog.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## v0.0.1
4 |
5 | > 2023-02-16
6 |
7 | ### Ci
8 |
9 | * set codeowners ([#2](https://github.com/akash-network/akash-api/issues/2))
10 |
11 | ### Docs
12 |
13 | * **readme:** set project description
14 |
15 | ### Features
16 |
17 | * initial commit ([#1](https://github.com/akash-network/akash-api/issues/1))
18 | * initial commit
19 |
20 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | ignore:
2 | - "**/*.pb.go"
3 | - "**/*.pb.gw.go"
4 | - "**/mocks/.*"
5 | - "pkg"
6 | comment: false
7 | codecov:
8 | require_ci_to_pass: true
9 | parsers:
10 | gcov:
11 | branch_detection:
12 | loop: yes
13 | macro: no
14 | method: no
15 | conditional: yes
16 | coverage:
17 | range: 40..100
18 | round: down
19 | precision: 2
20 | status:
21 | project:
22 | default:
23 | if_not_found: success
24 | if_ci_failed: error
--------------------------------------------------------------------------------
/docs/config.yaml:
--------------------------------------------------------------------------------
1 | swagger: '2.0'
2 | info:
3 | title: "AKASH - gRPC Gateway docs"
4 | description: "A REST interface for state queries"
5 | version: "1.0.0"
6 | apis:
7 | - url: "./.cache/tmp/swagger-gen/akash/audit/v1beta3/query.swagger.json"
8 | - url: "./.cache/tmp/swagger-gen/akash/cert/v1beta3/query.swagger.json"
9 | - url: "./.cache/tmp/swagger-gen/akash/deployment/v1beta3/query.swagger.json"
10 | - url: "./.cache/tmp/swagger-gen/akash/deployment/v1beta3/service.swagger.json"
11 | - url: "./.cache/tmp/swagger-gen/akash/market/v1beta3/query.swagger.json"
12 | - url: "./.cache/tmp/swagger-gen/akash/market/v1beta3/service.swagger.json"
13 | - url: "./.cache/tmp/swagger-gen/akash/provider/v1beta3/query.swagger.json"
14 | - url: "./vendor/github.com/cosmos/cosmos-sdk/client/docs/swagger-ui/swagger.yaml"
15 | dereference:
16 | circular: "ignore"
17 |
--------------------------------------------------------------------------------
/go/grpc/gogoreflection/doc.go:
--------------------------------------------------------------------------------
1 | // Package gogoreflection implements gRPC reflection for gogoproto consumers
2 | // the normal reflection library does not work as it points to a different
3 | // singleton registry. The API and codebase is taken from the official gRPC
4 | // reflection repository.
5 | package gogoreflection
6 |
--------------------------------------------------------------------------------
/go/grpc/gogoreflection/fix_registration_test.go:
--------------------------------------------------------------------------------
1 | package gogoreflection
2 |
3 | import (
4 | "testing"
5 |
6 | "google.golang.org/protobuf/runtime/protoimpl"
7 | )
8 |
9 | func TestRegistrationFix(t *testing.T) {
10 | res := getFileDescriptor("gogoproto/gogo.proto")
11 | rawDesc, err := decompress(res)
12 | if err != nil {
13 | t.Fatal(err)
14 | }
15 | fd := protoimpl.DescBuilder{
16 | RawDescriptor: rawDesc,
17 | }.Build()
18 |
19 | if fd.File.Extensions().Len() == 0 {
20 | t.Fatal("unexpected parsing")
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/go/inventory/v1/cluster.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (cl *Cluster) Dup() *Cluster {
4 | res := &Cluster{
5 | Nodes: cl.Nodes.Dup(),
6 | Storage: cl.Storage.Dup(),
7 | }
8 |
9 | return res
10 | }
11 |
--------------------------------------------------------------------------------
/go/inventory/v1/cpu.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (r *CPU) Dup() CPU {
4 | res := CPU{
5 | Quantity: r.Quantity.Dup(),
6 | Info: r.Info.Dup(),
7 | }
8 |
9 | return res
10 | }
11 |
12 | func (s CPUInfoS) Dup() CPUInfoS {
13 | if len(s) == 0 {
14 | return nil
15 | }
16 |
17 | res := make(CPUInfoS, 0, len(s))
18 |
19 | for _, n := range s {
20 | res = append(res, CPUInfo{
21 | ID: n.ID,
22 | Vendor: n.Vendor,
23 | Model: n.Model,
24 | Vcores: n.Vcores,
25 | })
26 | }
27 |
28 | return res
29 | }
30 |
--------------------------------------------------------------------------------
/go/inventory/v1/gpu.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (s GPUs) Dup() GPUs {
4 | if len(s) == 0 {
5 | return nil
6 | }
7 |
8 | res := make(GPUs, 0, len(s))
9 |
10 | for _, g := range s {
11 | res = append(res, g.Dup())
12 | }
13 |
14 | return res
15 | }
16 |
17 | func (r *GPU) Dup() GPU {
18 | res := GPU{
19 | Quantity: r.Quantity.Dup(),
20 | Info: r.Info.Dup(),
21 | }
22 |
23 | return res
24 | }
25 |
26 | func (s *GPUInfo) Dup() GPUInfo {
27 | res := GPUInfo{
28 | Vendor: s.Vendor,
29 | VendorID: s.VendorID,
30 | Name: s.Name,
31 | ModelID: s.ModelID,
32 | Interface: s.Interface,
33 | MemorySize: s.MemorySize,
34 | }
35 |
36 | return res
37 | }
38 |
39 | func (s GPUInfoS) Dup() GPUInfoS {
40 | if len(s) == 0 {
41 | return nil
42 | }
43 |
44 | res := make(GPUInfoS, 0, len(s))
45 |
46 | for _, n := range s {
47 | res = append(res, GPUInfo{
48 | Vendor: n.Vendor,
49 | Name: n.Name,
50 | ModelID: n.ModelID,
51 | Interface: n.Interface,
52 | MemorySize: n.MemorySize,
53 | })
54 | }
55 |
56 | return res
57 | }
58 |
--------------------------------------------------------------------------------
/go/inventory/v1/memory.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (r *Memory) Dup() Memory {
4 | res := Memory{
5 | Quantity: r.Quantity.Dup(),
6 | Info: r.Info.Dup(),
7 | }
8 |
9 | return res
10 | }
11 |
12 | func (s MemoryInfoS) Dup() MemoryInfoS {
13 | if len(s) == 0 {
14 | return nil
15 | }
16 |
17 | res := make(MemoryInfoS, 0, len(s))
18 |
19 | for _, n := range s {
20 | res = append(res, MemoryInfo{
21 | Vendor: n.Vendor,
22 | Type: n.Type,
23 | TotalSize: n.TotalSize,
24 | Speed: n.Speed,
25 | })
26 | }
27 |
28 | return res
29 | }
30 |
--------------------------------------------------------------------------------
/go/inventory/v1/node.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (nd *NodeCapabilities) Dup() NodeCapabilities {
4 | res := NodeCapabilities{
5 | StorageClasses: make([]string, 0, len(nd.StorageClasses)),
6 | }
7 |
8 | for _, class := range nd.StorageClasses {
9 | res.StorageClasses = append(res.StorageClasses, class)
10 | }
11 |
12 | return res
13 | }
14 |
15 | func (nd Nodes) Dup() Nodes {
16 | res := make(Nodes, 0, len(nd))
17 |
18 | for _, n := range nd {
19 | res = append(res, n.Dup())
20 | }
21 | return res
22 | }
23 |
24 | func (nd *Node) Dup() Node {
25 | res := Node{
26 | Name: nd.Name,
27 | Resources: nd.Resources.Dup(),
28 | Capabilities: nd.Capabilities.Dup(),
29 | }
30 |
31 | return res
32 | }
33 |
34 | func (nd *Node) IsStorageClassSupported(class string) bool {
35 | for _, val := range nd.Capabilities.StorageClasses {
36 | if val == class {
37 | return true
38 | }
39 | }
40 |
41 | return false
42 | }
43 |
--------------------------------------------------------------------------------
/go/inventory/v1/resources.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (s *NodeResources) Dup() NodeResources {
4 | res := NodeResources{
5 | CPU: s.CPU.Dup(),
6 | GPU: s.GPU.Dup(),
7 | Memory: s.Memory.Dup(),
8 | EphemeralStorage: s.EphemeralStorage.Dup(),
9 | VolumesAttached: s.VolumesAttached.Dup(),
10 | VolumesMounted: s.VolumesMounted.Dup(),
11 | }
12 |
13 | return res
14 | }
15 |
--------------------------------------------------------------------------------
/go/inventory/v1/storage.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | func (s ClusterStorage) Dup() ClusterStorage {
4 | res := make(ClusterStorage, 0, len(s))
5 |
6 | for _, storage := range s {
7 | res = append(res, Storage{
8 | Quantity: storage.Quantity.Dup(),
9 | Info: storage.Info.Dup(),
10 | })
11 | }
12 | return res
13 | }
14 |
15 | func (r *Storage) Dup() Storage {
16 | res := Storage{
17 | Quantity: r.Quantity.Dup(),
18 | Info: r.Info.Dup(),
19 | }
20 |
21 | return res
22 | }
23 |
24 | func (s *StorageInfo) Dup() StorageInfo {
25 | return StorageInfo{
26 | Class: s.Class,
27 | IOPS: s.IOPS,
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/go/manifest/v2beta1/group.go:
--------------------------------------------------------------------------------
1 | package v2beta1
2 |
3 | import (
4 | types "github.com/akash-network/akash-api/go/node/types/v1beta2"
5 | )
6 |
7 | // GetName returns the name of group
8 | func (g Group) GetName() string {
9 | return g.Name
10 | }
11 |
12 | // GetResources returns list of resources in a group
13 | func (g Group) GetResources() []types.Resources {
14 | resources := make([]types.Resources, 0, len(g.Services))
15 | for _, s := range g.Services {
16 | resources = append(resources, types.Resources{
17 | Resources: s.Resources,
18 | Count: s.Count,
19 | })
20 | }
21 |
22 | return resources
23 | }
24 |
--------------------------------------------------------------------------------
/go/manifest/v2beta1/manifest_validation_errors.go:
--------------------------------------------------------------------------------
1 | package v2beta1
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | ErrInvalidManifest = errors.New("invalid manifest")
9 | ErrManifestCrossValidation = errors.New("manifest cross validation error")
10 | )
11 |
--------------------------------------------------------------------------------
/go/manifest/v2beta1/service.go:
--------------------------------------------------------------------------------
1 | package v2beta1
2 |
3 | type Services []Service
4 |
--------------------------------------------------------------------------------
/go/manifest/v2beta2/errors.go:
--------------------------------------------------------------------------------
1 | package v2beta2
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | ErrInvalidManifest = errors.New("invalid manifest")
9 | ErrManifestCrossValidation = errors.New("manifest cross-validation error")
10 | )
11 |
--------------------------------------------------------------------------------
/go/manifest/v2beta2/service_expose_test.go:
--------------------------------------------------------------------------------
1 | package v2beta2
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/require"
7 | )
8 |
9 | func TestShouldBeIngress(t *testing.T) {
10 | // Should not create ingress for something on port 81
11 | exp := ServiceExpose{
12 | Global: true,
13 | Proto: TCP,
14 | Port: 81,
15 | }
16 |
17 | require.False(t, exp.IsIngress())
18 |
19 | exp = ServiceExpose{
20 | Global: true,
21 | Proto: TCP,
22 | Port: 80,
23 | }
24 |
25 | // Should create ingress for something on port 80
26 | require.True(t, exp.IsIngress())
27 |
28 | exp = ServiceExpose{
29 | Global: false,
30 | Proto: TCP,
31 | Port: 80,
32 | }
33 |
34 | // Should not create ingress for something on port 80 that is not Global
35 | require.False(t, exp.IsIngress())
36 |
37 | exp = ServiceExpose{
38 | Global: true,
39 | Proto: UDP,
40 | Port: 80,
41 | }
42 |
43 | // Should not create ingress for something on port 80 that is UDP
44 | require.False(t, exp.IsIngress())
45 | }
46 |
--------------------------------------------------------------------------------
/go/manifest/v2beta2/serviceexposes.go:
--------------------------------------------------------------------------------
1 | package v2beta2
2 |
3 | import (
4 | "sort"
5 |
6 | types "github.com/akash-network/akash-api/go/node/types/v1beta3"
7 | )
8 |
9 | type ServiceExposes []ServiceExpose
10 |
11 | var _ sort.Interface = (*ServiceExposes)(nil)
12 |
13 | func (s ServiceExposes) Len() int {
14 | return len(s)
15 | }
16 |
17 | func (s ServiceExposes) Swap(i, j int) {
18 | s[i], s[j] = s[j], s[i]
19 | }
20 |
21 | func (s ServiceExposes) Less(i, j int) bool {
22 | a, b := s[i], s[j]
23 |
24 | if a.Service != b.Service {
25 | return a.Service < b.Service
26 | }
27 |
28 | if a.Port != b.Port {
29 | return a.Port < b.Port
30 | }
31 |
32 | if a.Proto != b.Proto {
33 | return a.Proto < b.Proto
34 | }
35 |
36 | if a.Global != b.Global {
37 | return a.Global
38 | }
39 |
40 | return false
41 | }
42 |
43 | func (s ServiceExposes) GetEndpoints() types.Endpoints {
44 | endpoints := make(types.Endpoints, 0)
45 |
46 | for _, expose := range s {
47 | endpoints = append(endpoints, expose.GetEndpoints()...)
48 | }
49 |
50 | return endpoints
51 | }
52 |
--------------------------------------------------------------------------------
/go/manifest/v2beta2/services.go:
--------------------------------------------------------------------------------
1 | package v2beta2
2 |
3 | import (
4 | "sort"
5 | )
6 |
7 | type Services []Service
8 |
9 | var _ sort.Interface = (*ServiceExposes)(nil)
10 |
11 | func (s Services) Len() int {
12 | return len(s)
13 | }
14 |
15 | func (s Services) Swap(i, j int) {
16 | s[i], s[j] = s[j], s[i]
17 | }
18 |
19 | func (s Services) Less(i, j int) bool {
20 | return s[i].Name < s[j].Name
21 | }
22 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta1/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta1/key.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "audit"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
14 | func PrefixProviderID() []byte {
15 | return []byte{0x01}
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta1/types.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "bytes"
5 |
6 | sdk "github.com/cosmos/cosmos-sdk/types"
7 | )
8 |
9 | type ProviderID struct {
10 | Owner sdk.Address
11 | Auditor sdk.Address
12 | }
13 |
14 | // Providers is the collection of Provider
15 | type Providers []Provider
16 |
17 | // String implements the Stringer interface for a Providers object.
18 | func (obj Providers) String() string {
19 | var buf bytes.Buffer
20 |
21 | const sep = "\n\n"
22 |
23 | for _, p := range obj {
24 | buf.WriteString(p.String())
25 | buf.WriteString(sep)
26 | }
27 |
28 | if len(obj) > 0 {
29 | buf.Truncate(buf.Len() - len(sep))
30 | }
31 |
32 | return buf.String()
33 | }
34 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta2/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrProviderNotFound provider not found
9 | ErrProviderNotFound = errors.New("invalid provider: address not found")
10 |
11 | // ErrInvalidAddress invalid trusted auditor address
12 | ErrInvalidAddress = errors.New("invalid address")
13 |
14 | // ErrAttributeNotFound invalid trusted auditor address
15 | ErrAttributeNotFound = errors.New("attribute not found")
16 | )
17 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "audit"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
14 | func PrefixProviderID() []byte {
15 | return []byte{0x01}
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta2/types.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "bytes"
5 |
6 | sdk "github.com/cosmos/cosmos-sdk/types"
7 | )
8 |
9 | type ProviderID struct {
10 | Owner sdk.Address
11 | Auditor sdk.Address
12 | }
13 |
14 | // Providers is the collection of Provider
15 | type Providers []Provider
16 |
17 | // String implements the Stringer interface for a Providers object.
18 | func (obj Providers) String() string {
19 | var buf bytes.Buffer
20 |
21 | const sep = "\n\n"
22 |
23 | for _, p := range obj {
24 | buf.WriteString(p.String())
25 | buf.WriteString(sep)
26 | }
27 |
28 | if len(obj) > 0 {
29 | buf.Truncate(buf.Len() - len(sep))
30 | }
31 |
32 | return buf.String()
33 | }
34 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta3/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
5 | )
6 |
7 | const (
8 | errProviderNotFound uint32 = iota + 1
9 | errInvalidAddress
10 | errAttributeNotFound
11 | )
12 |
13 | var (
14 | // ErrProviderNotFound provider not found
15 | ErrProviderNotFound = sdkerrors.Register(ModuleName, errProviderNotFound, "invalid provider: address not found")
16 |
17 | // ErrInvalidAddress invalid trusted auditor address
18 | ErrInvalidAddress = sdkerrors.Register(ModuleName, errInvalidAddress, "invalid address")
19 |
20 | // ErrAttributeNotFound invalid trusted auditor address
21 | ErrAttributeNotFound = sdkerrors.Register(ModuleName, errAttributeNotFound, "attribute not found")
22 | )
23 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "audit"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
14 | func PrefixProviderID() []byte {
15 | return []byte{0x01}
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/audit/v1beta3/types.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "bytes"
5 |
6 | sdk "github.com/cosmos/cosmos-sdk/types"
7 | )
8 |
9 | type ProviderID struct {
10 | Owner sdk.Address
11 | Auditor sdk.Address
12 | }
13 |
14 | // Providers is the collection of Provider
15 | type Providers []Provider
16 |
17 | // String implements the Stringer interface for a Providers object.
18 | func (obj Providers) String() string {
19 | var buf bytes.Buffer
20 |
21 | const sep = "\n\n"
22 |
23 | for _, p := range obj {
24 | buf.WriteString(p.String())
25 | buf.WriteString(sep)
26 | }
27 |
28 | if len(obj) > 0 {
29 | buf.Truncate(buf.Len() - len(sep))
30 | }
31 |
32 | return buf.String()
33 | }
34 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta1/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "github.com/pkg/errors"
5 | )
6 |
7 | var (
8 | // ErrInvalidSerialNumber invalid serial number
9 | ErrInvalidSerialNumber = errors.New("invalid serial number")
10 |
11 | // ErrInvalidCertificateValue certificate content is not valid
12 | ErrInvalidCertificateValue = errors.New("invalid certificate value")
13 |
14 | // ErrInvalidPubkeyValue public key is not valid
15 | ErrInvalidPubkeyValue = errors.New("invalid pubkey value")
16 |
17 | // ErrInvalidState invalid certificate state
18 | ErrInvalidState = errors.New("invalid state")
19 | )
20 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta1/genesis.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "bytes"
5 | "encoding/json"
6 |
7 | "github.com/cosmos/cosmos-sdk/codec"
8 | sdk "github.com/cosmos/cosmos-sdk/types"
9 | )
10 |
11 | type GenesisCertificates []GenesisCertificate
12 |
13 | func (obj GenesisCertificates) Contains(cert GenesisCertificate) bool {
14 | for _, c := range obj {
15 | if c.Owner == cert.Owner {
16 | return true
17 | }
18 |
19 | if bytes.Equal(c.Certificate.Cert, cert.Certificate.Cert) {
20 | return true
21 | }
22 | }
23 |
24 | return false
25 | }
26 |
27 | func (m GenesisCertificate) Validate() error {
28 | owner, err := sdk.AccAddressFromBech32(m.Owner)
29 | if err != nil {
30 | return err
31 | }
32 | if err := m.Certificate.Validate(owner); err != nil {
33 | return err
34 | }
35 |
36 | return nil
37 | }
38 |
39 | func (m *GenesisState) Validate() error {
40 | for _, cert := range m.Certificates {
41 | if err := cert.Validate(); err != nil {
42 | return err
43 | }
44 | }
45 | return nil
46 | }
47 |
48 | // GetGenesisStateFromAppState returns x/cert GenesisState given raw application
49 | // genesis state.
50 | func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState {
51 | var genesisState GenesisState
52 |
53 | if appState[ModuleName] != nil {
54 | cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState)
55 | }
56 |
57 | return &genesisState
58 | }
59 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta1/key.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "cert"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
14 | func PrefixCertificateID() []byte {
15 | return []byte{0x01}
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta2/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrCertificateNotFound certificate not found
9 | ErrCertificateNotFound = errors.New("certificate not found")
10 |
11 | // ErrInvalidAddress invalid trusted auditor address
12 | ErrInvalidAddress = errors.New("invalid address")
13 |
14 | // ErrCertificateExists certificate already exists
15 | ErrCertificateExists = errors.New("certificate exists")
16 |
17 | // ErrCertificateAlreadyRevoked certificate already revoked
18 | ErrCertificateAlreadyRevoked = errors.New("certificate already revoked")
19 |
20 | // ErrInvalidSerialNumber invalid serial number
21 | ErrInvalidSerialNumber = errors.New("invalid serial number")
22 |
23 | // ErrInvalidCertificateValue certificate content is not valid
24 | ErrInvalidCertificateValue = errors.New("invalid certificate value")
25 |
26 | // ErrInvalidPubkeyValue public key is not valid
27 | ErrInvalidPubkeyValue = errors.New("invalid pubkey value")
28 |
29 | // ErrInvalidState invalid certificate state
30 | ErrInvalidState = errors.New("invalid state")
31 |
32 | // ErrInvalidKeySize invalid certificate state
33 | ErrInvalidKeySize = errors.New("invalid key size")
34 | )
35 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta2/genesis.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "bytes"
5 | "encoding/json"
6 |
7 | "github.com/cosmos/cosmos-sdk/codec"
8 | sdk "github.com/cosmos/cosmos-sdk/types"
9 | )
10 |
11 | type GenesisCertificates []GenesisCertificate
12 |
13 | func (obj GenesisCertificates) Contains(cert GenesisCertificate) bool {
14 | for _, c := range obj {
15 | if c.Owner == cert.Owner {
16 | return true
17 | }
18 |
19 | if bytes.Equal(c.Certificate.Cert, cert.Certificate.Cert) {
20 | return true
21 | }
22 | }
23 |
24 | return false
25 | }
26 |
27 | func (m GenesisCertificate) Validate() error {
28 | owner, err := sdk.AccAddressFromBech32(m.Owner)
29 | if err != nil {
30 | return err
31 | }
32 | if err := m.Certificate.Validate(owner); err != nil {
33 | return err
34 | }
35 |
36 | return nil
37 | }
38 |
39 | func (m *GenesisState) Validate() error {
40 | for _, cert := range m.Certificates {
41 | if err := cert.Validate(); err != nil {
42 | return err
43 | }
44 | }
45 | return nil
46 | }
47 |
48 | // GetGenesisStateFromAppState returns x/cert GenesisState given raw application
49 | // genesis state.
50 | func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState {
51 | var genesisState GenesisState
52 |
53 | if appState[ModuleName] != nil {
54 | cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState)
55 | }
56 |
57 | return &genesisState
58 | }
59 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "cert"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
14 | func PrefixCertificateID() []byte {
15 | return []byte{0x01}
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta3/genesis.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "bytes"
5 | "encoding/json"
6 |
7 | "github.com/cosmos/cosmos-sdk/codec"
8 | sdk "github.com/cosmos/cosmos-sdk/types"
9 | )
10 |
11 | type GenesisCertificates []GenesisCertificate
12 |
13 | func (obj GenesisCertificates) Contains(cert GenesisCertificate) bool {
14 | for _, c := range obj {
15 | if c.Owner == cert.Owner {
16 | return true
17 | }
18 |
19 | if bytes.Equal(c.Certificate.Cert, cert.Certificate.Cert) {
20 | return true
21 | }
22 | }
23 |
24 | return false
25 | }
26 |
27 | func (m GenesisCertificate) Validate() error {
28 | owner, err := sdk.AccAddressFromBech32(m.Owner)
29 | if err != nil {
30 | return err
31 | }
32 | if err := m.Certificate.Validate(owner); err != nil {
33 | return err
34 | }
35 |
36 | return nil
37 | }
38 |
39 | func (m *GenesisState) Validate() error {
40 | for _, cert := range m.Certificates {
41 | if err := cert.Validate(); err != nil {
42 | return err
43 | }
44 | }
45 | return nil
46 | }
47 |
48 | // GetGenesisStateFromAppState returns x/cert GenesisState given raw application
49 | // genesis state.
50 | func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState {
51 | var genesisState GenesisState
52 |
53 | if appState[ModuleName] != nil {
54 | cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState)
55 | }
56 |
57 | return &genesisState
58 | }
59 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "cert"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
14 | func PrefixCertificateID() []byte {
15 | return []byte{0x01}
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/cert/v1beta3/utils/constants.go:
--------------------------------------------------------------------------------
1 | package utils
2 |
3 | import "encoding/asn1"
4 |
5 | var AuthVersionOID = asn1.ObjectIdentifier{2, 23, 133, 2, 6}
6 |
--------------------------------------------------------------------------------
/go/node/client/v1beta2/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrClientNotFound is a new error with message "Client not found"
9 | ErrClientNotFound = errors.New("client not found")
10 | ErrNodeNotSynced = errors.New("rpc node is not catching up")
11 | )
12 |
--------------------------------------------------------------------------------
/go/node/client/v1beta2/node.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "context"
5 |
6 | sdkclient "github.com/cosmos/cosmos-sdk/client"
7 | rpcclient "github.com/tendermint/tendermint/rpc/client"
8 | tmrpc "github.com/tendermint/tendermint/rpc/core/types"
9 | )
10 |
11 | var _ NodeClient = (*node)(nil)
12 |
13 | type node struct {
14 | rpc rpcclient.Client
15 | }
16 |
17 | func newNode(cctx sdkclient.Context) *node {
18 | nd := &node{
19 | rpc: cctx.Client,
20 | }
21 |
22 | return nd
23 | }
24 |
25 | func (nd *node) SyncInfo(ctx context.Context) (*tmrpc.SyncInfo, error) {
26 | status, err := nd.rpc.Status(ctx)
27 | if err != nil {
28 | return nil, err
29 | }
30 |
31 | info := status.SyncInfo
32 |
33 | return &info, nil
34 | }
35 |
--------------------------------------------------------------------------------
/go/node/client/v1beta2/options.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | type ClientOptions struct {
4 | tclient TxClient // nolint: unused
5 | }
6 |
7 | type ClientOption func(*ClientOptions) *ClientOptions
8 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 |
9 | // ErrInvalidGroups is the error when groups are empty
10 | ErrInvalidGroups = errors.New("Invalid groups")
11 | // ErrInvalidDeploymentID is the error for invalid deployment id
12 |
13 | // ErrEmptyVersion is the error when version is empty
14 | ErrEmptyVersion = errors.New("Invalid: empty version")
15 | // ErrInvalidVersion is the error when version is invalid
16 | ErrInvalidVersion = errors.New("Invalid: deployment version")
17 | // ErrInternal is the error for internal error
18 |
19 | // ErrInvalidDeployment = is the error when deployment does not pass validation
20 | ErrInvalidDeployment = errors.New("Invalid deployment")
21 |
22 | // ErrGroupClosed is the error when deployment is closed
23 | ErrGroupClosed = errors.New("Group already closed")
24 | // ErrGroupOpen is the error when deployment is closed
25 | ErrGroupOpen = errors.New("Group open")
26 | // ErrGroupPaused is the error when deployment is closed
27 | ErrGroupPaused = errors.New("Group paused")
28 |
29 | // ErrInvalidDeposit indicates an invalid deposit
30 | ErrInvalidDeposit = errors.New("Deposit invalid")
31 | // ErrInvalidIDPath indicates an invalid ID path
32 | ErrInvalidIDPath = errors.New("ID path invalid")
33 | // ErrInvalidParam indicates an invalid chain parameter
34 | ErrInvalidParam = errors.New("parameter invalid")
35 | )
36 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/escrow.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta1"
5 | )
6 |
7 | const (
8 | EscrowScope = "deployment"
9 | )
10 |
11 | func EscrowAccountForDeployment(id DeploymentID) etypes.AccountID {
12 | return etypes.AccountID{
13 | Scope: EscrowScope,
14 | XID: id.String(),
15 | }
16 | }
17 |
18 | func DeploymentIDFromEscrowAccount(id etypes.AccountID) (DeploymentID, bool) {
19 | if id.Scope != EscrowScope {
20 | return DeploymentID{}, false
21 | }
22 |
23 | did, err := ParseDeploymentID(id.XID)
24 | return did, err == nil
25 | }
26 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/group_validation.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import "github.com/pkg/errors"
4 |
5 | // ValidateDeploymentGroup does validation for provided deployment group
6 | func validateDeploymentGroup(gspec GroupSpec) error {
7 | if err := ValidateResourceList(gspec); err != nil {
8 | return err
9 | }
10 | if err := validateGroupPricing(gspec); err != nil {
11 | return err
12 | }
13 | return validateOrderBidDuration(gspec)
14 | }
15 |
16 | // ValidateDeploymentGroups does validation for all deployment groups
17 | func ValidateDeploymentGroups(gspecs []GroupSpec) error {
18 | if len(gspecs) == 0 {
19 | return ErrInvalidGroups
20 | }
21 |
22 | names := make(map[string]int, len(gspecs)) // Used as set
23 | for _, group := range gspecs {
24 | if err := group.ValidateBasic(); err != nil {
25 | return err
26 | }
27 |
28 | if _, exists := names[group.GetName()]; exists {
29 | return errors.Errorf("duplicate deployment group name %q", group.GetName())
30 | }
31 | names[group.GetName()] = 0 // Value stored does not matter
32 | }
33 |
34 | return nil
35 | }
36 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/key.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "deployment"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
14 | func DeploymentPrefix() []byte {
15 | return []byte{0x01}
16 | }
17 |
18 | func GroupPrefix() []byte {
19 | return []byte{0x02}
20 | }
21 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/msgs_test.go:
--------------------------------------------------------------------------------
1 | package v1beta1_test
2 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/params.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | sdk "github.com/cosmos/cosmos-sdk/types"
5 | paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
6 | "github.com/pkg/errors"
7 | )
8 |
9 | var _ paramtypes.ParamSet = (*Params)(nil)
10 |
11 | var (
12 | DefaultDeploymentMinDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000))
13 | )
14 |
15 | const (
16 | keyDeploymentMinDeposit = "DeploymentMinDeposit"
17 | )
18 |
19 | func ParamKeyTable() paramtypes.KeyTable {
20 | return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
21 | }
22 |
23 | func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
24 | return paramtypes.ParamSetPairs{
25 | paramtypes.NewParamSetPair([]byte(keyDeploymentMinDeposit), &p.DeploymentMinDeposit, validateCoin),
26 | }
27 | }
28 |
29 | func DefaultParams() Params {
30 | return Params{
31 | DeploymentMinDeposit: DefaultDeploymentMinDeposit,
32 | }
33 | }
34 |
35 | func (p Params) Validate() error {
36 | if err := validateCoin(p.DeploymentMinDeposit); err != nil {
37 | return err
38 | }
39 |
40 | return nil
41 | }
42 |
43 | func validateCoin(i interface{}) error {
44 | _, ok := i.(sdk.Coin)
45 | if !ok {
46 | return errors.Wrapf(ErrInvalidParam, "%T", i)
47 | }
48 |
49 | return nil
50 | }
51 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta1/types_test.go:
--------------------------------------------------------------------------------
1 | package v1beta1_test
2 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta2/escrow.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta2"
5 | )
6 |
7 | const (
8 | EscrowScope = "deployment"
9 | )
10 |
11 | func EscrowAccountForDeployment(id DeploymentID) etypes.AccountID {
12 | return etypes.AccountID{
13 | Scope: EscrowScope,
14 | XID: id.String(),
15 | }
16 | }
17 |
18 | func DeploymentIDFromEscrowAccount(id etypes.AccountID) (DeploymentID, bool) {
19 | if id.Scope != EscrowScope {
20 | return DeploymentID{}, false
21 | }
22 |
23 | did, err := ParseDeploymentID(id.XID)
24 | return did, err == nil
25 | }
26 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta2/group_validation.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "fmt"
5 | )
6 |
7 | // ValidateDeploymentGroup does validation for provided deployment group
8 | func validateDeploymentGroup(gspec GroupSpec) error {
9 | if err := ValidateResourceList(gspec); err != nil {
10 | return err
11 | }
12 | if err := validateGroupPricing(gspec); err != nil {
13 | return err
14 | }
15 | return validateOrderBidDuration(gspec)
16 | }
17 |
18 | // ValidateDeploymentGroups does validation for all deployment groups
19 | func ValidateDeploymentGroups(gspecs []GroupSpec) error {
20 | if len(gspecs) == 0 {
21 | return ErrInvalidGroups
22 | }
23 |
24 | names := make(map[string]int, len(gspecs)) // Used as set
25 | for _, group := range gspecs {
26 | if err := group.ValidateBasic(); err != nil {
27 | return err
28 | }
29 |
30 | if _, exists := names[group.GetName()]; exists {
31 | return fmt.Errorf("duplicate deployment group name %q", group.GetName())
32 | }
33 | names[group.GetName()] = 0 // Value stored does not matter
34 | }
35 |
36 | return nil
37 | }
38 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "deployment"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
14 | func DeploymentPrefix() []byte {
15 | return []byte{0x01}
16 | }
17 |
18 | func GroupPrefix() []byte {
19 | return []byte{0x02}
20 | }
21 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta2/params.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | sdk "github.com/cosmos/cosmos-sdk/types"
5 | paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
6 | "github.com/pkg/errors"
7 | )
8 |
9 | var _ paramtypes.ParamSet = (*Params)(nil)
10 |
11 | var (
12 | DefaultDeploymentMinDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000))
13 | )
14 |
15 | const (
16 | keyDeploymentMinDeposit = "DeploymentMinDeposit"
17 | )
18 |
19 | func ParamKeyTable() paramtypes.KeyTable {
20 | return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
21 | }
22 |
23 | func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
24 | return paramtypes.ParamSetPairs{
25 | paramtypes.NewParamSetPair([]byte(keyDeploymentMinDeposit), &p.DeploymentMinDeposit, validateCoin),
26 | }
27 | }
28 |
29 | func DefaultParams() Params {
30 | return Params{
31 | DeploymentMinDeposit: DefaultDeploymentMinDeposit,
32 | }
33 | }
34 |
35 | func (p Params) Validate() error {
36 | if err := validateCoin(p.DeploymentMinDeposit); err != nil {
37 | return err
38 | }
39 |
40 | return nil
41 | }
42 |
43 | func validateCoin(i interface{}) error {
44 | _, ok := i.(sdk.Coin)
45 | if !ok {
46 | return errors.Wrapf(ErrInvalidParam, "%T", i)
47 | }
48 |
49 | return nil
50 | }
51 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta3/escrow.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3"
5 | )
6 |
7 | const (
8 | EscrowScope = "deployment"
9 | )
10 |
11 | func EscrowAccountForDeployment(id DeploymentID) etypes.AccountID {
12 | return etypes.AccountID{
13 | Scope: EscrowScope,
14 | XID: id.String(),
15 | }
16 | }
17 |
18 | func DeploymentIDFromEscrowAccount(id etypes.AccountID) (DeploymentID, bool) {
19 | if id.Scope != EscrowScope {
20 | return DeploymentID{}, false
21 | }
22 |
23 | did, err := ParseDeploymentID(id.XID)
24 | return did, err == nil
25 | }
26 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta3/group_validation.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "fmt"
5 | )
6 |
7 | // ValidateDeploymentGroups does validation for all deployment groups
8 | func ValidateDeploymentGroups(gspecs []GroupSpec) error {
9 | if len(gspecs) == 0 {
10 | return ErrInvalidGroups
11 | }
12 |
13 | names := make(map[string]int, len(gspecs)) // Used as set
14 | denom := ""
15 | for idx, group := range gspecs {
16 | // all must be same denomination
17 | if idx == 0 {
18 | denom = group.Price().Denom
19 | } else if group.Price().Denom != denom {
20 | return fmt.Errorf("inconsistent denomination: %v != %v", denom, group.Price().Denom)
21 | }
22 |
23 | if err := group.ValidateBasic(); err != nil {
24 | return err
25 | }
26 |
27 | if _, exists := names[group.GetName()]; exists {
28 | return fmt.Errorf("duplicate deployment group name %q", group.GetName())
29 | }
30 |
31 | names[group.GetName()] = 0 // Value stored does not matter
32 | }
33 |
34 | return nil
35 | }
36 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "deployment"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
14 | func DeploymentPrefix() []byte {
15 | return []byte{0x01}
16 | }
17 |
18 | func GroupPrefix() []byte {
19 | return []byte{0x02}
20 | }
21 |
--------------------------------------------------------------------------------
/go/node/deployment/v1beta3/resourcelimits.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | sdk "github.com/cosmos/cosmos-sdk/types"
5 | )
6 |
7 | type resourceLimits struct {
8 | cpu sdk.Int
9 | gpu sdk.Int
10 | memory sdk.Int
11 | storage []sdk.Int
12 | }
13 |
14 | func newLimits() resourceLimits {
15 | return resourceLimits{
16 | cpu: sdk.ZeroInt(),
17 | gpu: sdk.ZeroInt(),
18 | memory: sdk.ZeroInt(),
19 | }
20 | }
21 |
22 | func (u *resourceLimits) add(rhs resourceLimits) {
23 | u.cpu = u.cpu.Add(rhs.cpu)
24 | u.gpu = u.gpu.Add(rhs.gpu)
25 | u.memory = u.memory.Add(rhs.memory)
26 |
27 | // u.storage = u.storage.Add(rhs.storage)
28 | }
29 |
30 | func (u *resourceLimits) mul(count uint32) {
31 | u.cpu = u.cpu.MulRaw(int64(count))
32 | u.gpu = u.gpu.MulRaw(int64(count))
33 | u.memory = u.memory.MulRaw(int64(count))
34 |
35 | for i := range u.storage {
36 | u.storage[i] = u.storage[i].MulRaw(int64(count))
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta1/codec.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "github.com/cosmos/cosmos-sdk/codec"
5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
7 | sdk "github.com/cosmos/cosmos-sdk/types"
8 | )
9 |
10 | var (
11 | amino = codec.NewLegacyAmino()
12 |
13 | // ModuleCdc references the global x/provider module codec. Note, the codec should
14 | // ONLY be used in certain instances of tests and for JSON encoding as Amino is
15 | // still used for that purpose.
16 | //
17 | // The actual codec used for serialization should be provided to x/provider and
18 | // defined at the application level.
19 | ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
20 | )
21 |
22 | func init() {
23 | RegisterLegacyAminoCodec(amino)
24 | cryptocodec.RegisterCrypto(amino)
25 | amino.Seal()
26 | }
27 |
28 | // RegisterLegacyAminoCodec register concrete types on codec
29 | func RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {
30 | }
31 |
32 | // RegisterInterfaces registers the x/provider interfaces types with the interface registry
33 | func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
34 | registry.RegisterImplementations((*sdk.Msg)(nil))
35 | }
36 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta1/error.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | ErrInvalidPayment = errors.New("invalid payment")
9 | ErrInvalidAccountID = errors.New("invalid account ID")
10 | ErrInvalidAccount = errors.New("invalid account")
11 | )
12 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta1/key.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "escrow"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
14 | func AccountKeyPrefix() []byte {
15 | return []byte{0x01}
16 | }
17 |
18 | func PaymentKeyPrefix() []byte {
19 | return []byte{0x02}
20 | }
21 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta1/validate.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | sdk "github.com/cosmos/cosmos-sdk/types"
5 | "github.com/pkg/errors"
6 | )
7 |
8 | func (obj *AccountID) ValidateBasic() error {
9 | if len(obj.Scope) == 0 {
10 | return errors.Wrap(ErrInvalidAccountID, "empty scope")
11 | }
12 | if len(obj.XID) == 0 {
13 | return errors.Wrap(ErrInvalidAccountID, "empty scope")
14 | }
15 | return nil
16 | }
17 |
18 | func (obj *Account) ValidateBasic() error {
19 | if err := obj.ID.ValidateBasic(); err != nil {
20 | return errors.Wrapf(ErrInvalidAccount, "invalid account: id - %s", err)
21 | }
22 | if _, err := sdk.AccAddressFromBech32(obj.Owner); err != nil {
23 | return errors.Wrapf(ErrInvalidAccount, "invalid account: owner - %s", err)
24 | }
25 | if obj.State == AccountStateInvalid {
26 | return errors.Wrapf(ErrInvalidAccount, "invalid account: state - %s", obj.State)
27 | }
28 | return nil
29 | }
30 |
31 | func (obj *Payment) ValidateBasic() error {
32 | if err := obj.AccountID.ValidateBasic(); err != nil {
33 | return errors.Wrapf(ErrInvalidPayment, "invalid account id: %s", err)
34 | }
35 | if len(obj.PaymentID) == 0 {
36 | return errors.Wrap(ErrInvalidPayment, "empty payment id")
37 | }
38 | if obj.Rate.IsZero() {
39 | return errors.Wrap(ErrInvalidPayment, "payment rate zero")
40 | }
41 | if obj.State == PaymentStateInvalid {
42 | return errors.Wrap(ErrInvalidPayment, "invalid state")
43 | }
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta2/codec.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "github.com/cosmos/cosmos-sdk/codec"
5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
7 | sdk "github.com/cosmos/cosmos-sdk/types"
8 | )
9 |
10 | var (
11 | amino = codec.NewLegacyAmino()
12 |
13 | // ModuleCdc references the global x/provider module codec. Note, the codec should
14 | // ONLY be used in certain instances of tests and for JSON encoding as Amino is
15 | // still used for that purpose.
16 | //
17 | // The actual codec used for serialization should be provided to x/provider and
18 | // defined at the application level.
19 | ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
20 | )
21 |
22 | func init() {
23 | RegisterLegacyAminoCodec(amino)
24 | cryptocodec.RegisterCrypto(amino)
25 | amino.Seal()
26 | }
27 |
28 | // RegisterLegacyAminoCodec register concrete types on codec
29 | func RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {
30 | }
31 |
32 | // RegisterInterfaces registers the x/provider interfaces types with the interface registry
33 | func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
34 | registry.RegisterImplementations((*sdk.Msg)(nil))
35 | }
36 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta2/error.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | ErrAccountExists = errors.New("account exists")
9 | ErrAccountClosed = errors.New("account closed")
10 | ErrAccountNotFound = errors.New("account not found")
11 | ErrAccountOverdrawn = errors.New("account overdrawn")
12 | ErrInvalidDenomination = errors.New("invalid denomination")
13 | ErrPaymentExists = errors.New("payment exists")
14 | ErrPaymentClosed = errors.New("payment closed")
15 | ErrPaymentNotFound = errors.New("payment not found")
16 | ErrPaymentRateZero = errors.New("payment rate zero")
17 | ErrInvalidPayment = errors.New("invalid payment")
18 | ErrInvalidSettlement = errors.New("invalid settlement")
19 | ErrInvalidAccountID = errors.New("invalid account ID")
20 | ErrInvalidAccount = errors.New("invalid account")
21 | )
22 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "escrow"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
14 | func AccountKeyPrefix() []byte {
15 | return []byte{0x01}
16 | }
17 |
18 | func PaymentKeyPrefix() []byte {
19 | return []byte{0x02}
20 | }
21 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta3/account.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | func (m *Account) HasDepositor() bool {
4 | return m.Owner != m.Depositor
5 | }
6 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta3/codec.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "github.com/cosmos/cosmos-sdk/codec"
5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
7 | sdk "github.com/cosmos/cosmos-sdk/types"
8 | )
9 |
10 | var (
11 | amino = codec.NewLegacyAmino()
12 |
13 | // ModuleCdc references the global x/provider module codec. Note, the codec should
14 | // ONLY be used in certain instances of tests and for JSON encoding as Amino is
15 | // still used for that purpose.
16 | //
17 | // The actual codec used for serialization should be provided to x/provider and
18 | // defined at the application level.
19 | ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
20 | )
21 |
22 | func init() {
23 | RegisterLegacyAminoCodec(amino)
24 | cryptocodec.RegisterCrypto(amino)
25 | amino.Seal()
26 | }
27 |
28 | // RegisterLegacyAminoCodec register concrete types on codec
29 | func RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {
30 | }
31 |
32 | // RegisterInterfaces registers the x/provider interfaces types with the interface registry
33 | func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
34 | registry.RegisterImplementations((*sdk.Msg)(nil))
35 | }
36 |
--------------------------------------------------------------------------------
/go/node/escrow/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "escrow"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
14 | func AccountKeyPrefix() []byte {
15 | return []byte{0x01}
16 | }
17 |
18 | func PaymentKeyPrefix() []byte {
19 | return []byte{0x02}
20 | }
21 |
--------------------------------------------------------------------------------
/go/node/gov/v1beta3/codec.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "github.com/cosmos/cosmos-sdk/codec"
5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
7 | )
8 |
9 | var (
10 | amino = codec.NewLegacyAmino()
11 |
12 | // ModuleCdc references the global x/provider module codec. Note, the codec should
13 | // ONLY be used in certain instances of tests and for JSON encoding as Amino is
14 | // still used for that purpose.
15 | //
16 | // The actual codec used for serialization should be provided to x/provider and
17 | // defined at the application level.
18 | ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
19 | )
20 |
21 | func init() {
22 | cryptocodec.RegisterCrypto(amino)
23 | amino.Seal()
24 | }
25 |
--------------------------------------------------------------------------------
/go/node/gov/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the name of the module
5 | ModuleName = "agov"
6 |
7 | // StoreKey is the store key string for gov
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for gov
11 | RouterKey = ModuleName
12 |
13 | // QuerierRoute is the querier route for gov
14 | QuerierRoute = ModuleName
15 | )
16 |
--------------------------------------------------------------------------------
/go/node/inflation/v1beta2/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import "errors"
4 |
5 | var (
6 | // ErrInvalidParam indicates an invalid chain parameter
7 | ErrInvalidParam = errors.New("parameter invalid")
8 | // ErrInvalidInitialInflation indicates an invalid initial_inflation parameter
9 | ErrInvalidInitialInflation = errors.New("initial inflation parameter is invalid")
10 | // ErrInvalidVariance indicates an invalid variance parameter
11 | ErrInvalidVariance = errors.New("variance parameter is invalid")
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/inflation/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "inflation"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/inflation/v1beta3/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import "errors"
4 |
5 | var (
6 | // ErrInvalidParam indicates an invalid chain parameter
7 | ErrInvalidParam = errors.New("parameter invalid")
8 | // ErrInvalidInitialInflation indicates an invalid initial_inflation parameter
9 | ErrInvalidInitialInflation = errors.New("initial inflation parameter is invalid")
10 | // ErrInvalidVariance indicates an invalid variance parameter
11 | ErrInvalidVariance = errors.New("variance parameter is invalid")
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/inflation/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "inflation"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/market/v1beta1/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrEmptyProvider is the error when provider is empty
9 | ErrEmptyProvider = errors.New("empty provider")
10 | // ErrSameAccount is the error when owner and provider are the same account
11 | ErrSameAccount = errors.New("owner and provider are the same account")
12 | // ErrBidZeroPrice zero price
13 | ErrBidZeroPrice = errors.New("invalid bid: zero price")
14 | // ErrOrderActive order active
15 | ErrOrderActive = errors.New("order active")
16 | // ErrOrderClosed order closed
17 | ErrOrderClosed = errors.New("order closed")
18 | // ErrInvalidParam indicates an invalid chain parameter
19 | ErrInvalidParam = errors.New("parameter invalid")
20 | // ErrInvalidBid indicates an invalid chain parameter
21 | ErrInvalidBid = errors.New("unknown provider")
22 | )
23 |
--------------------------------------------------------------------------------
/go/node/market/v1beta1/escrow.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "fmt"
5 | "strconv"
6 | "strings"
7 |
8 | sdk "github.com/cosmos/cosmos-sdk/types"
9 |
10 | dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1"
11 | etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta1"
12 | )
13 |
14 | const (
15 | bidEscrowScope = "bid"
16 | )
17 |
18 | func EscrowAccountForBid(id BidID) etypes.AccountID {
19 | return etypes.AccountID{
20 | Scope: bidEscrowScope,
21 | XID: id.String(),
22 | }
23 | }
24 |
25 | func EscrowPaymentForLease(id LeaseID) string {
26 | return fmt.Sprintf("%v/%v/%s", id.GSeq, id.OSeq, id.Provider)
27 | }
28 |
29 | func LeaseIDFromEscrowAccount(id etypes.AccountID, pid string) (LeaseID, bool) {
30 | did, ok := dtypes.DeploymentIDFromEscrowAccount(id)
31 | if !ok {
32 | return LeaseID{}, false
33 | }
34 |
35 | parts := strings.Split(pid, "/")
36 | if len(parts) != 3 {
37 | return LeaseID{}, false
38 | }
39 |
40 | gseq, err := strconv.ParseUint(parts[0], 10, 32)
41 | if err != nil {
42 | return LeaseID{}, false
43 | }
44 |
45 | oseq, err := strconv.ParseUint(parts[1], 10, 32)
46 | if err != nil {
47 | return LeaseID{}, false
48 | }
49 |
50 | owner, err := sdk.AccAddressFromBech32(parts[2])
51 | if err != nil {
52 | return LeaseID{}, false
53 | }
54 |
55 | return MakeLeaseID(
56 | MakeBidID(
57 | MakeOrderID(
58 | dtypes.MakeGroupID(
59 | did, uint32(gseq)), uint32(oseq)), owner)), true
60 | }
61 |
--------------------------------------------------------------------------------
/go/node/market/v1beta1/key.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "market"
6 |
7 | // StoreKey is the store key string for market
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for market
11 | RouterKey = ModuleName
12 | )
13 |
14 | func OrderPrefix() []byte {
15 | return []byte{0x01, 0x00}
16 | }
17 |
18 | func BidPrefix() []byte {
19 | return []byte{0x02, 0x00}
20 | }
21 |
22 | func LeasePrefix() []byte {
23 | return []byte{0x03, 0x00}
24 | }
25 |
--------------------------------------------------------------------------------
/go/node/market/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "market"
6 |
7 | // StoreKey is the store key string for market
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for market
11 | RouterKey = ModuleName
12 | )
13 |
14 | func OrderPrefix() []byte {
15 | return []byte{0x01, 0x00}
16 | }
17 |
18 | func BidPrefix() []byte {
19 | return []byte{0x02, 0x00}
20 | }
21 |
22 | func LeasePrefix() []byte {
23 | return []byte{0x03, 0x00}
24 | }
25 |
26 | func SecondaryLeasePrefix() []byte {
27 | return []byte{0x03, 0x01}
28 | }
29 |
--------------------------------------------------------------------------------
/go/node/market/v1beta2/migrate/v1beta1.go:
--------------------------------------------------------------------------------
1 | package migrate
2 |
3 | import (
4 | "github.com/akash-network/akash-api/go/node/market/v1beta1"
5 | "github.com/akash-network/akash-api/go/node/market/v1beta2"
6 | )
7 |
8 | func LeaseIDToV1beta1(from v1beta1.LeaseID) v1beta2.LeaseID {
9 | return v1beta2.LeaseID{
10 | Owner: from.Owner,
11 | DSeq: from.DSeq,
12 | GSeq: from.GSeq,
13 | OSeq: from.OSeq,
14 | Provider: from.Provider,
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/market/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "market"
6 |
7 | // StoreKey is the store key string for market
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for market
11 | RouterKey = ModuleName
12 | )
13 |
14 | func OrderPrefix() []byte {
15 | return []byte{0x01, 0x00}
16 | }
17 |
18 | func BidPrefix() []byte {
19 | return []byte{0x02, 0x00}
20 | }
21 |
22 | func LeasePrefix() []byte {
23 | return []byte{0x03, 0x00}
24 | }
25 |
26 | func SecondaryLeasePrefix() []byte {
27 | return []byte{0x03, 0x01}
28 | }
29 |
--------------------------------------------------------------------------------
/go/node/market/v1beta3/migrate/v1beta2.go:
--------------------------------------------------------------------------------
1 | package migrate
2 |
3 | import (
4 | "github.com/akash-network/akash-api/go/node/market/v1beta2"
5 | "github.com/akash-network/akash-api/go/node/market/v1beta3"
6 | )
7 |
8 | func LeaseIDFromV1beta2(from v1beta2.LeaseID) v1beta3.LeaseID {
9 | return v1beta3.LeaseID{
10 | Owner: from.Owner,
11 | DSeq: from.DSeq,
12 | GSeq: from.GSeq,
13 | OSeq: from.OSeq,
14 | Provider: from.Provider,
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/go/node/market/v1beta4/bid_test.go:
--------------------------------------------------------------------------------
1 | package v1beta4_test
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/require"
7 |
8 | "github.com/akash-network/akash-api/go/node/market/v1beta4"
9 | testutil "github.com/akash-network/akash-api/go/testutil/v1beta3"
10 | )
11 |
12 | func TestBid_GSpecMatch_Valid(t *testing.T) {
13 | gspec := testutil.GroupSpec(t)
14 |
15 | rOffer := v1beta4.ResourceOfferFromRU(gspec.Resources)
16 |
17 | require.True(t, rOffer.MatchGSpec(gspec))
18 | }
19 |
20 | func TestBid_GSpecMatch_Valid2(t *testing.T) {
21 | gspec := testutil.GroupSpec(t)
22 |
23 | if len(gspec.Resources) == 1 {
24 | rl := testutil.ResourcesList(t, 2)
25 | rl[0].Count = 4
26 | gspec.Resources = append(gspec.Resources, rl...)
27 | }
28 |
29 | rOffer := v1beta4.ResourceOfferFromRU(gspec.Resources)
30 |
31 | require.True(t, rOffer.MatchGSpec(gspec))
32 | }
33 |
34 | func TestBid_GSpecMatch_InvalidCount(t *testing.T) {
35 | gspec := testutil.GroupSpec(t)
36 |
37 | if len(gspec.Resources) == 1 {
38 | rl := testutil.ResourcesList(t, 2)
39 | gspec.Resources = append(gspec.Resources, rl...)
40 | }
41 |
42 | rOffer := v1beta4.ResourceOfferFromRU(gspec.Resources)
43 |
44 | gspec.Resources[0].Count = 2
45 |
46 | require.False(t, rOffer.MatchGSpec(gspec))
47 | }
48 |
--------------------------------------------------------------------------------
/go/node/market/v1beta4/key.go:
--------------------------------------------------------------------------------
1 | package v1beta4
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "market"
6 |
7 | // StoreKey is the store key string for market
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for market
11 | RouterKey = ModuleName
12 | )
13 |
14 | func OrderPrefix() []byte {
15 | return []byte{0x01, 0x00}
16 | }
17 |
18 | func BidPrefix() []byte {
19 | return []byte{0x02, 0x00}
20 | }
21 |
22 | func LeasePrefix() []byte {
23 | return []byte{0x03, 0x00}
24 | }
25 |
26 | func SecondaryLeasePrefix() []byte {
27 | return []byte{0x03, 0x01}
28 | }
29 |
--------------------------------------------------------------------------------
/go/node/market/v1beta4/migrate/v1beta3.go:
--------------------------------------------------------------------------------
1 | package migrate
2 |
3 | import (
4 | "github.com/akash-network/akash-api/go/node/market/v1beta3"
5 | "github.com/akash-network/akash-api/go/node/market/v1beta4"
6 | )
7 |
8 | func BidStateFromV1beta3(from v1beta3.Bid_State) v1beta4.Bid_State {
9 | return v1beta4.Bid_State(from)
10 | }
11 |
12 | func LeaseIDFromV1beta3(from v1beta3.LeaseID) v1beta4.LeaseID {
13 | return v1beta4.LeaseID{
14 | Owner: from.Owner,
15 | DSeq: from.DSeq,
16 | GSeq: from.GSeq,
17 | OSeq: from.OSeq,
18 | Provider: from.Provider,
19 | }
20 | }
21 |
22 | func BidIDFromV1beta3(from v1beta3.BidID) v1beta4.BidID {
23 | return v1beta4.BidID{
24 | Owner: from.Owner,
25 | DSeq: from.DSeq,
26 | GSeq: from.GSeq,
27 | OSeq: from.OSeq,
28 | Provider: from.Provider,
29 | }
30 | }
31 |
32 | func BidFromV1beta3(from v1beta3.Bid) v1beta4.Bid {
33 | return v1beta4.Bid{
34 | BidID: BidIDFromV1beta3(from.BidID),
35 | State: BidStateFromV1beta3(from.State),
36 | Price: from.Price,
37 | CreatedAt: from.CreatedAt,
38 | ResourcesOffer: v1beta4.ResourcesOffer{},
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/go/node/provider/v1beta1/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrInvalidProviderURI register error code for invalid provider uri
9 | ErrInvalidProviderURI = errors.New("invalid provider: invalid host uri")
10 |
11 | // ErrNotAbsProviderURI register error code for not absolute provider uri
12 | ErrNotAbsProviderURI = errors.New("invalid provider: not absolute host uri")
13 |
14 | // ErrInvalidInfoWebsite register error code for invalid info website
15 | ErrInvalidInfoWebsite = errors.New("invalid provider: invalid info website")
16 | )
17 |
--------------------------------------------------------------------------------
/go/node/provider/v1beta1/key.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "provider"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/provider/v1beta2/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrInvalidProviderURI register error code for invalid provider uri
9 | ErrInvalidProviderURI = errors.New("invalid provider: invalid host uri")
10 |
11 | // ErrNotAbsProviderURI register error code for not absolute provider uri
12 | ErrNotAbsProviderURI = errors.New("invalid provider: not absolute host uri")
13 |
14 | // ErrProviderNotFound provider not found
15 | ErrProviderNotFound = errors.New("invalid provider: address not found")
16 |
17 | // ErrProviderExists provider already exists
18 | ErrProviderExists = errors.New("invalid provider: already exists")
19 |
20 | // ErrInvalidAddress invalid provider address
21 | ErrInvalidAddress = errors.New("invalid address")
22 |
23 | // ErrAttributes error code for provider attribute problems
24 | ErrAttributes = errors.New("attribute specification error")
25 |
26 | // ErrIncompatibleAttributes error code for attributes update
27 | ErrIncompatibleAttributes = errors.New("attributes cannot be changed")
28 |
29 | // ErrInvalidInfoWebsite register error code for invalid info website
30 | ErrInvalidInfoWebsite = errors.New("invalid provider: invalid info website")
31 | )
32 |
--------------------------------------------------------------------------------
/go/node/provider/v1beta2/key.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "provider"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/provider/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "provider"
6 |
7 | // StoreKey is the store key string for provider
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for provider
11 | RouterKey = ModuleName
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/staking/v1beta3/codec.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "github.com/cosmos/cosmos-sdk/codec"
5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
7 | )
8 |
9 | var (
10 | amino = codec.NewLegacyAmino()
11 |
12 | // ModuleCdc references the global x/provider module codec. Note, the codec should
13 | // ONLY be used in certain instances of tests and for JSON encoding as Amino is
14 | // still used for that purpose.
15 | //
16 | // The actual codec used for serialization should be provided to x/provider and
17 | // defined at the application level.
18 | ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
19 | )
20 |
21 | func init() {
22 | cryptocodec.RegisterCrypto(amino)
23 | amino.Seal()
24 | }
25 |
--------------------------------------------------------------------------------
/go/node/staking/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the name of the module
5 | ModuleName = "astaking"
6 |
7 | // StoreKey is the store key string for gov
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for gov
11 | RouterKey = ModuleName
12 |
13 | // QuerierRoute is the querier route for gov
14 | QuerierRoute = ModuleName
15 | )
16 |
--------------------------------------------------------------------------------
/go/node/take/v1beta3/codec.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "github.com/cosmos/cosmos-sdk/codec"
5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
6 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
7 | )
8 |
9 | var (
10 | amino = codec.NewLegacyAmino()
11 |
12 | // ModuleCdc references the global x/deployment module codec. Note, the codec should
13 | // ONLY be used in certain instances of tests and for JSON encoding as Amino is
14 | // still used for that purpose.
15 | //
16 | // The actual codec used for serialization should be provided to x/deployment and
17 | // defined at the application level.
18 | ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
19 | )
20 |
21 | func init() {
22 | RegisterLegacyAminoCodec(amino)
23 | cryptocodec.RegisterCrypto(amino)
24 | amino.Seal()
25 | }
26 |
27 | func RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {
28 | }
29 |
30 | // RegisterInterfaces registers the x/deployment interfaces types with the interface registry
31 | func RegisterInterfaces(_ cdctypes.InterfaceRegistry) {
32 | }
33 |
--------------------------------------------------------------------------------
/go/node/take/v1beta3/denom_take_rate.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "sort"
5 | )
6 |
7 | type DenomTakeRates []DenomTakeRate
8 |
9 | var _ sort.Interface = (*DenomTakeRates)(nil)
10 |
11 | func (u DenomTakeRates) Len() int {
12 | return len(u)
13 | }
14 |
15 | func (u DenomTakeRates) Swap(i, j int) {
16 | u[i], u[j] = u[j], u[i]
17 | }
18 |
19 | func (u DenomTakeRates) Less(i, j int) bool {
20 | return u[i].Denom < u[j].Denom
21 | }
22 |
--------------------------------------------------------------------------------
/go/node/take/v1beta3/errors.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
5 | )
6 |
7 | const (
8 | errInvalidParam uint32 = iota + 1
9 | )
10 |
11 | var (
12 | // ErrInvalidParam indicates an invalid chain parameter
13 | ErrInvalidParam = sdkerrors.Register(ModuleName, errInvalidParam, "parameter invalid")
14 | )
15 |
--------------------------------------------------------------------------------
/go/node/take/v1beta3/key.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | const (
4 | // ModuleName is the module name constant used in many places
5 | ModuleName = "take"
6 |
7 | // StoreKey is the store key string for deployment
8 | StoreKey = ModuleName
9 |
10 | // RouterKey is the message route for deployment
11 | RouterKey = ModuleName
12 | )
13 |
--------------------------------------------------------------------------------
/go/node/types/constants/constants.go:
--------------------------------------------------------------------------------
1 | package constants
2 |
3 | const (
4 | DefaultMaxGroupVolumes = 4
5 | )
6 |
--------------------------------------------------------------------------------
/go/node/types/unit/unit.go:
--------------------------------------------------------------------------------
1 | package unit
2 |
3 | const (
4 | // K equals to 1000
5 | K = 1000
6 | // Ki equals to 1024
7 | Ki = 1024
8 |
9 | // M equals to square of K
10 | M = K * K
11 | // Mi equals to square of Ki
12 | Mi = Ki * Ki
13 |
14 | // G equals to M times of K
15 | G = M * K
16 | // Gi equals to Mi times of Ki
17 | Gi = Mi * Ki
18 |
19 | // T equals to G times of K
20 | T = G * K
21 | // Ti equals to Gi times of Ki
22 | Ti = Gi * Ki
23 |
24 | // P equals to T times of K
25 | P = T * K
26 | // Pi equals to Ti times of Ki
27 | Pi = Ti * Ki
28 |
29 | // E equals to P times of K
30 | E = P * K
31 | // Ei equals to Pi times of Ki
32 | Ei = Pi * Ki
33 | )
34 |
--------------------------------------------------------------------------------
/go/node/types/v1beta1/requirements.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "gopkg.in/yaml.v3"
5 | )
6 |
7 | func (m *SignedBy) String() string {
8 | res, _ := yaml.Marshal(m)
9 | return string(res)
10 | }
11 |
12 | func (m *PlacementRequirements) String() string {
13 | res, _ := yaml.Marshal(m)
14 | return string(res)
15 | }
16 |
--------------------------------------------------------------------------------
/go/node/types/v1beta1/resourcevalue_test.go:
--------------------------------------------------------------------------------
1 | package v1beta1
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/require"
7 | )
8 |
9 | func TestValidSum(t *testing.T) {
10 | val1 := NewResourceValue(1)
11 | val2 := NewResourceValue(1)
12 |
13 | res, err := val1.add(val2)
14 | require.NoError(t, err)
15 | require.Equal(t, uint64(2), res.Value())
16 | }
17 |
18 | func TestSubToNegative(t *testing.T) {
19 | val1 := NewResourceValue(1)
20 | val2 := NewResourceValue(2)
21 |
22 | _, err := val1.sub(val2)
23 | require.Error(t, err)
24 | }
25 |
26 | func TestResourceValueSubIsIdempotent(t *testing.T) {
27 | val1 := NewResourceValue(100)
28 | before := val1.String()
29 | val2 := NewResourceValue(1)
30 |
31 | _, err := val1.sub(val2)
32 | require.NoError(t, err)
33 | after := val1.String()
34 |
35 | require.Equal(t, before, after)
36 | }
37 |
38 | func TestCPUSubIsNotIdempotent(t *testing.T) {
39 | val1 := &CPU{
40 | Units: NewResourceValue(100),
41 | Attributes: nil,
42 | }
43 |
44 | before := val1.String()
45 | val2 := &CPU{
46 | Units: NewResourceValue(1),
47 | Attributes: nil,
48 | }
49 |
50 | err := val1.sub(val2)
51 | require.NoError(t, err)
52 | after := val1.String()
53 |
54 | require.NotEqual(t, before, after)
55 | }
56 |
--------------------------------------------------------------------------------
/go/node/types/v1beta2/endpoint.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | type Endpoints []Endpoint
4 |
5 | func (m Endpoints) Dup() Endpoints {
6 | res := make(Endpoints, len(m))
7 |
8 | copy(res, m)
9 |
10 | return res
11 | }
12 |
--------------------------------------------------------------------------------
/go/node/types/v1beta2/requirements.go:
--------------------------------------------------------------------------------
1 | package v1beta2
2 |
3 | import (
4 | "gopkg.in/yaml.v3"
5 | )
6 |
7 | func (m *SignedBy) String() string {
8 | res, _ := yaml.Marshal(m)
9 | return string(res)
10 | }
11 |
12 | func (m *PlacementRequirements) String() string {
13 | res, _ := yaml.Marshal(m)
14 | return string(res)
15 | }
16 |
--------------------------------------------------------------------------------
/go/node/types/v1beta3/endpoint.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "sort"
5 | )
6 |
7 | type Endpoints []Endpoint
8 |
9 | var _ sort.Interface = (*Endpoints)(nil)
10 |
11 | func (u Endpoints) Dup() Endpoints {
12 | res := make(Endpoints, len(u))
13 |
14 | copy(res, u)
15 |
16 | return res
17 | }
18 |
19 | func (u Endpoints) Len() int {
20 | return len(u)
21 | }
22 |
23 | func (u Endpoints) Swap(i, j int) {
24 | u[i], u[j] = u[j], u[i]
25 | }
26 |
27 | func (u Endpoints) Less(i, j int) bool {
28 | return u[i].SequenceNumber < u[j].SequenceNumber
29 | }
30 |
--------------------------------------------------------------------------------
/go/node/types/v1beta3/requirements.go:
--------------------------------------------------------------------------------
1 | package v1beta3
2 |
3 | import (
4 | "gopkg.in/yaml.v3"
5 | )
6 |
7 | func (m *SignedBy) String() string {
8 | res, _ := yaml.Marshal(m)
9 | return string(res)
10 | }
11 |
12 | func (m *PlacementRequirements) String() string {
13 | res, _ := yaml.Marshal(m)
14 | return string(res)
15 | }
16 |
--------------------------------------------------------------------------------
/go/provider/client/constants.go:
--------------------------------------------------------------------------------
1 | package rest
2 |
3 | const (
4 | LeaseShellCodeStdout = 100
5 | LeaseShellCodeStderr = 101
6 | LeaseShellCodeResult = 102
7 | LeaseShellCodeFailure = 103
8 | LeaseShellCodeStdin = 104
9 | LeaseShellCodeTerminalResize = 105
10 | )
11 |
--------------------------------------------------------------------------------
/go/provider/v1/status.go:
--------------------------------------------------------------------------------
1 | package v1
2 |
3 | import (
4 | "k8s.io/apimachinery/pkg/api/resource"
5 | )
6 |
7 | type Storage map[string]*resource.Quantity
8 |
--------------------------------------------------------------------------------
/go/sdkutil/address.go:
--------------------------------------------------------------------------------
1 | package sdkutil
2 |
3 | import sdk "github.com/cosmos/cosmos-sdk/types"
4 |
5 | // MustAccAddressFromBech32 creates an AccAddress from a Bech32 string.
6 | // It panics if there is an error.
7 | func MustAccAddressFromBech32(address string) sdk.AccAddress {
8 | addr, err := sdk.AccAddressFromBech32(address)
9 | if err != nil {
10 | panic(err)
11 | }
12 | return addr
13 | }
14 |
--------------------------------------------------------------------------------
/go/sdkutil/config.go:
--------------------------------------------------------------------------------
1 | package sdkutil
2 |
3 | import (
4 | sdk "github.com/cosmos/cosmos-sdk/types"
5 | )
6 |
7 | // init atm SDK configs is instantiated with const values, so it sealed within init below
8 | // it helps for all tests as well as packages relying on this api to always have the same config
9 | // as soon as sdkutil is imported
10 | func init() {
11 | config := sdk.GetConfig()
12 | config.SetBech32PrefixForAccount(Bech32PrefixAccAddr, Bech32PrefixAccPub)
13 | config.SetBech32PrefixForValidator(Bech32PrefixValAddr, Bech32PrefixValPub)
14 | config.SetBech32PrefixForConsensusNode(Bech32PrefixConsAddr, Bech32PrefixConsPub)
15 | config.Seal()
16 | }
17 |
--------------------------------------------------------------------------------
/go/sdkutil/init.go:
--------------------------------------------------------------------------------
1 | package sdkutil
2 |
3 | const (
4 | Bech32PrefixAccAddr = "akash"
5 | Bech32PrefixAccPub = "akashpub"
6 |
7 | Bech32PrefixValAddr = "akashvaloper"
8 | Bech32PrefixValPub = "akashvaloperpub"
9 |
10 | Bech32PrefixConsAddr = "akashvalcons"
11 | Bech32PrefixConsPub = "akashvalconspub"
12 | )
13 |
--------------------------------------------------------------------------------
/go/testutil/log.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "sync"
5 | "testing"
6 |
7 | "github.com/tendermint/tendermint/libs/log"
8 | )
9 |
10 | func Logger(t testing.TB) log.Logger {
11 | return log.NewTMLogger(&testWriter{TB: t})
12 | }
13 |
14 | // Source: https://git.sr.ht/~samwhited/testlog/tree/b1b3e8e82fd6990e91ce9d0fbcbe69ac2d9b1f98/testlog.go
15 | type testWriter struct {
16 | testing.TB
17 | lock sync.Mutex
18 | }
19 |
20 | func (tw *testWriter) Write(p []byte) (int, error) {
21 | defer tw.lock.Unlock()
22 | tw.lock.Lock()
23 |
24 | tw.Helper()
25 | tw.Logf("%s", p)
26 | return len(p), nil
27 | }
28 |
--------------------------------------------------------------------------------
/go/testutil/sdk.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | sdk "github.com/cosmos/cosmos-sdk/types"
7 | )
8 |
9 | func Coin(t testing.TB) sdk.Coin {
10 | t.Helper()
11 | return sdk.NewCoin("testcoin", sdk.NewInt(int64(RandRangeInt(1, 1000)))) // nolint: gosec
12 | }
13 |
14 | func DecCoin(t testing.TB) sdk.DecCoin {
15 | t.Helper()
16 | return sdk.NewDecCoin("testcoin", sdk.NewInt(int64(RandRangeInt(1, 1000)))) // nolint: gosec
17 | }
18 |
19 | // AkashCoinRandom provides simple interface to the Akash sdk.Coin type.
20 | func AkashCoinRandom(t testing.TB) sdk.Coin {
21 | t.Helper()
22 | amt := sdk.NewInt(int64(RandRangeInt(1, 1000)))
23 | return sdk.NewCoin(CoinDenom, amt)
24 | }
25 |
26 | // AkashCoin provides simple interface to the Akash sdk.Coin type.
27 | func AkashCoin(t testing.TB, amount int64) sdk.Coin {
28 | t.Helper()
29 | amt := sdk.NewInt(amount)
30 | return sdk.NewCoin(CoinDenom, amt)
31 | }
32 |
33 | func AkashDecCoin(t testing.TB, amount int64) sdk.DecCoin {
34 | t.Helper()
35 | amt := sdk.NewInt(amount)
36 | return sdk.NewDecCoin(CoinDenom, amt)
37 | }
38 |
39 | func AkashDecCoinRandom(t testing.TB) sdk.DecCoin {
40 | t.Helper()
41 | amt := sdk.NewInt(int64(RandRangeInt(1, 1000)))
42 | return sdk.NewDecCoin(CoinDenom, amt)
43 | }
44 |
--------------------------------------------------------------------------------
/go/testutil/types.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "math/rand"
5 | )
6 |
7 | func RandRangeInt(minVal, maxVal int) int {
8 | return rand.Intn(maxVal-minVal) + minVal // nolint: gosec
9 | }
10 |
11 | func RandRangeUint(minVal, maxVal uint) uint {
12 | val := rand.Uint64() // nolint: gosec
13 | val %= uint64(maxVal - minVal)
14 | val += uint64(minVal)
15 | return uint(val)
16 | }
17 |
18 | func RandRangeUint64(minVal, maxVal uint64) uint64 {
19 | val := rand.Uint64() // nolint: gosec
20 | val %= maxVal - minVal
21 | val += minVal
22 | return val
23 | }
24 |
--------------------------------------------------------------------------------
/go/testutil/v1beta1/event.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | sdk "github.com/cosmos/cosmos-sdk/types"
7 | "github.com/stretchr/testify/require"
8 | abci "github.com/tendermint/tendermint/abci/types"
9 |
10 | dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1"
11 | ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta1"
12 | "github.com/akash-network/akash-api/go/sdkutil"
13 | )
14 |
15 | func ParseEvent(t testing.TB, events []abci.Event) sdkutil.Event {
16 | t.Helper()
17 |
18 | require.Equal(t, 1, len(events))
19 |
20 | sev := sdk.StringifyEvent(events[0])
21 | ev, err := sdkutil.ParseEvent(sev)
22 |
23 | require.NoError(t, err)
24 |
25 | return ev
26 | }
27 |
28 | func ParseDeploymentEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent {
29 | t.Helper()
30 |
31 | uev := ParseEvent(t, events)
32 |
33 | iev, err := dtypes.ParseEvent(uev)
34 | require.NoError(t, err)
35 |
36 | return iev
37 | }
38 |
39 | func ParseProviderEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent {
40 | t.Helper()
41 |
42 | uev := ParseEvent(t, events)
43 |
44 | iev, err := ptypes.ParseEvent(uev)
45 | require.NoError(t, err)
46 |
47 | return iev
48 | }
49 |
--------------------------------------------------------------------------------
/go/testutil/v1beta1/provider.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta1"
7 | "github.com/akash-network/akash-api/go/testutil"
8 | )
9 |
10 | func Provider(t testing.TB) ptypes.Provider {
11 | t.Helper()
12 |
13 | return ptypes.Provider{
14 | Owner: AccAddress(t).String(),
15 | HostURI: testutil.Hostname(t),
16 | Attributes: Attributes(t),
17 | Info: ptypes.ProviderInfo{
18 | EMail: "test@example.com",
19 | Website: ProviderHostname(t),
20 | },
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/go/testutil/v1beta1/types.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | types "github.com/akash-network/akash-api/go/node/types/v1beta1"
7 | )
8 |
9 | func ResourceUnits(_ testing.TB) types.ResourceUnits {
10 | return types.ResourceUnits{
11 | CPU: &types.CPU{
12 | Units: types.NewResourceValue(uint64(RandCPUUnits())),
13 | },
14 | Memory: &types.Memory{
15 | Quantity: types.NewResourceValue(RandMemoryQuantity()),
16 | },
17 | Storage: &types.Storage{
18 | Quantity: types.NewResourceValue(RandStorageQuantity()),
19 | },
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/go/testutil/v1beta2/provider.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta2"
7 | "github.com/akash-network/akash-api/go/testutil"
8 | )
9 |
10 | func Provider(t testing.TB) ptypes.Provider {
11 | t.Helper()
12 |
13 | return ptypes.Provider{
14 | Owner: AccAddress(t).String(),
15 | HostURI: testutil.Hostname(t),
16 | Attributes: Attributes(t),
17 | Info: ptypes.ProviderInfo{
18 | EMail: "test@example.com",
19 | Website: ProviderHostname(t),
20 | },
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/go/testutil/v1beta2/types.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | types "github.com/akash-network/akash-api/go/node/types/v1beta2"
7 | )
8 |
9 | func ResourceUnits(_ testing.TB) types.ResourceUnits {
10 | return types.ResourceUnits{
11 | CPU: &types.CPU{
12 | Units: types.NewResourceValue(uint64(RandCPUUnits())),
13 | },
14 | Memory: &types.Memory{
15 | Quantity: types.NewResourceValue(RandMemoryQuantity()),
16 | },
17 | Storage: types.Volumes{
18 | types.Storage{
19 | Quantity: types.NewResourceValue(RandStorageQuantity()),
20 | },
21 | },
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/go/testutil/v1beta3/provider.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3"
7 | "github.com/akash-network/akash-api/go/testutil"
8 | )
9 |
10 | func Provider(t testing.TB) ptypes.Provider {
11 | t.Helper()
12 |
13 | return ptypes.Provider{
14 | Owner: AccAddress(t).String(),
15 | HostURI: testutil.Hostname(t),
16 | Attributes: Attributes(t),
17 | Info: ptypes.ProviderInfo{
18 | EMail: "test@example.com",
19 | Website: ProviderHostname(t),
20 | },
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/go/testutil/v1beta3/types.go:
--------------------------------------------------------------------------------
1 | package testutil
2 |
3 | import (
4 | "testing"
5 |
6 | types "github.com/akash-network/akash-api/go/node/types/v1beta3"
7 | )
8 |
9 | func Resources(_ testing.TB) types.Resources {
10 | return types.Resources{
11 | ID: 1,
12 | CPU: &types.CPU{
13 | Units: types.NewResourceValue(uint64(RandCPUUnits())),
14 | },
15 | Memory: &types.Memory{
16 | Quantity: types.NewResourceValue(RandMemoryQuantity()),
17 | },
18 | GPU: &types.GPU{
19 | Units: types.NewResourceValue(uint64(RandGPUUnits())),
20 | },
21 | Storage: types.Volumes{
22 | types.Storage{
23 | Quantity: types.NewResourceValue(RandStorageQuantity()),
24 | },
25 | },
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/go/util/ctxlog/ctxlog_test.go:
--------------------------------------------------------------------------------
1 | package ctxlog
2 |
--------------------------------------------------------------------------------
/go/util/jwt/schema.go:
--------------------------------------------------------------------------------
1 | package jwt
2 |
3 | import (
4 | "github.com/xeipuuv/gojsonschema"
5 |
6 | "github.com/akash-network/akash-api/specs"
7 | )
8 |
9 |
10 | var (
11 | schemaLoader *gojsonschema.Schema
12 | )
13 |
14 | func init() {
15 | content, err := specs.GetSpecFile("jwt-schema.json")
16 | if err != nil {
17 | panic(err)
18 | }
19 |
20 | sl := gojsonschema.NewSchemaLoader()
21 |
22 | loader := gojsonschema.NewStringLoader(string(content))
23 | schemaLoader, err = sl.Compile(loader)
24 | if err != nil {
25 | panic(err)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/go/util/wsutil/wsutil.go:
--------------------------------------------------------------------------------
1 | package wsutil
2 |
3 | import (
4 | "bytes"
5 | "github.com/gorilla/websocket"
6 | "io"
7 | "sync"
8 | )
9 |
10 | // This type exposes the single method that this wrapper uses
11 | type wrappedConnection interface {
12 | WriteMessage(int, []byte) error
13 | }
14 |
15 | type wsWriterWrapper struct {
16 | connection wrappedConnection
17 |
18 | id byte
19 | buf bytes.Buffer
20 | l sync.Locker
21 | }
22 |
23 | func NewWsWriterWrapper(conn wrappedConnection, id byte, l sync.Locker) io.Writer {
24 | return &wsWriterWrapper{
25 | connection: conn,
26 | l: l,
27 | id: id,
28 | }
29 | }
30 |
31 | func (wsw *wsWriterWrapper) Write(data []byte) (int, error) {
32 | myBuf := &wsw.buf
33 | myBuf.Reset()
34 | _ = myBuf.WriteByte(wsw.id)
35 | _, _ = myBuf.Write(data)
36 |
37 | wsw.l.Lock()
38 | defer wsw.l.Unlock()
39 | err := wsw.connection.WriteMessage(websocket.BinaryMessage, myBuf.Bytes())
40 |
41 | return len(data), err
42 | }
43 |
--------------------------------------------------------------------------------
/go/util/wsutil/wsutil_test.go:
--------------------------------------------------------------------------------
1 | package wsutil
2 |
3 | import (
4 | "github.com/gorilla/websocket"
5 | "github.com/stretchr/testify/require"
6 | "io"
7 | "sync"
8 | "testing"
9 | )
10 |
11 | type dummyConnection struct {
12 | messageType int
13 | data []byte
14 |
15 | returns error
16 | }
17 |
18 | func (dc *dummyConnection) WriteMessage(mt int, data []byte) error {
19 | dc.messageType = mt
20 | dc.data = data
21 | return dc.returns
22 | }
23 |
24 | func TestWebsocketWriterWrapperWritesPrefix(t *testing.T) {
25 | const testID = 0xab
26 | l := &sync.Mutex{}
27 | conn := &dummyConnection{}
28 |
29 | wrapper := NewWsWriterWrapper(conn, testID, l)
30 |
31 | n, err := wrapper.Write([]byte{0x1, 0x2, 0x3})
32 | require.NoError(t, err)
33 | require.Equal(t, n, 3)
34 |
35 | require.Equal(t, conn.messageType, websocket.BinaryMessage)
36 | require.Equal(t, conn.data, []byte{testID, 0x1, 0x2, 0x3})
37 | }
38 |
39 | func TestWebsocketWriterWrapperReturnsError(t *testing.T) {
40 | const testID = 0xab
41 | l := &sync.Mutex{}
42 | conn := &dummyConnection{}
43 | conn.returns = io.EOF // Any error works
44 |
45 | wrapper := NewWsWriterWrapper(conn, testID, l)
46 |
47 | _, err := wrapper.Write([]byte{0x1, 0x2, 0x3})
48 | require.Error(t, err)
49 | require.Equal(t, io.EOF, err)
50 | }
51 |
--------------------------------------------------------------------------------
/make/code-style.mk:
--------------------------------------------------------------------------------
1 | MODULES ?= go \
2 | ts
3 |
4 | .PHONY: code-style-staged
5 | code-style-staged: $(patsubst %, code-style-staged-%,$(MODULES))
6 |
7 | .PHONY: code-style-staged-ts
8 | code-style-staged-ts: $(AKASH_TS_NODE_MODULES)
9 | ts/node_modules/.bin/lint-staged --cwd ts
10 |
11 | .PHONY: code-style-staged-go
12 | code-style-staged-go:
13 | script/gofmt-staged.sh
14 |
--------------------------------------------------------------------------------
/make/codegen.mk:
--------------------------------------------------------------------------------
1 | .PHONY: proto-gen
2 | ifeq ($(PROTO_LEGACY), true)
3 | proto-gen: modvendor $(PROTOC) $(PROTOC_GEN_GOCOSMOS) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_DOC) $(AKASH_TS_NODE_MODULES)
4 | ./script/protocgen-legacy.sh
5 | else
6 | proto-gen: modvendor gogoproto $(BUF) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO)
7 | ./script/protocgen.sh
8 | endif
9 |
10 | .PHONY: proto-gen-swagger
11 | proto-gen-swagger: modvendor $(BUF) $(PROTOC_GEN_SWAGGER) $(SWAGGER_COMBINE)
12 | ./script/protoc-gen-swagger.sh
13 |
14 | mocks: $(MOCKERY)
15 | $(GO) generate ./...
16 |
17 | .PHONY: codegen
18 | codegen: proto-gen proto-gen-swagger mocks
19 |
20 | .PHONY: changelog
21 | changelog: $(GIT_CHGLOG)
22 | @echo "generating changelog to changelog"
23 | ./script/changelog.sh $(shell git describe --tags --abbrev=0) changelog.md
24 |
25 |
--------------------------------------------------------------------------------
/make/lint.mk:
--------------------------------------------------------------------------------
1 | SUB_LINT ?= go \
2 | proto \
3 | shell \
4 | ts
5 |
6 | BUF_LINT_PACKAGES ?= provider \
7 | node
8 |
9 | .PHONY: lint-go
10 | lint-go: $(GOLANGCI_LINT)
11 | $(GOLANGCI_LINT_RUN) ./... --issues-exit-code=0 --timeout=20m
12 |
13 | .PHONY: lint-go-%
14 | lint-go-%: $(GOLANGCI_LINT)
15 | $(GOLINT) $*
16 |
17 | .PHONY: lint-proto-%
18 | lint-proto-%:
19 | $(BUF) lint proto/$*
20 |
21 | .PHONY: lint-proto
22 | lint-proto: $(BUF) $(patsubst %, lint-proto-%,$(BUF_LINT_PACKAGES))
23 |
24 | .PHONY: lint-shell
25 | lint-shell:
26 | docker run --rm \
27 | --volume $(PWD):/shellcheck \
28 | --entrypoint sh \
29 | koalaman/shellcheck-alpine:stable \
30 | -x /shellcheck/script/shellcheck.sh
31 |
32 | .PHONY: lint
33 | lint: $(patsubst %, lint-%,$(SUB_LINT))
34 |
35 | .PHONY: check-breaking
36 | proto-check-breaking: $(BUF)
37 | $(BUF) breaking --against '.git#branch=main'
38 |
39 | .PHONY: format
40 | proto-format:
41 | $(DOCKER_CLANG) find ./ ! -path "./vendor/*" -name *.proto -exec clang-format -i {} \;
42 |
43 | .PHONY: lint-ts
44 | lint-ts: $(AKASH_TS_NODE_MODULES)
45 | cd ts && npm run lint;
46 |
--------------------------------------------------------------------------------
/make/mod.mk:
--------------------------------------------------------------------------------
1 | # Golang modules and vendoring
2 |
3 | define VENDOR_BUF
4 | version: v1
5 | lint:
6 | use:
7 | - DEFAULT
8 | ignore:
9 | - ibc
10 | - cosmos
11 | - tendermint
12 | - gogoproto
13 | - cosmos_proto
14 | - google
15 | - confio
16 | - k8s.io
17 | endef
18 |
19 | .PHONY: deps-tidy
20 | deps-tidy:
21 | $(GO) mod tidy
22 |
23 | .PHONY: deps-vendor
24 | deps-vendor:
25 | go mod vendor
26 |
27 | .PHONY: modsensure
28 | modsensure: deps-tidy deps-vendor
29 |
30 | .PHONY: modvendor
31 | modvendor: export VENDOR_BUF:=$(VENDOR_BUF)
32 | modvendor: $(MODVENDOR) $(PROTOC) modsensure
33 | @echo "vendoring non-go files..."
34 | $(MODVENDOR) -copy="**/*.proto" -include=github.com/cosmos/cosmos-sdk/proto,github.com/cosmos/cosmos-sdk/third_party/proto
35 | $(MODVENDOR) -copy="**/Makefile" -include=github.com/cosmos/gogoproto
36 | $(MODVENDOR) -copy="**/*.proto" -include=github.com/cosmos/cosmos-proto/proto
37 | $(MODVENDOR) -copy="**/swagger.yaml" -include=github.com/cosmos/cosmos-proto/client/docs/swagger-ui
38 | $(MODVENDOR) -copy="**/*.proto" -include=k8s.io/apimachinery
39 | @ln -snf ../../vendor/k8s.io .cache/include/k8s.io
40 | @echo "$${VENDOR_BUF}" > vendor/k8s.io/buf.yaml
41 | @echo "$${VENDOR_BUF}" > .cache/include/google/buf.yaml
42 | @echo "$${VENDOR_BUF}" > vendor/github.com/cosmos/cosmos-sdk/proto/buf.yaml
43 | @echo "$${VENDOR_BUF}" > vendor/github.com/cosmos/cosmos-sdk/third_party/proto/buf.yaml
44 |
--------------------------------------------------------------------------------
/make/release-ts.mk:
--------------------------------------------------------------------------------
1 | .PHONY: release-ts
2 | release-ts: $(AKASH_TS_NODE_MODULES) $(AKASH_TS_ROOT)/dist
3 | script/release-ts.sh
4 |
5 | $(AKASH_TS_ROOT)/dist: $(shell find $(AKASH_TS_ROOT)/src -type f)
6 | cd $(AKASH_TS_ROOT) && npm run build
--------------------------------------------------------------------------------
/make/test.mk:
--------------------------------------------------------------------------------
1 | TEST_MODULE ?= ./...
2 | SUB_TESTS ?= go \
3 | ts
4 |
5 | COVER_PACKAGES = $(shell go list ./... | grep -v mock | paste -sd, -)
6 |
7 | TEST_TIMEOUT ?= 300
8 | TEST_RACE ?= 0
9 | TEST_NOCACHE ?= 0
10 | TEST_VERBOSE ?= 0
11 |
12 | test_flags := -timeout $(TEST_TIMEOUT)s
13 |
14 | ifeq ($(TEST_NOCACHE), 1)
15 | test_flags += -count=1
16 | endif
17 |
18 | ifeq ($(TEST_RACE), 1)
19 | test_flags += -race
20 | endif
21 |
22 | ifeq ($(TEST_VERBOSE), 1)
23 | test_flags += -v
24 | endif
25 |
26 | .PHONY: test
27 | test: $(patsubst %, test-%,$(SUB_TESTS))
28 |
29 | .PHONY: test-coverage
30 | test-coverage: $(patsubst %, test-coverage-%,$(SUB_TESTS))
31 |
32 | .PHONY: test-ts
33 | test-ts: $(AKASH_TS_NODE_MODULES)
34 | cd ts && npm run test
35 |
36 | .PHONY: test-coverage-ts
37 | test-coverage-ts: $(AKASH_TS_NODE_MODULES)
38 | cd ts && npm run test:cov
39 |
40 | .PHONY: test-go
41 | test-go:
42 | $(GO) test $(test_flags) $(TEST_MODULE)
43 |
44 | .PHONY: test-coverage-go
45 | test-coverage-go:
46 | $(GO) test -coverprofile=coverage.txt \
47 | -covermode=count \
48 | -coverpkg="$(COVER_PACKAGES)" \
49 | $(TEST_MODULE)
50 |
51 | .PHONY: test-go-vet
52 | test-go-vet:
53 | $(GO) vet $(TEST_MODULE)
54 |
--------------------------------------------------------------------------------
/proto/node/akash/audit/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.audit.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/audit/v1beta2/audit.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta2";
8 |
9 | // GenesisState defines the basic genesis state used by audit module
10 | message GenesisState {
11 | repeated AuditedAttributes attributes = 1
12 | [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""];
13 | }
14 |
--------------------------------------------------------------------------------
/proto/node/akash/audit/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.audit.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/audit/v1beta3/audit.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta3";
8 |
9 | // GenesisState defines the basic genesis state used by audit module
10 | message GenesisState {
11 | repeated AuditedAttributes attributes = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "attributes",
14 | (gogoproto.moretags) = "yaml:\"attributes\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta1/endpoint.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta1;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta1";
7 |
8 | // Endpoint describes a publicly accessible IP service
9 | message Endpoint {
10 | option (gogoproto.equal) = true;
11 | // This describes how the endpoint is implemented when the lease is deployed
12 | enum Kind {
13 | // Describes an endpoint that becomes a Kubernetes Ingress
14 | SHARED_HTTP = 0;
15 | // Describes an endpoint that becomes a Kubernetes NodePort
16 | RANDOM_PORT = 1;
17 | }
18 | Kind kind = 1;
19 | }
20 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta1/resourcevalue.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta1;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta1";
7 |
8 | // Unit stores cpu, memory and storage metrics
9 | message ResourceValue {
10 | option (gogoproto.equal) = true;
11 | bytes val = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
12 | }
13 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta2/endpoint.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2";
7 |
8 | // Endpoint describes a publicly accessible IP service
9 | message Endpoint {
10 | option (gogoproto.equal) = true;
11 | // This describes how the endpoint is implemented when the lease is deployed
12 | enum Kind {
13 | // Describes an endpoint that becomes a Kubernetes Ingress
14 | SHARED_HTTP = 0;
15 | // Describes an endpoint that becomes a Kubernetes NodePort
16 | RANDOM_PORT = 1;
17 | // Describes an endpoint that becomes a leased IP
18 | LEASED_IP = 2;
19 | }
20 | Kind kind = 1;
21 | uint32 sequence_number = 2
22 | [(gogoproto.customname) = "SequenceNumber", (gogoproto.jsontag) = "sequence_number", (gogoproto.moretags) = "yaml:\"sequence_number\""];
23 | }
24 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta2/resourceunits.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta2/resource.proto";
6 | import "akash/base/v1beta2/endpoint.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2";
9 |
10 | // ResourceUnits describes all available resources types for deployment/node etc
11 | // if field is nil resource is not present in the given data-structure
12 | message ResourceUnits {
13 | option (gogoproto.equal) = true;
14 | CPU cpu = 1 [
15 | (gogoproto.nullable) = true,
16 | (gogoproto.customname) = "CPU",
17 | (gogoproto.jsontag) = "cpu,omitempty",
18 | (gogoproto.moretags) = "yaml:\"cpu,omitempty\""
19 | ];
20 | Memory memory = 2 [
21 | (gogoproto.nullable) = true,
22 | (gogoproto.jsontag) = "memory,omitempty",
23 | (gogoproto.moretags) = "yaml:\"memory,omitempty\""
24 | ];
25 | repeated Storage storage = 3 [
26 | (gogoproto.nullable) = false,
27 | (gogoproto.castrepeated) = "Volumes",
28 | (gogoproto.jsontag) = "storage,omitempty",
29 | (gogoproto.moretags) = "yaml:\"storage,omitempty\""
30 | ];
31 | repeated akash.base.v1beta2.Endpoint endpoints = 4 [
32 | (gogoproto.nullable) = false,
33 | (gogoproto.castrepeated) = "Endpoints",
34 | (gogoproto.jsontag) = "endpoints",
35 | (gogoproto.moretags) = "yaml:\"endpoints\""
36 | ];
37 | }
38 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta2/resourcevalue.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2";
7 |
8 | // Unit stores cpu, memory and storage metrics
9 | message ResourceValue {
10 | option (gogoproto.equal) = true;
11 | bytes val = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta3/cpu.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta3/attribute.proto";
6 | import "akash/base/v1beta3/resourcevalue.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3";
9 |
10 | // CPU stores resource units and cpu config attributes
11 | message CPU {
12 | option (gogoproto.equal) = true;
13 | ResourceValue units = 1 [(gogoproto.nullable) = false];
14 | repeated Attribute attributes = 2 [
15 | (gogoproto.nullable) = false,
16 | (gogoproto.castrepeated) = "Attributes",
17 | (gogoproto.jsontag) = "attributes,omitempty",
18 | (gogoproto.moretags) = "yaml:\"attributes,omitempty\""
19 | ];
20 | }
21 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta3/endpoint.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3";
7 |
8 | // Endpoint describes a publicly accessible IP service
9 | message Endpoint {
10 | option (gogoproto.equal) = true;
11 |
12 | // This describes how the endpoint is implemented when the lease is deployed
13 | enum Kind {
14 | // Describes an endpoint that becomes a Kubernetes Ingress
15 | SHARED_HTTP = 0;
16 | // Describes an endpoint that becomes a Kubernetes NodePort
17 | RANDOM_PORT = 1;
18 | // Describes an endpoint that becomes a leased IP
19 | LEASED_IP = 2;
20 | }
21 |
22 | Kind kind = 1;
23 | uint32 sequence_number = 2 [
24 | (gogoproto.customname) = "SequenceNumber",
25 | (gogoproto.jsontag) = "sequence_number",
26 | (gogoproto.moretags) = "yaml:\"sequence_number\""
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta3/gpu.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta3/attribute.proto";
6 | import "akash/base/v1beta3/resourcevalue.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3";
9 |
10 | // GPU stores resource units and cpu config attributes
11 | message GPU {
12 | option (gogoproto.equal) = true;
13 | ResourceValue units = 1 [
14 | (gogoproto.nullable) = false
15 | ];
16 | repeated Attribute attributes = 2 [
17 | (gogoproto.nullable) = false,
18 | (gogoproto.castrepeated) = "Attributes",
19 | (gogoproto.jsontag) = "attributes,omitempty",
20 | (gogoproto.moretags) = "yaml:\"attributes,omitempty\""
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta3/memory.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta3/attribute.proto";
6 | import "akash/base/v1beta3/resourcevalue.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3";
9 |
10 | // Memory stores resource quantity and memory attributes
11 | message Memory {
12 | option (gogoproto.equal) = true;
13 | ResourceValue quantity = 1 [
14 | (gogoproto.nullable) = false,
15 | (gogoproto.jsontag) = "size",
16 | (gogoproto.moretags) = "yaml:\"size\""
17 | ];
18 | repeated Attribute attributes = 2 [
19 | (gogoproto.nullable) = false,
20 | (gogoproto.castrepeated) = "Attributes",
21 | (gogoproto.jsontag) = "attributes,omitempty",
22 | (gogoproto.moretags) = "yaml:\"attributes,omitempty\""
23 | ];
24 | }
25 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta3/resourcevalue.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3";
7 |
8 | // Unit stores cpu, memory and storage metrics
9 | message ResourceValue {
10 | option (gogoproto.equal) = true;
11 | bytes val = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/proto/node/akash/base/v1beta3/storage.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.base.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta3/attribute.proto";
6 | import "akash/base/v1beta3/resourcevalue.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3";
9 |
10 | // Storage stores resource quantity and storage attributes
11 | message Storage {
12 | option (gogoproto.equal) = true;
13 | string name = 1 [
14 | (gogoproto.jsontag) = "name",
15 | (gogoproto.moretags) = "yaml:\"name\""
16 | ];
17 | ResourceValue quantity = 2 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "size",
20 | (gogoproto.moretags) = "yaml:\"size\""
21 | ];
22 | repeated Attribute attributes = 3 [
23 | (gogoproto.nullable) = false,
24 | (gogoproto.castrepeated) = "Attributes",
25 | (gogoproto.jsontag) = "attributes,omitempty",
26 | (gogoproto.moretags) = "yaml:\"attributes,omitempty\""
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/proto/node/akash/cert/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.cert.v1beta2;
3 |
4 | import "akash/cert/v1beta2/cert.proto";
5 | import "gogoproto/gogo.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta2";
8 |
9 | // GenesisCertificate defines certificate entry at genesis
10 | message GenesisCertificate {
11 | string owner = 1 [
12 | (gogoproto.jsontag) = "owner",
13 | (gogoproto.moretags) = "yaml:\"owner\""
14 | ];
15 |
16 | Certificate certificate = 2 [
17 | (gogoproto.nullable) = false,
18 | (gogoproto.jsontag) = "certificate",
19 | (gogoproto.moretags) = "yaml:\"certificate\""
20 | ];
21 | }
22 |
23 | // GenesisState defines the basic genesis state used by cert module
24 | message GenesisState {
25 | repeated GenesisCertificate certificates = 1 [
26 | (gogoproto.castrepeated) = "GenesisCertificates",
27 | (gogoproto.nullable) = false,
28 | (gogoproto.jsontag) = "certificates",
29 | (gogoproto.moretags) = "yaml:\"certificates\""
30 | ];
31 | }
32 |
--------------------------------------------------------------------------------
/proto/node/akash/cert/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.cert.v1beta3;
3 |
4 | import "akash/cert/v1beta3/cert.proto";
5 | import "gogoproto/gogo.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta3";
8 |
9 | // GenesisCertificate defines certificate entry at genesis
10 | message GenesisCertificate {
11 | string owner = 1 [
12 | (gogoproto.jsontag) = "owner",
13 | (gogoproto.moretags) = "yaml:\"owner\""
14 | ];
15 |
16 | Certificate certificate = 2 [
17 | (gogoproto.nullable) = false,
18 | (gogoproto.jsontag) = "certificate",
19 | (gogoproto.moretags) = "yaml:\"certificate\""
20 | ];
21 | }
22 |
23 | // GenesisState defines the basic genesis state used by cert module
24 | message GenesisState {
25 | repeated GenesisCertificate certificates = 1 [
26 | (gogoproto.castrepeated) = "GenesisCertificates",
27 | (gogoproto.nullable) = false,
28 | (gogoproto.jsontag) = "certificates",
29 | (gogoproto.moretags) = "yaml:\"certificates\""
30 | ];
31 | }
32 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta1/authz.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta1;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "cosmos_proto/cosmos.proto";
6 | import "cosmos/base/v1beta1/coin.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1";
9 |
10 | // DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from
11 | // the granter's account for a deployment.
12 | message DepositDeploymentAuthorization {
13 | option (cosmos_proto.implements_interface) = "Authorization";
14 |
15 | // SpendLimit is the amount the grantee is authorized to spend from the granter's account for
16 | // the purpose of deployment.
17 | cosmos.base.v1beta1.Coin spend_limit = 1 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "spend_limit"
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta1/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta1;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/deployment/v1beta1/deployment.proto";
6 | import "akash/deployment/v1beta1/group.proto";
7 | import "akash/deployment/v1beta1/params.proto";
8 |
9 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1";
10 |
11 | // GenesisDeployment defines the basic genesis state used by deployment module
12 | message GenesisDeployment {
13 | Deployment deployment = 1
14 | [(gogoproto.nullable) = false, (gogoproto.jsontag) = "deployment", (gogoproto.moretags) = "yaml:\"deployment\""];
15 |
16 | repeated Group groups = 2
17 | [(gogoproto.nullable) = false, (gogoproto.jsontag) = "groups", (gogoproto.moretags) = "yaml:\"groups\""];
18 | }
19 |
20 | // GenesisState stores slice of genesis deployment instance
21 | message GenesisState {
22 | repeated GenesisDeployment deployments = 1 [
23 | (gogoproto.nullable) = false,
24 | (gogoproto.jsontag) = "deployments",
25 | (gogoproto.moretags) = "yaml:\"deployments\""
26 | ];
27 |
28 | Params params = 2 [
29 | (gogoproto.nullable) = false,
30 | (gogoproto.jsontag) = "params",
31 | (gogoproto.moretags) = "yaml:\"params\""
32 | ];
33 | }
34 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta1/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta1;
3 | import "gogoproto/gogo.proto";
4 | import "cosmos/base/v1beta1/coin.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1";
7 |
8 | // Params defines the parameters for the x/deployment package
9 | message Params {
10 | cosmos.base.v1beta1.Coin deployment_min_deposit = 1 [
11 | (gogoproto.customname) = "DeploymentMinDeposit",
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "deployment_min_deposit",
14 | (gogoproto.moretags) = "yaml:\"deployment_min_deposit\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta2/authz.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "cosmos_proto/cosmos.proto";
6 | import "cosmos/base/v1beta1/coin.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2";
9 |
10 | // DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from
11 | // the granter's account for a deployment.
12 | message DepositDeploymentAuthorization {
13 | option (cosmos_proto.implements_interface) = "Authorization";
14 |
15 | // SpendLimit is the amount the grantee is authorized to spend from the granter's account for
16 | // the purpose of deployment.
17 | cosmos.base.v1beta1.Coin spend_limit = 1 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "spend_limit"
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/deployment/v1beta2/deployment.proto";
6 | import "akash/deployment/v1beta2/group.proto";
7 | import "akash/deployment/v1beta2/params.proto";
8 |
9 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2";
10 |
11 | // GenesisDeployment defines the basic genesis state used by deployment module
12 | message GenesisDeployment {
13 | Deployment deployment = 1 [
14 | (gogoproto.nullable) = false,
15 | (gogoproto.jsontag) = "deployment",
16 | (gogoproto.moretags) = "yaml:\"deployment\""
17 | ];
18 |
19 | repeated Group groups = 2 [
20 | (gogoproto.nullable) = false,
21 | (gogoproto.jsontag) = "groups",
22 | (gogoproto.moretags) = "yaml:\"groups\""
23 | ];
24 | }
25 |
26 | // GenesisState stores slice of genesis deployment instance
27 | message GenesisState {
28 | repeated GenesisDeployment deployments = 1 [
29 | (gogoproto.nullable) = false,
30 | (gogoproto.jsontag) = "deployments",
31 | (gogoproto.moretags) = "yaml:\"deployments\""
32 | ];
33 |
34 | Params params = 2 [
35 | (gogoproto.nullable) = false,
36 | (gogoproto.jsontag) = "params",
37 | (gogoproto.moretags) = "yaml:\"params\""
38 | ];
39 | }
40 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta2/groupid.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2";
7 |
8 | // GroupID stores owner, deployment sequence number and group sequence number
9 | message GroupID {
10 | option (gogoproto.equal) = false;
11 | option (gogoproto.goproto_stringer) = false;
12 |
13 | string owner = 1 [
14 | (gogoproto.jsontag) = "owner",
15 | (gogoproto.moretags) = "yaml:\"owner\""
16 | ];
17 | uint64 dseq = 2 [
18 | (gogoproto.customname) = "DSeq",
19 | (gogoproto.jsontag) = "dseq",
20 | (gogoproto.moretags) = "yaml:\"dseq\""
21 | ];
22 | uint32 gseq = 3 [
23 | (gogoproto.customname) = "GSeq",
24 | (gogoproto.jsontag) = "gseq",
25 | (gogoproto.moretags) = "yaml:\"gseq\""
26 | ];
27 | }
28 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta2/groupspec.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta2/attribute.proto";
6 | import "akash/deployment/v1beta2/resource.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2";
9 |
10 | // GroupSpec stores group specifications
11 | message GroupSpec {
12 | option (gogoproto.equal) = false;
13 | option (gogoproto.goproto_getters) = false;
14 |
15 | string name = 1 [
16 | (gogoproto.jsontag) = "name",
17 | (gogoproto.moretags) = "yaml:\"name\""
18 | ];
19 |
20 | akash.base.v1beta2.PlacementRequirements requirements = 2 [
21 | (gogoproto.nullable) = false,
22 | (gogoproto.jsontag) = "requirements",
23 | (gogoproto.moretags) = "yaml:\"requirements\""
24 | ];
25 |
26 | repeated Resource resources = 3 [
27 | (gogoproto.nullable) = false,
28 | (gogoproto.jsontag) = "resources",
29 | (gogoproto.moretags) = "yaml:\"resources\""
30 | ];
31 | }
32 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta2/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.deployment.v1beta2;
4 |
5 | import "gogoproto/gogo.proto";
6 | import "cosmos/base/v1beta1/coin.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2";
9 |
10 | // Params defines the parameters for the x/deployment package
11 | message Params {
12 | cosmos.base.v1beta1.Coin deployment_min_deposit = 1 [
13 | (gogoproto.customname) = "DeploymentMinDeposit",
14 | (gogoproto.nullable) = false,
15 | (gogoproto.jsontag) = "deployment_min_deposit",
16 | (gogoproto.moretags) = "yaml:\"deployment_min_deposit\""
17 | ];
18 | }
19 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta2/resource.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "cosmos/base/v1beta1/coin.proto";
6 | import "akash/base/v1beta2/resourceunits.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2";
9 |
10 | // Resource stores unit, total count and price of resource
11 | message Resource {
12 | option (gogoproto.equal) = false;
13 |
14 | akash.base.v1beta2.ResourceUnits resources = 1 [
15 | (gogoproto.nullable) = false,
16 | (gogoproto.jsontag) = "unit",
17 | (gogoproto.moretags) = "yaml:\"unit\""
18 | ];
19 | uint32 count = 2 [
20 | (gogoproto.jsontag) = "count",
21 | (gogoproto.moretags) = "yaml:\"count\""
22 | ];
23 | cosmos.base.v1beta1.DecCoin price = 3 [
24 | (gogoproto.nullable) = false,
25 | (gogoproto.jsontag) = "price",
26 | (gogoproto.moretags) = "yaml:\"price\""
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta3/authz.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "cosmos_proto/cosmos.proto";
6 | import "cosmos/base/v1beta1/coin.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3";
9 |
10 | // DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from
11 | // the granter's account for a deployment.
12 | message DepositDeploymentAuthorization {
13 | option (cosmos_proto.implements_interface) = "Authorization";
14 |
15 | // SpendLimit is the amount the grantee is authorized to spend from the granter's account for
16 | // the purpose of deployment.
17 | cosmos.base.v1beta1.Coin spend_limit = 1 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "spend_limit"
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/deployment/v1beta3/deployment.proto";
6 | import "akash/deployment/v1beta3/group.proto";
7 | import "akash/deployment/v1beta3/params.proto";
8 |
9 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3";
10 |
11 | // GenesisDeployment defines the basic genesis state used by deployment module
12 | message GenesisDeployment {
13 | Deployment deployment = 1 [
14 | (gogoproto.nullable) = false,
15 | (gogoproto.jsontag) = "deployment",
16 | (gogoproto.moretags) = "yaml:\"deployment\""
17 | ];
18 |
19 | repeated Group groups = 2 [
20 | (gogoproto.nullable) = false,
21 | (gogoproto.jsontag) = "groups",
22 | (gogoproto.moretags) = "yaml:\"groups\""
23 | ];
24 | }
25 |
26 | // GenesisState stores slice of genesis deployment instance
27 | message GenesisState {
28 | repeated GenesisDeployment deployments = 1 [
29 | (gogoproto.nullable) = false,
30 | (gogoproto.jsontag) = "deployments",
31 | (gogoproto.moretags) = "yaml:\"deployments\""
32 | ];
33 |
34 | Params params = 2 [
35 | (gogoproto.nullable) = false,
36 | (gogoproto.jsontag) = "params",
37 | (gogoproto.moretags) = "yaml:\"params\""
38 | ];
39 | }
40 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta3/groupid.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3";
7 |
8 | // GroupID stores owner, deployment sequence number and group sequence number
9 | message GroupID {
10 | option (gogoproto.equal) = false;
11 | option (gogoproto.goproto_stringer) = false;
12 |
13 | string owner = 1 [
14 | (gogoproto.jsontag) = "owner",
15 | (gogoproto.moretags) = "yaml:\"owner\""
16 | ];
17 | uint64 dseq = 2 [
18 | (gogoproto.customname) = "DSeq",
19 | (gogoproto.jsontag) = "dseq",
20 | (gogoproto.moretags) = "yaml:\"dseq\""
21 | ];
22 | uint32 gseq = 3 [
23 | (gogoproto.customname) = "GSeq",
24 | (gogoproto.jsontag) = "gseq",
25 | (gogoproto.moretags) = "yaml:\"gseq\""
26 | ];
27 | }
28 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta3/groupspec.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta3/attribute.proto";
6 | import "akash/deployment/v1beta3/resourceunit.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3";
9 |
10 | // GroupSpec stores group specifications
11 | message GroupSpec {
12 | option (gogoproto.equal) = false;
13 | option (gogoproto.goproto_getters) = false;
14 |
15 | string name = 1 [
16 | (gogoproto.jsontag) = "name",
17 | (gogoproto.moretags) = "yaml:\"name\""
18 | ];
19 |
20 | akash.base.v1beta3.PlacementRequirements requirements = 2 [
21 | (gogoproto.nullable) = false,
22 | (gogoproto.jsontag) = "requirements",
23 | (gogoproto.moretags) = "yaml:\"requirements\""
24 | ];
25 |
26 | repeated ResourceUnit resources = 3 [
27 | (gogoproto.nullable) = false,
28 | (gogoproto.castrepeated) = "ResourceUnits",
29 | (gogoproto.jsontag) = "resources",
30 | (gogoproto.moretags) = "yaml:\"resources\""
31 | ];
32 | }
33 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta3/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.deployment.v1beta3;
4 |
5 | import "gogoproto/gogo.proto";
6 | import "cosmos/base/v1beta1/coin.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3";
9 |
10 | // Params defines the parameters for the x/deployment package
11 | message Params {
12 | repeated cosmos.base.v1beta1.Coin min_deposits = 1[
13 | (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
14 | (gogoproto.customname) = "MinDeposits",
15 | (gogoproto.nullable) = false,
16 | (gogoproto.jsontag) = "min_deposits",
17 | (gogoproto.moretags) = "yaml:\"min_deposits\""
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/proto/node/akash/deployment/v1beta3/resourceunit.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.deployment.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/base/v1beta3/resources.proto";
6 | import "cosmos/base/v1beta1/coin.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3";
9 |
10 | // ResourceUnit extends Resources and adds Count along with the Price
11 | message ResourceUnit {
12 | option (gogoproto.equal) = true;
13 |
14 | akash.base.v1beta3.Resources resource = 1 [
15 | (gogoproto.nullable) = false,
16 | (gogoproto.embed) = true,
17 | (gogoproto.jsontag) = "resource",
18 | (gogoproto.moretags) = "yaml:\"resource\""
19 | ];
20 | uint32 count = 2 [
21 | (gogoproto.jsontag) = "count",
22 | (gogoproto.moretags) = "yaml:\"count\""
23 | ];
24 | cosmos.base.v1beta1.DecCoin price = 3 [
25 | (gogoproto.nullable) = false,
26 | (gogoproto.jsontag) = "price",
27 | (gogoproto.moretags) = "yaml:\"price\""
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/proto/node/akash/discovery/v1/akash.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.discovery.v1;
4 |
5 | import "akash/discovery/v1/client_info.proto";
6 | import "gogoproto/gogo.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/node/client";
9 |
10 | // Akash akash specific RPC parameters
11 | message Akash {
12 | ClientInfo client_info = 1 [
13 | (gogoproto.customname) = "ClientInfo",
14 | (gogoproto.jsontag) = "client_info",
15 | (gogoproto.moretags) = "yaml:\"client_info\""
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/proto/node/akash/discovery/v1/client_info.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.discovery.v1;
4 |
5 | import "gogoproto/gogo.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/client";
8 |
9 | // ClientInfo akash specific client info
10 | message ClientInfo {
11 | string api_version = 1 [
12 | (gogoproto.customname) = "ApiVersion",
13 | (gogoproto.jsontag) = "api_version",
14 | (gogoproto.moretags) = "yaml:\"api_version\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/escrow/v1beta1/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.escrow.v1beta1;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/escrow/v1beta1/types.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta1";
8 |
9 | // GenesisState defines the basic genesis state used by escrow module
10 | message GenesisState {
11 | repeated Account accounts = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "accounts",
14 | (gogoproto.moretags) = "yaml:\"accounts\""
15 | ];
16 |
17 | repeated Payment payments = 2 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "payments",
20 | (gogoproto.moretags) = "yaml:\"payments\""
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/proto/node/akash/escrow/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.escrow.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/escrow/v1beta2/types.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta2";
8 |
9 | // GenesisState defines the basic genesis state used by escrow module
10 | message GenesisState {
11 | repeated Account accounts = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "accounts",
14 | (gogoproto.moretags) = "yaml:\"accounts\""
15 | ];
16 |
17 | repeated FractionalPayment payments = 2 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "payments",
20 | (gogoproto.moretags) = "yaml:\"payments\""
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/proto/node/akash/escrow/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.escrow.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/escrow/v1beta3/types.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta3";
8 |
9 | // GenesisState defines the basic genesis state used by escrow module
10 | message GenesisState {
11 | repeated Account accounts = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "accounts",
14 | (gogoproto.moretags) = "yaml:\"accounts\""
15 | ];
16 |
17 | repeated FractionalPayment payments = 2 [
18 | (gogoproto.nullable) = false,
19 | (gogoproto.jsontag) = "payments",
20 | (gogoproto.moretags) = "yaml:\"payments\""
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/proto/node/akash/gov/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.gov.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/gov/v1beta3/params.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/gov/v1beta3";
8 |
9 | // GenesisState stores slice of genesis deployment instance
10 | message GenesisState {
11 | DepositParams deposit_params = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "deposit_params",
14 | (gogoproto.moretags) = "yaml:\"deposit_params\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/gov/v1beta3/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.gov.v1beta3;
3 | import "gogoproto/gogo.proto";
4 |
5 | option go_package = "github.com/akash-network/akash-api/go/node/gov/v1beta3";
6 |
7 | // DepositParams defines the parameters for the x/gov module
8 | message DepositParams {
9 | // min_initial_deposit_rate minimum % of TotalDeposit
10 | // author of the proposal must put in order for proposal tx to be committed
11 | bytes min_initial_deposit_rate = 1 [
12 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
13 | (gogoproto.nullable) = false,
14 | (gogoproto.customname) = "MinInitialDepositRate",
15 | (gogoproto.jsontag) = "min_initial_deposit_rate",
16 | (gogoproto.moretags) = "yaml:\"min_initial_deposit_rate\""
17 | ];
18 | }
19 |
--------------------------------------------------------------------------------
/proto/node/akash/inflation/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.inflation.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/inflation/v1beta2/params.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/inflation/types/v1beta2";
8 |
9 | // GenesisState stores slice of genesis deployment instance
10 | message GenesisState {
11 | Params params = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "params",
14 | (gogoproto.moretags) = "yaml:\"params\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/inflation/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.inflation.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/inflation/v1beta3/params.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/inflation/v1beta3";
8 |
9 | // GenesisState stores slice of genesis deployment instance
10 | message GenesisState {
11 | Params params = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "params",
14 | (gogoproto.moretags) = "yaml:\"params\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/market/v1beta2/order.proto";
6 | import "akash/market/v1beta2/lease.proto";
7 | import "akash/market/v1beta2/params.proto";
8 |
9 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2";
10 |
11 | // GenesisState defines the basic genesis state used by market module
12 | message GenesisState {
13 | repeated Order orders = 1
14 | [(gogoproto.nullable) = false, (gogoproto.jsontag) = "orders", (gogoproto.moretags) = "yaml:\"orders\""];
15 |
16 | repeated Lease leases = 2
17 | [(gogoproto.nullable) = false, (gogoproto.jsontag) = "leases", (gogoproto.moretags) = "yaml:\"leases\""];
18 |
19 | Params params = 3 [
20 | (gogoproto.nullable) = false,
21 | (gogoproto.jsontag) = "params",
22 | (gogoproto.moretags) = "yaml:\"params\""
23 | ];
24 | }
25 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta2/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta2;
3 | import "gogoproto/gogo.proto";
4 | import "cosmos/base/v1beta1/coin.proto";
5 |
6 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2";
7 |
8 | // Params is the params for the x/market module
9 | message Params {
10 | cosmos.base.v1beta1.Coin bid_min_deposit = 1 [
11 | (gogoproto.customname) = "BidMinDeposit",
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "bid_min_deposit",
14 | (gogoproto.moretags) = "yaml:\"bid_min_deposit\""
15 | ];
16 | uint32 order_max_bids = 2 [
17 | (gogoproto.customname) = "OrderMaxBids",
18 | (gogoproto.jsontag) = "order_max_bids",
19 | (gogoproto.moretags) = "yaml:\"order_max_bids\""
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta2/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta2;
3 |
4 | import "akash/market/v1beta2/bid.proto";
5 | import "akash/market/v1beta2/lease.proto";
6 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2";
7 |
8 | // Msg defines the market Msg service
9 | service Msg {
10 | // CreateBid defines a method to create a bid given proper inputs.
11 | rpc CreateBid(MsgCreateBid) returns (MsgCreateBidResponse);
12 |
13 | // CloseBid defines a method to close a bid given proper inputs.
14 | rpc CloseBid(MsgCloseBid) returns (MsgCloseBidResponse);
15 |
16 | // WithdrawLease withdraws accrued funds from the lease payment
17 | rpc WithdrawLease(MsgWithdrawLease) returns (MsgWithdrawLeaseResponse);
18 |
19 | // CreateLease creates a new lease
20 | rpc CreateLease(MsgCreateLease) returns (MsgCreateLeaseResponse);
21 |
22 | // CloseLease defines a method to close an order given proper inputs.
23 | rpc CloseLease(MsgCloseLease) returns (MsgCloseLeaseResponse);
24 | }
25 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/market/v1beta3/order.proto";
6 | import "akash/market/v1beta3/lease.proto";
7 | import "akash/market/v1beta3/bid.proto";
8 | import "akash/market/v1beta3/params.proto";
9 |
10 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3";
11 |
12 | // GenesisState defines the basic genesis state used by market module
13 | message GenesisState {
14 | Params params = 1 [
15 | (gogoproto.nullable) = false,
16 | (gogoproto.jsontag) = "params",
17 | (gogoproto.moretags) = "yaml:\"params\""
18 | ];
19 | repeated Order orders = 2 [
20 | (gogoproto.nullable) = false,
21 | (gogoproto.jsontag) = "orders",
22 | (gogoproto.moretags) = "yaml:\"orders\""
23 | ];
24 | repeated Lease leases = 3 [
25 | (gogoproto.nullable) = false,
26 | (gogoproto.jsontag) = "leases",
27 | (gogoproto.moretags) = "yaml:\"leases\""
28 | ];
29 | repeated Bid bids = 4 [
30 | (gogoproto.nullable) = false,
31 | (gogoproto.jsontag) = "bids",
32 | (gogoproto.moretags) = "yaml:\"bids\""
33 | ];
34 | }
35 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta3/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "cosmos/base/v1beta1/coin.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3";
8 |
9 | // Params is the params for the x/market module
10 | message Params {
11 | cosmos.base.v1beta1.Coin bid_min_deposit = 1 [
12 | (gogoproto.customname) = "BidMinDeposit",
13 | (gogoproto.nullable) = false,
14 | (gogoproto.jsontag) = "bid_min_deposit",
15 | (gogoproto.moretags) = "yaml:\"bid_min_deposit\""
16 | ];
17 | uint32 order_max_bids = 2 [
18 | (gogoproto.customname) = "OrderMaxBids",
19 | (gogoproto.jsontag) = "order_max_bids",
20 | (gogoproto.moretags) = "yaml:\"order_max_bids\""
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta3/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta3;
3 |
4 | import "akash/market/v1beta3/bid.proto";
5 | import "akash/market/v1beta3/lease.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3";
8 |
9 | // Msg defines the market Msg service
10 | service Msg {
11 | // CreateBid defines a method to create a bid given proper inputs.
12 | rpc CreateBid(MsgCreateBid) returns (MsgCreateBidResponse);
13 |
14 | // CloseBid defines a method to close a bid given proper inputs.
15 | rpc CloseBid(MsgCloseBid) returns (MsgCloseBidResponse);
16 |
17 | // WithdrawLease withdraws accrued funds from the lease payment
18 | rpc WithdrawLease(MsgWithdrawLease) returns (MsgWithdrawLeaseResponse);
19 |
20 | // CreateLease creates a new lease
21 | rpc CreateLease(MsgCreateLease) returns (MsgCreateLeaseResponse);
22 |
23 | // CloseLease defines a method to close an order given proper inputs.
24 | rpc CloseLease(MsgCloseLease) returns (MsgCloseLeaseResponse);
25 | }
26 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta4/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta4;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/market/v1beta4/order.proto";
6 | import "akash/market/v1beta4/lease.proto";
7 | import "akash/market/v1beta4/bid.proto";
8 | import "akash/market/v1beta4/params.proto";
9 |
10 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4";
11 |
12 | // GenesisState defines the basic genesis state used by market module
13 | message GenesisState {
14 | Params params = 1 [
15 | (gogoproto.nullable) = false,
16 | (gogoproto.jsontag) = "params",
17 | (gogoproto.moretags) = 'yaml:"params"'
18 | ];
19 | repeated Order orders = 2 [
20 | (gogoproto.nullable) = false,
21 | (gogoproto.jsontag) = "orders",
22 | (gogoproto.moretags) = 'yaml:"orders"'
23 | ];
24 | repeated Lease leases = 3 [
25 | (gogoproto.nullable) = false,
26 | (gogoproto.jsontag) = "leases",
27 | (gogoproto.moretags) = 'yaml:"leases"'
28 | ];
29 | repeated Bid bids = 4 [
30 | (gogoproto.nullable) = false,
31 | (gogoproto.jsontag) = "bids",
32 | (gogoproto.moretags) = 'yaml:"bids"'
33 | ];
34 | }
35 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta4/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta4;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "cosmos/base/v1beta1/coin.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4";
8 |
9 | // Params is the params for the x/market module
10 | message Params {
11 | cosmos.base.v1beta1.Coin bid_min_deposit = 1 [
12 | (gogoproto.customname) = "BidMinDeposit",
13 | (gogoproto.nullable) = false,
14 | (gogoproto.jsontag) = "bid_min_deposit",
15 | (gogoproto.moretags) = 'yaml:"bid_min_deposit"'
16 | ];
17 | uint32 order_max_bids = 2 [
18 | (gogoproto.customname) = "OrderMaxBids",
19 | (gogoproto.jsontag) = "order_max_bids",
20 | (gogoproto.moretags) = 'yaml:"order_max_bids"'
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/proto/node/akash/market/v1beta4/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.market.v1beta4;
3 |
4 | import "akash/market/v1beta4/bid.proto";
5 | import "akash/market/v1beta4/lease.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4";
8 |
9 | // Msg defines the market Msg service
10 | service Msg {
11 | // CreateBid defines a method to create a bid given proper inputs.
12 | rpc CreateBid(MsgCreateBid) returns (MsgCreateBidResponse);
13 |
14 | // CloseBid defines a method to close a bid given proper inputs.
15 | rpc CloseBid(MsgCloseBid) returns (MsgCloseBidResponse);
16 |
17 | // WithdrawLease withdraws accrued funds from the lease payment
18 | rpc WithdrawLease(MsgWithdrawLease) returns (MsgWithdrawLeaseResponse);
19 |
20 | // CreateLease creates a new lease
21 | rpc CreateLease(MsgCreateLease) returns (MsgCreateLeaseResponse);
22 |
23 | // CloseLease defines a method to close an order given proper inputs.
24 | rpc CloseLease(MsgCloseLease) returns (MsgCloseLeaseResponse);
25 | }
26 |
--------------------------------------------------------------------------------
/proto/node/akash/provider/v1beta2/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.provider.v1beta2;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/provider/v1beta2/provider.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta2";
8 |
9 | // GenesisState defines the basic genesis state used by provider module
10 | message GenesisState {
11 | repeated Provider providers = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "providers",
14 | (gogoproto.moretags) = "yaml:\"providers\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/provider/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.provider.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/provider/v1beta3/provider.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta3";
8 |
9 | // GenesisState defines the basic genesis state used by provider module
10 | message GenesisState {
11 | repeated Provider providers = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "providers",
14 | (gogoproto.moretags) = "yaml:\"providers\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/staking/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.staking.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/staking/v1beta3/params.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/staking/v1beta3";
8 |
9 | // GenesisState stores slice of genesis deployment instance
10 | message GenesisState {
11 | Params params = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "params",
14 | (gogoproto.moretags) = "yaml:\"params\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/staking/v1beta3/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.staking.v1beta3;
3 | import "gogoproto/gogo.proto";
4 |
5 | option go_package = "github.com/akash-network/akash-api/go/node/staking/v1beta3";
6 |
7 | // Params extends the parameters for the x/staking module
8 | message Params {
9 | // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators
10 | string min_commission_rate = 1 [
11 | (gogoproto.moretags) = "yaml:\"min_commission_rate\"",
12 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
13 | (gogoproto.nullable) = false
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/proto/node/akash/take/v1beta3/genesis.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.take.v1beta3;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/take/v1beta3/params.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/take/v1beta3";
8 |
9 | // GenesisState stores slice of genesis deployment instance
10 | message GenesisState {
11 | Params params = 1 [
12 | (gogoproto.nullable) = false,
13 | (gogoproto.jsontag) = "params",
14 | (gogoproto.moretags) = "yaml:\"params\""
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/proto/node/akash/take/v1beta3/params.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.take.v1beta3;
4 |
5 | import "gogoproto/gogo.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/node/take/v1beta3";
8 |
9 | // DenomTakeRate describes take rate for specified denom
10 | message DenomTakeRate {
11 | string denom = 1 [
12 | (gogoproto.customname) = "Denom",
13 | (gogoproto.jsontag) = "denom",
14 | (gogoproto.moretags) = "yaml:\"denom\""
15 | ];
16 | uint32 rate = 2 [
17 | (gogoproto.customname) = "Rate",
18 | (gogoproto.jsontag) = "rate",
19 | (gogoproto.moretags) = "yaml:\"rate\""
20 | ];
21 | }
22 |
23 | // Params defines the parameters for the x/take package
24 | message Params {
25 | // denom -> % take rate
26 | repeated DenomTakeRate denom_take_rates = 1 [
27 | (gogoproto.nullable) = false,
28 | (gogoproto.castrepeated) = "DenomTakeRates",
29 | (gogoproto.customname) = "DenomTakeRates",
30 | (gogoproto.jsontag) = "denom_take_rates",
31 | (gogoproto.moretags) = "yaml:\"denom_take_rates\""
32 | ];
33 |
34 | uint32 default_take_rate = 2 [
35 | (gogoproto.customname) = "DefaultTakeRate",
36 | (gogoproto.jsontag) = "default_take_rate",
37 | (gogoproto.moretags) = "yaml:\"default_take_rate\""
38 | ];
39 | }
40 |
--------------------------------------------------------------------------------
/proto/node/akash/take/v1beta3/query.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.take.v1beta3;
3 |
4 | option go_package = "github.com/akash-network/akash-api/go/node/take/v1beta3";
5 |
6 | // Query defines the gRPC querier service
7 | service Query {
8 | }
9 |
--------------------------------------------------------------------------------
/proto/node/buf.lock:
--------------------------------------------------------------------------------
1 | # Generated by buf. DO NOT EDIT.
2 | version: v1
3 |
--------------------------------------------------------------------------------
/proto/node/buf.yaml:
--------------------------------------------------------------------------------
1 | # This module represents buf.build/akash-network/node
2 | version: v1
3 | name: buf.build/akash-network/node
4 | #deps:
5 | # - buf.build/cosmos/cosmos-proto
6 | # - buf.build/cosmos/cosmos-sdk
7 | # - buf.build/cosmos/gogo-proto
8 | # - buf.build/googleapis/googleapis
9 | breaking:
10 | use:
11 | - FILE
12 | lint:
13 | allow_comment_ignores: true
14 | use:
15 | - DEFAULT
16 | - COMMENTS
17 | - FILE_LOWER_SNAKE_CASE
18 | except:
19 | - UNARY_RPC
20 | - COMMENT_FIELD
21 | - SERVICE_SUFFIX
22 | - ENUM_VALUE_PREFIX
23 | - ENUM_VALUE_UPPER_SNAKE_CASE
24 | - ENUM_ZERO_VALUE_SUFFIX
25 | - RPC_REQUEST_STANDARD_NAME
26 | ignore:
27 | - akash/audit/v1beta1/
28 | - akash/audit/v1beta2/
29 | - akash/base/v1beta1
30 | - akash/base/v1beta2
31 | - akash/cert/v1beta1
32 | - akash/cert/v1beta2
33 | - akash/escrow/v1beta1
34 | - akash/escrow/v1beta2
35 | - akash/inflation/v1beta1
36 | - akash/inflation/v1beta2
37 | - akash/market/v1beta1
38 | - akash/market/v1beta2
39 | - akash/market/v1beta3
40 | - akash/deployment/v1beta1
41 | - akash/deployment/v1beta2
42 | - akash/provider/v1beta1
43 | - akash/provider/v1beta2
44 |
--------------------------------------------------------------------------------
/proto/provider/akash/inventory/v1/cluster.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.inventory.v1;
4 |
5 | import "gogoproto/gogo.proto";
6 | import "akash/inventory/v1/node.proto";
7 | import "akash/inventory/v1/storage.proto";
8 |
9 | option go_package = "github.com/akash-network/akash-api/go/inventory/v1";
10 |
11 | // Cluster reports inventory across entire cluster
12 | message Cluster {
13 | option (gogoproto.equal) = false;
14 |
15 | repeated Node nodes = 1 [
16 | (gogoproto.nullable) = false,
17 | (gogoproto.castrepeated) = "Nodes",
18 | (gogoproto.customname) = "Nodes",
19 | (gogoproto.jsontag) = "nodes",
20 | (gogoproto.moretags) = "yaml:\"nodes\""
21 | ];
22 |
23 | repeated Storage storage = 2 [
24 | (gogoproto.nullable) = false,
25 | (gogoproto.castrepeated) = "ClusterStorage",
26 | (gogoproto.customname) = "Storage",
27 | (gogoproto.jsontag) = "storage",
28 | (gogoproto.moretags) = "yaml:\"storage\""
29 | ];
30 | }
31 |
--------------------------------------------------------------------------------
/proto/provider/akash/inventory/v1/node.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.inventory.v1;
3 |
4 | import "gogoproto/gogo.proto";
5 | import "akash/inventory/v1/resources.proto";
6 |
7 | option go_package = "github.com/akash-network/akash-api/go/inventory/v1";
8 |
9 | // NodeCapabilities extended list of node capabilities
10 | message NodeCapabilities {
11 | repeated string storage_classes = 1 [
12 | (gogoproto.customname) = "StorageClasses",
13 | (gogoproto.jsontag) = "storage_classes",
14 | (gogoproto.moretags) = "yaml:\"storage_classes\""
15 | ];
16 | }
17 |
18 | // Node reports node inventory details
19 | message Node {
20 | string name = 1 [
21 | (gogoproto.customname) = "Name",
22 | (gogoproto.jsontag) = "name",
23 | (gogoproto.moretags) = "yaml:\"name\""
24 | ];
25 |
26 | NodeResources resources = 2 [
27 | (gogoproto.nullable) = false,
28 | (gogoproto.customname) = "Resources",
29 | (gogoproto.jsontag) = "resources",
30 | (gogoproto.moretags) = "yaml:\"resources\""
31 | ];
32 |
33 | NodeCapabilities capabilities = 3 [
34 | (gogoproto.nullable) = false,
35 | (gogoproto.customname) = "Capabilities",
36 | (gogoproto.jsontag) = "capabilities",
37 | (gogoproto.moretags) = "yaml:\"capabilities\""
38 | ];
39 | }
40 |
--------------------------------------------------------------------------------
/proto/provider/akash/inventory/v1/storage.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.inventory.v1;
4 |
5 | import "gogoproto/gogo.proto";
6 | import "akash/inventory/v1/resourcepair.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/inventory/v1";
9 |
10 | // StorageInfo reports Storage details
11 | message StorageInfo {
12 | string class = 1 [
13 | (gogoproto.customname) = "Class",
14 | (gogoproto.jsontag) = "class",
15 | (gogoproto.moretags) = "yaml:\"class\""
16 | ];
17 | string iops = 2 [
18 | (gogoproto.customname) = "IOPS",
19 | (gogoproto.jsontag) = "iops",
20 | (gogoproto.moretags) = "yaml:\"iops\""
21 | ];
22 | }
23 |
24 | // Storage reports Storage inventory details
25 | message Storage {
26 | ResourcePair quantity = 1 [
27 | (gogoproto.nullable) = false,
28 | (gogoproto.customname) = "Quantity",
29 | (gogoproto.jsontag) = "quantity",
30 | (gogoproto.moretags) = "yaml:\"quantity\""
31 | ];
32 | StorageInfo info = 2 [
33 | (gogoproto.nullable) = false,
34 | (gogoproto.customname) = "Info",
35 | (gogoproto.jsontag) = "info",
36 | (gogoproto.moretags) = "yaml:\"info\""
37 | ];
38 | }
39 |
--------------------------------------------------------------------------------
/proto/provider/akash/manifest/v2beta1/group.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.manifest.v2beta1;
4 |
5 | import "gogoproto/gogo.proto";
6 | import "akash/manifest/v2beta1/service.proto";
7 |
8 | option (gogoproto.goproto_stringer_all) = false;
9 | option (gogoproto.stringer_all) = true;
10 | option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta1";
11 |
12 | // Group store name and list of services
13 | message Group {
14 | // getters must be implemented as value receiver
15 | // due to GetName collision
16 | option (gogoproto.goproto_getters) = false;
17 | string name = 1 [
18 | (gogoproto.jsontag) = "name",
19 | (gogoproto.moretags) = "yaml:\"name\""
20 | ];
21 | repeated Service services = 2 [
22 | (gogoproto.nullable) = false,
23 | (gogoproto.jsontag) = "services",
24 | (gogoproto.moretags) = "yaml:\"services\""
25 | ];
26 | }
27 |
--------------------------------------------------------------------------------
/proto/provider/akash/manifest/v2beta1/httpoptions.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.manifest.v2beta1;
4 |
5 | import "gogoproto/gogo.proto";
6 |
7 | option (gogoproto.goproto_stringer_all) = false;
8 | option (gogoproto.stringer_all) = true;
9 | option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta1";
10 |
11 | // ServiceExposeHTTPOptions
12 | message ServiceExposeHTTPOptions {
13 | uint32 max_body_size = 1 [
14 | (gogoproto.jsontag) = "maxBodySize",
15 | (gogoproto.moretags) = "yaml:\"maxBodySize\""
16 | ];
17 | uint32 read_timeout = 2 [
18 | (gogoproto.jsontag) = "readTimeout",
19 | (gogoproto.moretags) = "yaml:\"readTimeout\""
20 | ];
21 | uint32 send_timeout = 3 [
22 | (gogoproto.jsontag) = "sendTimeout",
23 | (gogoproto.moretags) = "yaml:\"sendTimeout\""
24 | ];
25 | uint32 next_tries = 4 [
26 | (gogoproto.jsontag) = "nextTries",
27 | (gogoproto.moretags) = "yaml:\"nextTries\""
28 | ];
29 | uint32 next_timeout = 5 [
30 | (gogoproto.jsontag) = "nextTimeout",
31 | (gogoproto.moretags) = "yaml:\"nextTimeout\""
32 | ];
33 | repeated string next_cases = 6 [
34 | (gogoproto.jsontag) = "nextCases",
35 | (gogoproto.moretags) = "yaml:\"nextCases\""
36 | ];
37 | }
38 |
--------------------------------------------------------------------------------
/proto/provider/akash/manifest/v2beta2/group.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.manifest.v2beta2;
4 |
5 | import "gogoproto/gogo.proto";
6 | import "akash/manifest/v2beta2/service.proto";
7 |
8 | option (gogoproto.goproto_stringer_all) = false;
9 | option (gogoproto.stringer_all) = true;
10 | option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta2";
11 |
12 | // Group store name and list of services
13 | message Group {
14 | // getters must be implemented as value receiver
15 | // due to GetName collision
16 | option (gogoproto.goproto_getters) = false;
17 | string name = 1 [
18 | (gogoproto.jsontag) = "name",
19 | (gogoproto.moretags) = "yaml:\"name\""
20 | ];
21 | repeated Service services = 2 [
22 | (gogoproto.nullable) = false,
23 | (gogoproto.castrepeated) = "Services",
24 | (gogoproto.jsontag) = "services",
25 | (gogoproto.moretags) = "yaml:\"services\""
26 | ];
27 | }
28 |
--------------------------------------------------------------------------------
/proto/provider/akash/manifest/v2beta2/httpoptions.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package akash.manifest.v2beta2;
4 |
5 | import "gogoproto/gogo.proto";
6 |
7 | option (gogoproto.goproto_stringer_all) = false;
8 | option (gogoproto.stringer_all) = true;
9 | option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta2";
10 |
11 | // ServiceExposeHTTPOptions
12 | message ServiceExposeHTTPOptions {
13 | uint32 max_body_size = 1 [
14 | (gogoproto.jsontag) = "maxBodySize",
15 | (gogoproto.moretags) = "yaml:\"maxBodySize\""
16 | ];
17 | uint32 read_timeout = 2 [
18 | (gogoproto.jsontag) = "readTimeout",
19 | (gogoproto.moretags) = "yaml:\"readTimeout\""
20 | ];
21 | uint32 send_timeout = 3 [
22 | (gogoproto.jsontag) = "sendTimeout",
23 | (gogoproto.moretags) = "yaml:\"sendTimeout\""
24 | ];
25 | uint32 next_tries = 4 [
26 | (gogoproto.jsontag) = "nextTries",
27 | (gogoproto.moretags) = "yaml:\"nextTries\""
28 | ];
29 | uint32 next_timeout = 5 [
30 | (gogoproto.jsontag) = "nextTimeout",
31 | (gogoproto.moretags) = "yaml:\"nextTimeout\""
32 | ];
33 | repeated string next_cases = 6 [
34 | (gogoproto.jsontag) = "nextCases",
35 | (gogoproto.moretags) = "yaml:\"nextCases\""
36 | ];
37 | }
38 |
--------------------------------------------------------------------------------
/proto/provider/akash/provider/v1/service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package akash.provider.v1;
3 |
4 | import "google/protobuf/empty.proto";
5 | import "google/api/annotations.proto";
6 | import "akash/provider/v1/status.proto";
7 |
8 | option go_package = "github.com/akash-network/akash-api/go/provider/v1";
9 |
10 | // ProviderRPC defines the RPC server for provider
11 | service ProviderRPC {
12 | // GetStatus defines a method to query provider state
13 | // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
14 | // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
15 | rpc GetStatus(google.protobuf.Empty) returns (Status) {
16 | option (google.api.http) = {
17 | get: "/v1/status",
18 | response_body: "*"
19 | };
20 | }
21 |
22 | // Status defines a method to stream provider state
23 | // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
24 | // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
25 | rpc StreamStatus(google.protobuf.Empty) returns (stream Status);
26 | }
27 |
--------------------------------------------------------------------------------
/proto/provider/buf.lock:
--------------------------------------------------------------------------------
1 | # Generated by buf. DO NOT EDIT.
2 | version: v1
3 |
--------------------------------------------------------------------------------
/proto/provider/buf.yaml:
--------------------------------------------------------------------------------
1 | # This module represents buf.build/akash-network/manifest
2 | version: v1
3 | name: buf.build/akash-network/provider
4 | deps:
5 | - buf.build/akash-network/node
6 | # - buf.build/cosmos/cosmos-proto
7 | # - buf.build/cosmos/cosmos-sdk
8 | # - buf.build/cosmos/gogo-proto
9 | # - buf.build/googleapis/googleapis
10 | lint:
11 | allow_comment_ignores: true
12 | use:
13 | - DEFAULT
14 | - COMMENTS
15 | - FILE_LOWER_SNAKE_CASE
16 | except:
17 | - UNARY_RPC
18 | - COMMENT_FIELD
19 | - SERVICE_SUFFIX
20 | - PACKAGE_VERSION_SUFFIX
21 | - ENUM_VALUE_PREFIX
22 | - ENUM_VALUE_UPPER_SNAKE_CASE
23 | - ENUM_ZERO_VALUE_SUFFIX
24 | - RPC_REQUEST_STANDARD_NAME
25 |
--------------------------------------------------------------------------------
/script/changelog.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | PATH=$PATH:$(pwd)/.cache/bin
4 | export PATH=$PATH
5 |
6 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
7 |
8 | if [[ $# -ne 2 ]]; then
9 | echo "illegal number of parameters"
10 | exit 1
11 | fi
12 |
13 | to_tag=$1
14 |
15 | version_rel="^[v|V]?(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.?(0|[1-9][0-9]*)?$"
16 | version_prerel="^[v|V]?(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
17 |
18 | if [[ -z $("${SCRIPT_DIR}"/semver.sh get prerel "$to_tag") ]]; then
19 | tag_regexp=$version_rel
20 | else
21 | tag_regexp=$version_prerel
22 | fi
23 |
24 | query_string="$to_tag"
25 |
26 | git-chglog --config .chglog/config.yaml --tag-filter-pattern="$tag_regexp" --output "$2" "$query_string"
27 |
--------------------------------------------------------------------------------
/script/gofmt-staged.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | for file in $(git diff --cached --name-only --diff-filter=ACMRTUXB | grep "\.go$")
4 | do
5 | echo "(gofmt) $file"
6 | gofmt -w "$file"
7 | git add "$file"
8 | done
--------------------------------------------------------------------------------
/script/protoc-gen-swagger.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -eo pipefail
4 |
5 | workdir=./.cache/tmp/swagger-gen
6 |
7 | function cleanup {
8 | rm -rf "$workdir"
9 | }
10 |
11 | # clean swagger files
12 | #trap cleanup EXIT
13 |
14 | proto_files=$(find ./proto -type f \( -name 'service.proto' -o -name "query.proto" \) -print0 | xargs -0 -n1 | sort | uniq)
15 |
16 | for file in $proto_files; do
17 | buf generate --template buf.gen.swagger.yaml "$file"
18 | done
19 |
20 | mkdir -p ./docs/swagger-ui
21 |
22 | # combine swagger files
23 | # uses nodejs package `swagger-combine`.
24 | # all the individual swagger files need to be configured in `config.json` for merging
25 | swagger-combine \
26 | ./docs/config.yaml \
27 | -o ./docs/swagger-ui/swagger.yaml \
28 | --continueOnConflictingPaths=true \
29 | --includeDefinitions=true
30 |
--------------------------------------------------------------------------------
/script/protocgen.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -eo pipefail
4 |
5 | PATH=$(pwd)/.cache/bin:$PATH
6 | export PATH=$PATH
7 |
8 | function cleanup {
9 | rm -rf github.com
10 | }
11 |
12 | trap cleanup EXIT
13 |
14 | proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
15 | #shellcheck disable=SC2046
16 | for dir in $proto_dirs; do
17 | while IFS= read -r -d '' file; do
18 | buf generate --template buf.gen.gogo.yaml "$file"
19 | done < <(find "${dir}" -maxdepth 1 -name '*.proto' -print0)
20 | done
21 |
22 | # move proto files to the right places
23 | cp -rv github.com/akash-network/akash-api/* ./
24 |
--------------------------------------------------------------------------------
/script/shellcheck.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | unset FAILED
4 |
5 | FILES=$(find /shellcheck/ -type f -name "*.sh" ! -path "/shellcheck/vendor/*" ! -path "/shellcheck/.git/*" ! -path "/shellcheck/ts/.husky/*")
6 |
7 | for file in $FILES; do
8 | name="$(basename "$file")";
9 | if [[ $name != "$IGNORE" ]] && ! shellcheck --format=gcc "${file}" --exclude=SC1091; then
10 | export FAILED=true
11 | fi
12 | done
13 |
14 | if [ "${FAILED}" != "" ]; then exit 1; fi
15 |
--------------------------------------------------------------------------------
/specs/specs.go:
--------------------------------------------------------------------------------
1 | package specs
2 |
3 | import (
4 | "embed"
5 | "os"
6 | )
7 |
8 | //go:embed jwt-schema.json
9 | var schemas embed.FS
10 |
11 | func GetSpecFile(name string) ([]byte, error) {
12 | dirEntries, err := schemas.ReadDir(".")
13 | if err != nil {
14 | return nil, err
15 | }
16 |
17 | for _, dirEntry := range dirEntries {
18 | if !dirEntry.IsDir() && dirEntry.Name() == name {
19 | schemaContent, err := schemas.ReadFile(dirEntry.Name())
20 | if err != nil {
21 | return nil, err
22 | }
23 |
24 | return schemaContent, nil
25 | }
26 | }
27 |
28 | return nil, os.ErrNotExist
29 | }
30 |
--------------------------------------------------------------------------------
/testdata/jwt/cases_es256k.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "description": "ES256K - Valid Signature",
4 | "tokenString": "eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJiYXIifQ.uq2X8CtBrg-fPvkJ5Dl-AHWQ1HPVnZfA1o0azRlHEBkE7YzOdr44UWmlkavjrl3lMHr4jhROugXi8cjrrZ2Kzw",
5 | "expected": {
6 | "alg": "ES256K",
7 | "claims": {
8 | "issuer": "bar"
9 | }
10 | },
11 | "mustFail": false
12 | },
13 | {
14 | "description": "ES256K - Invalid Signature",
15 | "tokenString": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJiYXIifQ.MEQCIHoSJnmGlPaVQDqacx_2XlXEhhqtWceVopjomc2PJLtdAiAUTeGPoNYxZw0z8mgOnnIcjoxRuNDVZvybRZF3wR1l8W",
16 | "expected": {
17 | "alg": "ES256K",
18 | "claims": {
19 | "issuer": "bar"
20 | }
21 | },
22 | "claims": {
23 | "issuer": "bar"
24 | },
25 | "mustFail": true
26 | }
27 | ]
28 |
--------------------------------------------------------------------------------
/testdata/jwt/jwt.go:
--------------------------------------------------------------------------------
1 | package jwt
2 |
3 | import (
4 | "embed"
5 | "os"
6 | )
7 |
8 |
9 | //go:embed mnemonic cases_es256k.json cases_jwt.json.tmpl
10 | var jwtTestdata embed.FS
11 |
12 | func GetTestsFile(name string) ([]byte, error) {
13 | dirEntries, err := jwtTestdata.ReadDir(".")
14 | if err != nil {
15 | return nil, err
16 | }
17 |
18 | for _, dirEntry := range dirEntries {
19 | if !dirEntry.IsDir() && dirEntry.Name() == name {
20 | schemaContent, err := jwtTestdata.ReadFile(dirEntry.Name())
21 | if err != nil {
22 | return nil, err
23 | }
24 |
25 | return schemaContent, nil
26 | }
27 | }
28 |
29 | return nil, os.ErrNotExist
30 | }
31 |
--------------------------------------------------------------------------------
/testdata/jwt/mnemonic:
--------------------------------------------------------------------------------
1 | addict worth drip violin note olive final pelican perfect feel goat game horror brass fence deposit dutch improve setup stuff frost spirit smart alien
2 |
--------------------------------------------------------------------------------
/tools.go:
--------------------------------------------------------------------------------
1 | //go:build tools
2 | // +build tools
3 |
4 | package api
5 |
6 | import (
7 | _ "github.com/99designs/keyring"
8 | _ "github.com/grpc-ecosystem/grpc-gateway/runtime"
9 | _ "google.golang.org/grpc"
10 |
11 | _ "github.com/pseudomuto/protoc-gen-doc"
12 |
13 | // TODO https://github.com/akash-network/support/issues/77
14 | _ "github.com/regen-network/cosmos-proto/protoc-gen-gocosmos"
15 | )
16 |
--------------------------------------------------------------------------------
/ts/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "ignorePatterns": ["node_modules/", "build/", "umd/"],
3 | "env": {
4 | "node": true,
5 | "es2021": true,
6 | "jest": true
7 | },
8 | "extends": [
9 | "plugin:@typescript-eslint/recommended",
10 | "plugin:prettier/recommended"
11 | ],
12 | "parser": "@typescript-eslint/parser",
13 | "parserOptions": {
14 | "ecmaVersion": "latest",
15 | "sourceType": "module"
16 | },
17 | "plugins": ["@typescript-eslint", "simple-import-sort"],
18 | "rules": {
19 | "@typescript-eslint/no-unused-vars": [
20 | "error",
21 | {
22 | "ignoreRestSiblings": true
23 | }
24 | ],
25 | "simple-import-sort/imports": "error"
26 | },
27 | "overrides": [
28 | {
29 | "files": ["*.js"],
30 | "rules": {
31 | "@typescript-eslint/no-var-requires": "off"
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/ts/.gitignore:
--------------------------------------------------------------------------------
1 | # compiled output
2 | /dist
3 | /build
4 | /node_modules
5 | tsconfig.paths.json
6 |
7 | # Logs
8 | logs
9 | *.log
10 | npm-debug.log*
11 | pnpm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | lerna-debug.log*
15 |
16 | # OS
17 | .DS_Store
18 |
19 | # Tests
20 | /coverage
21 | /.nyc_output
22 |
23 | # IDEs and editors
24 | /.idea
25 | .project
26 | .classpath
27 | .c9/
28 | *.launch
29 | .settings/
30 | *.sublime-workspace
31 |
32 | # IDE - VSCode
33 | .vscode/*
34 | !.vscode/settings.json
35 | !.vscode/tasks.json
36 | !.vscode/launch.json
37 | !.vscode/extensions.json
38 |
39 | .env.local
40 | .env.*.local
41 |
--------------------------------------------------------------------------------
/ts/.npmignore:
--------------------------------------------------------------------------------
1 | # Configuration files
2 | .npmrc
3 | .prettierrc
4 | .releaserc
5 | jest.config.js
6 | tsconfig.build.json
7 | tsconfig.json
8 | .eslintrc.json
9 |
10 | # Source and test files
11 | src
12 | test
13 | coverage
14 | package
15 |
16 | # Miscellaneous directories
17 | .husky
18 | .idea
19 | script
20 |
--------------------------------------------------------------------------------
/ts/.npmrc:
--------------------------------------------------------------------------------
1 | //registry.npmjs.org/:_authToken=${NPM_TOKEN}
2 |
--------------------------------------------------------------------------------
/ts/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "all"
3 | }
--------------------------------------------------------------------------------
/ts/.releaserc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "semantic-release-commit-filter"
4 | ],
5 | "plugins": [
6 | "@semantic-release/commit-analyzer",
7 | "@semantic-release/release-notes-generator",
8 | [
9 | "@semantic-release/npm",
10 | {
11 | "tarballDir": "package",
12 | "publish": {
13 | "access": "public"
14 | }
15 | }
16 | ],
17 | [
18 | "@semantic-release/github",
19 | {
20 | "assets": "package/*.tgz"
21 | }
22 | ]
23 | ],
24 | "preset": "conventionalcommits",
25 | "working_directory": "ts",
26 | "branches": [
27 | {
28 | "name": "main"
29 | }
30 | ],
31 | "tagFormat": "ts/v${version}"
32 | }
33 |
--------------------------------------------------------------------------------
/ts/jest.config.js:
--------------------------------------------------------------------------------
1 | const common = {
2 | transform: {
3 | "^.+\\.(t|j)s$": ["ts-jest", { tsconfig: "./tsconfig.json" }],
4 | },
5 | rootDir: ".",
6 | setupFiles: ["./test/setup.ts"],
7 | };
8 |
9 | module.exports = {
10 | collectCoverageFrom: [
11 | "/src/**/*.{js,ts}",
12 | "!/src/generated/**/*",
13 | "!/src/deprecated/**/*",
14 | "!/src/patch/index.*",
15 | "!/src/index.*",
16 | ],
17 | projects: [
18 | {
19 | displayName: "unit",
20 | ...common,
21 | testMatch: ["/src/**/*.spec.ts"],
22 | setupFilesAfterEnv: ["./test/setup-unit-tests.ts"],
23 | },
24 | {
25 | displayName: "functional",
26 | ...common,
27 | testMatch: ["/test/functional/**/*.spec.ts"],
28 | setupFilesAfterEnv: ["./test/setup-functional-tests.ts"],
29 | },
30 | ],
31 | };
32 |
--------------------------------------------------------------------------------
/ts/script/generate-exports.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const fs = require("fs");
4 | const path = require("path");
5 | const staticExports = require("../static-exports.json");
6 |
7 | const distDir = path.resolve(__dirname, "../dist/generated");
8 | const files = fs.readdirSync(distDir);
9 | const paths = files.reduce((acc, file) => {
10 | const match = file.match(/index.(.*)\.d\.ts/);
11 |
12 | if (match) {
13 | const dottedPath = match[1];
14 | const slashedPath = dottedPath.replace(/\./g, "/");
15 | const resolvedPath = fs.existsSync(`./dist/patch/index.${dottedPath}.js`)
16 | ? `./dist/patch/index.${dottedPath}`
17 | : `./dist/generated/index.${dottedPath}`;
18 |
19 | acc.tsconfig[`@akashnetwork/akash-api/${slashedPath}`] = [resolvedPath];
20 | acc.package[`./${slashedPath}`] = `${resolvedPath}.js`;
21 | }
22 |
23 | return acc;
24 | }, staticExports);
25 |
26 | const tsconfigPaths = path.resolve(__dirname, "../tsconfig.paths.json");
27 | fs.writeFileSync(
28 | tsconfigPaths,
29 | JSON.stringify({ compilerOptions: { paths: paths.tsconfig } }, null, 2),
30 | );
31 |
32 | const packageJson = JSON.parse(
33 | fs.readFileSync(path.resolve(__dirname, "../package.json"), "utf8"),
34 | );
35 | packageJson.exports = paths.package;
36 | fs.writeFileSync(
37 | path.resolve(__dirname, "../package.json"),
38 | JSON.stringify(packageJson, null, 2),
39 | );
40 |
--------------------------------------------------------------------------------
/ts/script/remove-exports.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const fs = require("fs");
4 | const path = require("path");
5 |
6 | const packageJson = JSON.parse(
7 | fs.readFileSync(path.resolve(__dirname, "../package.json"), "utf8"),
8 | );
9 | delete packageJson.exports;
10 | fs.writeFileSync(
11 | path.resolve(__dirname, "../package.json"),
12 | JSON.stringify(packageJson, null, 2),
13 | );
14 |
--------------------------------------------------------------------------------
/ts/src/deprecated/index.akash.cert.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/cert/v1beta1/cert";
4 |
--------------------------------------------------------------------------------
/ts/src/deprecated/index.akash.market.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/market/v1beta1/bid";
4 | export * from "./akash/market/v1beta1/lease";
5 |
--------------------------------------------------------------------------------
/ts/src/deprecated/typeRegistry.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import * as _m0 from "protobufjs/minimal";
3 | import Long from "long";
4 |
5 | export interface MessageType {
6 | $type: Message["$type"];
7 | encode(message: Message, writer?: _m0.Writer): _m0.Writer;
8 | decode(input: _m0.Reader | Uint8Array, length?: number): Message;
9 | fromJSON(object: any): Message;
10 | toJSON(message: Message): unknown;
11 | fromPartial(object: DeepPartial): Message;
12 | }
13 |
14 | export type UnknownMessage = { $type: string };
15 |
16 | export const messageTypeRegistry = new Map();
17 |
18 | type Builtin =
19 | | Date
20 | | Function
21 | | Uint8Array
22 | | string
23 | | number
24 | | boolean
25 | | undefined;
26 | export type DeepPartial = T extends Builtin
27 | ? T
28 | : T extends Long
29 | ? string | number | Long
30 | : T extends Array
31 | ? Array>
32 | : T extends ReadonlyArray
33 | ? ReadonlyArray>
34 | : T extends {}
35 | ? { [K in Exclude]?: DeepPartial }
36 | : Partial;
37 |
--------------------------------------------------------------------------------
/ts/src/generated/akash/take/v1beta3/query.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | /** Query defines the gRPC querier service */
4 | export interface Query {}
5 |
6 | export const QueryServiceName = "akash.take.v1beta3.Query";
7 | export class QueryClientImpl implements Query {
8 | private readonly rpc: Rpc;
9 | private readonly service: string;
10 | constructor(rpc: Rpc, opts?: { service?: string }) {
11 | this.service = opts?.service || QueryServiceName;
12 | this.rpc = rpc;
13 | }
14 | }
15 |
16 | interface Rpc {
17 | request(
18 | service: string,
19 | method: string,
20 | data: Uint8Array,
21 | ): Promise;
22 | }
23 |
--------------------------------------------------------------------------------
/ts/src/generated/cosmos/base/v1beta1/coin.ts:
--------------------------------------------------------------------------------
1 | export * from "../../../../patch/cosmos/base/v1beta1/coin";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/cosmos_proto/cosmos.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export {};
4 |
--------------------------------------------------------------------------------
/ts/src/generated/gogoproto/gogo.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export {};
4 |
--------------------------------------------------------------------------------
/ts/src/generated/google/api/annotations.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export {};
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.audit.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.audit.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.audit.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/audit/v1beta1/audit";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.audit.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/audit/v1beta2/audit";
4 | export * from "./akash/audit/v1beta2/query";
5 | export * from "./akash/audit/v1beta2/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.audit.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/audit/v1beta3/audit";
4 | export * from "./akash/audit/v1beta3/query";
5 | export * from "./akash/audit/v1beta3/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.base.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.base.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.base.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/base/v1beta1/attribute";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.base.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/base/v1beta2/attribute";
4 | export * from "./akash/base/v1beta2/resourcevalue";
5 | export * from "./akash/base/v1beta2/resource";
6 | export * from "./akash/base/v1beta2/endpoint";
7 | export * from "./akash/base/v1beta2/resourceunits";
8 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.base.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/base/v1beta3/attribute";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.cert.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.cert.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.cert.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/cert/v1beta2/cert";
4 | export * from "./akash/cert/v1beta2/query";
5 | export * from "./akash/cert/v1beta2/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.cert.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/cert/v1beta3/cert";
4 | export * from "./akash/cert/v1beta3/query";
5 | export * from "./akash/cert/v1beta3/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.deployment.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.deployment.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.deployment.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/deployment/v1beta1/group";
4 | export * from "./akash/deployment/v1beta1/deployment";
5 | export * from "./akash/deployment/v1beta1/query";
6 | export * from "./akash/deployment/v1beta1/authz";
7 | export * from "./akash/deployment/v1beta1/params";
8 | export * from "./akash/deployment/v1beta1/genesis";
9 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.deployment.v1beta2.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/deployment/v1beta2/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.deployment.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/deployment/v1beta2/resource";
4 | export * from "./akash/deployment/v1beta2/groupspec";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.deployment.v1beta3.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/deployment/v1beta3/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.deployment.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/deployment/v1beta3/resourceunit";
4 | export * from "./akash/deployment/v1beta3/groupspec";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.discovery.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1 from "./index.akash.discovery.v1";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.discovery.v1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/discovery/v1/client_info";
4 | export * from "./akash/discovery/v1/akash";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.escrow.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.escrow.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.escrow.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/escrow/v1beta1/types";
4 | export * from "./akash/escrow/v1beta1/query";
5 | export * from "./akash/escrow/v1beta1/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.escrow.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/escrow/v1beta2/types";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.escrow.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/escrow/v1beta3/types";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.gov.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.gov.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.gov.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/gov/v1beta3/params";
4 | export * from "./akash/gov/v1beta3/genesis";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.inflation.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.inflation.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.inflation.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/inflation/v1beta2/params";
4 | export * from "./akash/inflation/v1beta2/genesis";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.inflation.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/inflation/v1beta3/params";
4 | export * from "./akash/inflation/v1beta3/genesis";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.inventory.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1 from "./index.akash.inventory.v1";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.inventory.v1.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/inventory/v1/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.inventory.v1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/inventory/v1/resourcepair";
4 | export * from "./akash/inventory/v1/cpu";
5 | export * from "./akash/inventory/v1/gpu";
6 | export * from "./akash/inventory/v1/memory";
7 | export * from "./akash/inventory/v1/resources";
8 | export * from "./akash/inventory/v1/node";
9 | export * from "./akash/inventory/v1/storage";
10 | export * from "./akash/inventory/v1/cluster";
11 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.manifest.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v2beta2 from "./index.akash.manifest.v2beta2";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.manifest.v2beta1.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/manifest/v2beta1/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.manifest.v2beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/manifest/v2beta1/httpoptions";
4 | export * from "./akash/manifest/v2beta1/serviceexpose";
5 | export * from "./akash/manifest/v2beta1/service";
6 | export * from "./akash/manifest/v2beta1/group";
7 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.manifest.v2beta2.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/manifest/v2beta2/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.manifest.v2beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/manifest/v2beta2/httpoptions";
4 | export * from "./akash/manifest/v2beta2/serviceexpose";
5 | export * from "./akash/manifest/v2beta2/service";
6 | export * from "./akash/manifest/v2beta2/group";
7 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta4 from "./index.akash.market.v1beta4";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.v1beta2.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/market/v1beta2/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/market/v1beta2/order";
4 | export * from "./akash/market/v1beta2/bid";
5 | export * from "./akash/market/v1beta2/lease";
6 | export * from "./akash/market/v1beta2/query";
7 | export * from "./akash/market/v1beta2/service";
8 | export * from "./akash/market/v1beta2/params";
9 | export * from "./akash/market/v1beta2/genesis";
10 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.v1beta3.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/market/v1beta3/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/market/v1beta3/order";
4 | export * from "./akash/market/v1beta3/bid";
5 | export * from "./akash/market/v1beta3/lease";
6 | export * from "./akash/market/v1beta3/query";
7 | export * from "./akash/market/v1beta3/service";
8 | export * from "./akash/market/v1beta3/params";
9 | export * from "./akash/market/v1beta3/genesis";
10 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.v1beta4.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/market/v1beta4/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.market.v1beta4.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/market/v1beta4/order";
4 | export * from "./akash/market/v1beta4/bid";
5 | export * from "./akash/market/v1beta4/lease";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.lease.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1 from "./index.akash.provider.lease.v1";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.lease.v1.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/provider/lease/v1/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.lease.v1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/provider/lease/v1/service";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1 from "./index.akash.provider.v1";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.v1.grpc-js.ts:
--------------------------------------------------------------------------------
1 | export * from "./akash/provider/v1/service.grpc-js";
2 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.v1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/provider/v1/status";
4 | export * from "./akash/provider/v1/service";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/provider/v1beta1/provider";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.v1beta2.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/provider/v1beta2/provider";
4 | export * from "./akash/provider/v1beta2/query";
5 | export * from "./akash/provider/v1beta2/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.provider.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/provider/v1beta3/provider";
4 | export * from "./akash/provider/v1beta3/query";
5 | export * from "./akash/provider/v1beta3/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.staking.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.staking.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.staking.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/staking/v1beta3/params";
4 | export * from "./akash/staking/v1beta3/genesis";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.take.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta3 from "./index.akash.take.v1beta3";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.take.v1beta3.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./akash/take/v1beta3/query";
4 | export * from "./akash/take/v1beta3/params";
5 | export * from "./akash/take/v1beta3/genesis";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.akash.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as base from "./index.akash.base";
4 | export * as inventory from "./index.akash.inventory";
5 | export * as provider from "./index.akash.provider";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.cosmos.base.query.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta1 from "./index.cosmos.base.query.v1beta1";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.cosmos.base.query.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./cosmos/base/query/v1beta1/pagination";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.cosmos.base.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as v1beta1 from "./index.cosmos.base.v1beta1";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.cosmos.base.v1beta1.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./cosmos/base/v1beta1/coin";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.cosmos.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as base from "./index.cosmos.base";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.cosmos_proto.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./cosmos_proto/cosmos";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.gogoproto.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./gogoproto/gogo";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.google.api.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./google/api/http";
4 | export * from "./google/api/annotations";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.google.protobuf.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./google/protobuf/timestamp";
4 | export * from "./google/protobuf/descriptor";
5 | export * from "./google/protobuf/empty";
6 |
--------------------------------------------------------------------------------
/ts/src/generated/index.google.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as protobuf from "./index.google.protobuf";
4 | export * as api from "./index.google.api";
5 |
--------------------------------------------------------------------------------
/ts/src/generated/index.k8s.io.apimachinery.pkg.api.resource.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./k8s.io/apimachinery/pkg/api/resource/generated";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.k8s.io.apimachinery.pkg.api.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as resource from "./index.k8s.io.apimachinery.pkg.api.resource";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.k8s.io.apimachinery.pkg.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as api from "./index.k8s.io.apimachinery.pkg.api";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.k8s.io.apimachinery.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as pkg from "./index.k8s.io.apimachinery.pkg";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.k8s.io.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as apimachinery from "./index.k8s.io.apimachinery";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.k8s.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as io from "./index.k8s.io";
4 |
--------------------------------------------------------------------------------
/ts/src/generated/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * as google from "./index.google";
4 | export * as gogoproto from "./index.gogoproto";
5 | export * as akash from "./index.akash";
6 | export * as k8s from "./index.k8s";
7 |
--------------------------------------------------------------------------------
/ts/src/generated/typeRegistry.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import Long from "long";
3 | import _m0 from "protobufjs/minimal";
4 |
5 | export interface MessageType {
6 | $type: Message["$type"];
7 | encode(message: Message, writer?: _m0.Writer): _m0.Writer;
8 | decode(input: _m0.Reader | Uint8Array, length?: number): Message;
9 | fromJSON(object: any): Message;
10 | toJSON(message: Message): unknown;
11 | fromPartial(object: DeepPartial): Message;
12 | }
13 |
14 | export type UnknownMessage = { $type: string };
15 |
16 | export const messageTypeRegistry = new Map();
17 |
18 | type Builtin =
19 | | Date
20 | | Function
21 | | Uint8Array
22 | | string
23 | | number
24 | | boolean
25 | | undefined;
26 | type DeepPartial = T extends Builtin
27 | ? T
28 | : T extends Long
29 | ? string | number | Long
30 | : T extends globalThis.Array
31 | ? globalThis.Array>
32 | : T extends ReadonlyArray
33 | ? ReadonlyArray>
34 | : T extends {}
35 | ? { [K in Exclude]?: DeepPartial }
36 | : Partial;
37 |
--------------------------------------------------------------------------------
/ts/src/index.v1beta1.ts:
--------------------------------------------------------------------------------
1 | export {
2 | MsgSignProviderAttributes,
3 | MsgDeleteProviderAttributes,
4 | } from "./generated/index.akash.audit.v1beta1";
5 | export {
6 | MsgCloseGroup,
7 | MsgPauseGroup,
8 | MsgStartGroup,
9 | MsgCreateDeployment,
10 | MsgDepositDeployment,
11 | MsgUpdateDeployment,
12 | MsgCloseDeployment,
13 | } from "./generated/index.akash.deployment.v1beta1";
14 | export {
15 | MsgCreateProvider,
16 | MsgUpdateProvider,
17 | MsgDeleteProvider,
18 | } from "./generated/index.akash.provider.v1beta1";
19 | export {
20 | MsgCreateCertificate,
21 | MsgRevokeCertificate,
22 | } from "./deprecated/index.akash.cert.v1beta1";
23 | export {
24 | MsgCreateBid,
25 | MsgCloseBid,
26 | MsgCreateLease,
27 | MsgWithdrawLease,
28 | MsgCloseLease,
29 | } from "./deprecated/index.akash.market.v1beta1";
30 |
--------------------------------------------------------------------------------
/ts/src/index.v1beta2.ts:
--------------------------------------------------------------------------------
1 | export {
2 | MsgSignProviderAttributes,
3 | MsgDeleteProviderAttributes,
4 | } from "./generated/index.akash.audit.v1beta2";
5 | export {
6 | MsgCreateCertificate,
7 | MsgRevokeCertificate,
8 | } from "./generated/index.akash.cert.v1beta2";
9 | export {
10 | MsgCloseGroup,
11 | MsgPauseGroup,
12 | MsgStartGroup,
13 | MsgCreateDeployment,
14 | MsgDepositDeployment,
15 | MsgUpdateDeployment,
16 | MsgCloseDeployment,
17 | } from "./patch/index.akash.deployment.v1beta2";
18 | export {
19 | MsgCreateBid,
20 | MsgCloseBid,
21 | } from "./generated/index.akash.market.v1beta2";
22 | export {
23 | MsgCreateLease,
24 | MsgWithdrawLease,
25 | MsgCloseLease,
26 | } from "./generated/index.akash.market.v1beta2";
27 | export {
28 | MsgCreateProvider,
29 | MsgUpdateProvider,
30 | MsgDeleteProvider,
31 | } from "./generated/index.akash.provider.v1beta2";
32 | export { Storage } from "./generated/index.akash.base.v1beta2";
33 |
--------------------------------------------------------------------------------
/ts/src/index.v1beta3.ts:
--------------------------------------------------------------------------------
1 | export {
2 | MsgSignProviderAttributes,
3 | MsgDeleteProviderAttributes,
4 | } from "./generated/index.akash.audit.v1beta3";
5 | export {
6 | MsgCreateCertificate,
7 | MsgRevokeCertificate,
8 | } from "./generated/index.akash.cert.v1beta3";
9 | export {
10 | MsgCloseGroup,
11 | MsgPauseGroup,
12 | MsgStartGroup,
13 | DepositDeploymentAuthorization,
14 | MsgCreateDeployment,
15 | MsgDepositDeployment,
16 | MsgUpdateDeployment,
17 | MsgCloseDeployment,
18 | } from "./patch/index.akash.deployment.v1beta3";
19 | export {
20 | MsgCreateBid,
21 | MsgCloseBid,
22 | } from "./generated/index.akash.market.v1beta3";
23 | export {
24 | MsgCreateLease,
25 | MsgWithdrawLease,
26 | MsgCloseLease,
27 | } from "./generated/index.akash.market.v1beta3";
28 | export {
29 | MsgCreateProvider,
30 | MsgUpdateProvider,
31 | MsgDeleteProvider,
32 | } from "./generated/index.akash.provider.v1beta3";
33 | export { Storage, GPU } from "./patch/index.akash.base.v1beta3";
34 |
--------------------------------------------------------------------------------
/ts/src/index.v1beta4.ts:
--------------------------------------------------------------------------------
1 | export {
2 | MsgCreateBid,
3 | MsgCloseBid,
4 | MsgCreateLease,
5 | MsgWithdrawLease,
6 | MsgCloseLease,
7 | } from "./generated/index.akash.market.v1beta4";
8 |
--------------------------------------------------------------------------------
/ts/src/patch/cosmos/base/v1beta1/coin.spec.ts:
--------------------------------------------------------------------------------
1 | import { Reader } from "protobufjs/minimal";
2 |
3 | import * as coin from "./coin";
4 |
5 | describe("DecCoin", () => {
6 | describe("prototype.decode", () => {
7 | it("should properly decode whole amount", () => {
8 | const encodedCoin = coin.DecCoin.encode({
9 | $type: "cosmos.base.v1beta1.DecCoin",
10 | denom: "",
11 | amount: "1000",
12 | }).finish();
13 | const reader = new Reader(encodedCoin);
14 | const result = coin.DecCoin.decode(reader);
15 |
16 | expect(result.amount).toEqual("1000.00000000000000");
17 | });
18 |
19 | it("should properly decode amount with a floating point", () => {
20 | const encodedCoin = coin.DecCoin.encode({
21 | $type: "cosmos.base.v1beta1.DecCoin",
22 | denom: "",
23 | amount: "1000.5",
24 | }).finish();
25 | const reader = new Reader(encodedCoin);
26 | const result = coin.DecCoin.decode(reader);
27 |
28 | expect(result.amount).toEqual("1000.50000000000000");
29 | });
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/ts/src/patch/cosmos/base/v1beta1/coin.ts:
--------------------------------------------------------------------------------
1 | import * as minimal from "protobufjs/minimal";
2 | import { Reader } from "protobufjs/minimal";
3 |
4 | import * as coin from "../../../../generated/cosmos/base/v1beta1/coin.original";
5 | import { DecCoin } from "../../../../generated/cosmos/base/v1beta1/coin.original";
6 |
7 | const originalEncode = coin.DecCoin.encode;
8 |
9 | coin.DecCoin.encode = function encode(
10 | message: DecCoin,
11 | writer: minimal.Writer = minimal.Writer.create(),
12 | ): minimal.Writer {
13 | const { amount } = message;
14 | const parts = amount.includes(".")
15 | ? message.amount.split(".")
16 | : [message.amount, ""];
17 | message.amount = `${parts[0]}${parts[1].padEnd(18, "0")}`;
18 |
19 | return originalEncode.apply(this, [message, writer]);
20 | };
21 |
22 | const originalDecode = coin.DecCoin.decode;
23 |
24 | coin.DecCoin.decode = function decode(
25 | input: Reader | Uint8Array,
26 | length?: number,
27 | ): coin.DecCoin {
28 | const message = originalDecode.apply(this, [input, length]);
29 | message.amount = (parseInt(message.amount) / 10 ** 18).toPrecision(18);
30 |
31 | return message;
32 | };
33 |
34 | export * from "../../../../generated/cosmos/base/v1beta1/coin.original";
35 |
--------------------------------------------------------------------------------
/ts/src/patch/index.akash.base.v1beta3.ts:
--------------------------------------------------------------------------------
1 | export * from "../generated/index.akash.base.v1beta3";
2 | export * from "../generated/akash/base/v1beta3/storage";
3 | export * from "../generated/akash/base/v1beta3/gpu";
4 |
--------------------------------------------------------------------------------
/ts/src/patch/index.akash.base.v1beta4.ts:
--------------------------------------------------------------------------------
1 | export * from "../generated/index.akash.base.v1beta3";
2 | export * from "../generated/akash/base/v1beta3/storage";
3 | export * from "../generated/akash/base/v1beta3/gpu";
4 |
--------------------------------------------------------------------------------
/ts/src/patch/index.akash.deployment.v1beta2.ts:
--------------------------------------------------------------------------------
1 | export * from "../generated/index.akash.deployment.v1beta2";
2 | export * from "../generated/akash/deployment/v1beta2/groupmsg";
3 | export * from "../generated/akash/deployment/v1beta2/deploymentmsg";
4 |
--------------------------------------------------------------------------------
/ts/src/patch/index.akash.deployment.v1beta3.ts:
--------------------------------------------------------------------------------
1 | export * from "../generated/index.akash.deployment.v1beta3";
2 | export * from "../generated/akash/deployment/v1beta3/groupmsg";
3 | export * from "../generated/akash/deployment/v1beta3/deploymentmsg";
4 | export * from "../generated/akash/deployment/v1beta3/authz";
5 | export * from "../generated/akash/deployment/v1beta3/query";
6 |
--------------------------------------------------------------------------------
/ts/src/patch/index.akash.market.v1beta4.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | export * from "./../generated/index.akash.market.v1beta4";
4 | export * from "./../generated/akash/market/v1beta4/query";
5 | export * from "./../generated/akash/market/v1beta4/service";
6 |
--------------------------------------------------------------------------------
/ts/static-exports.json:
--------------------------------------------------------------------------------
1 | {
2 | "package": {
3 | "./": "./dist/index.js",
4 | "./typeRegistry": "./dist/generated/typeRegistry.js",
5 | "./akash/deployment/v1beta3/query": "./dist/generated/akash/deployment/v1beta3/query.js",
6 | "./deprecated/akash/cert/v1beta1": "./dist/deprecated/index.akash.cert.v1beta1.js",
7 | "./deprecated/akash/market/v1beta1": "./dist/deprecated/index.akash.market.v1beta1.js",
8 | "./v1beta1": "./dist/index.v1beta1.js",
9 | "./v1beta2": "./dist/index.v1beta2.js",
10 | "./v1beta3": "./dist/index.v1beta3.js",
11 | "./v1beta4": "./dist/index.v1beta4.js"
12 | },
13 | "tsconfig": {
14 | "@akashnetwork/akash-api/typeRegistry": ["./dist/generated/typeRegistry"],
15 | "@akashnetwork/akash-api/akash/deployment/v1beta3/query": [
16 | "./dist/generated/akash/deployment/v1beta3/query"
17 | ],
18 | "@akashnetwork/akash-api/deprecated/akash/cert/v1beta1": [
19 | "./dist/deprecated/index.akash.cert.v1beta1"
20 | ],
21 | "@akashnetwork/akash-api/deprecated/akash/market/v1beta1": [
22 | "./dist/deprecated/index.akash.market.v1beta1"
23 | ],
24 | "@akashnetwork/akash-api/v1beta1": ["./dist/index.v1beta1"],
25 | "@akashnetwork/akash-api/v1beta2": ["./dist/index.v1beta2"],
26 | "@akashnetwork/akash-api/v1beta3": ["./dist/index.v1beta3"],
27 | "@akashnetwork/akash-api/v1beta4": ["./dist/index.v1beta4"]
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/ts/test/setup-functional-tests.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akash-network/akash-api/54ff680ee252bf2074f25d87522e317c8116d18c/ts/test/setup-functional-tests.ts
--------------------------------------------------------------------------------
/ts/test/setup-unit-tests.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akash-network/akash-api/54ff680ee252bf2074f25d87522e317c8116d18c/ts/test/setup-unit-tests.ts
--------------------------------------------------------------------------------
/ts/test/setup.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akash-network/akash-api/54ff680ee252bf2074f25d87522e317c8116d18c/ts/test/setup.ts
--------------------------------------------------------------------------------
/ts/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": ["src/**/*.ts"],
4 | "exclude": ["node_modules", "src/**/*.spec.ts"]
5 | }
6 |
--------------------------------------------------------------------------------
/ts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "baseUrl": ".",
5 | "declaration": true,
6 | "emitDecoratorMetadata": true,
7 | "esModuleInterop": true,
8 | "experimentalDecorators": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "incremental": true,
11 | "module": "commonjs",
12 | "noFallthroughCasesInSwitch": false,
13 | "noImplicitAny": false,
14 | "outDir": "./dist",
15 | "removeComments": true,
16 | "skipLibCheck": true,
17 | "strict": true,
18 | "strictBindCallApply": false,
19 | "strictNullChecks": false,
20 | "target": "es2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------