Skip to content

Commit

Permalink
Use akash-api protobuf instead of akashjs (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Apr 22, 2024
1 parent 2d8cc9d commit 20c6da2
Show file tree
Hide file tree
Showing 23 changed files with 2,427 additions and 3,093 deletions.
2,049 changes: 955 additions & 1,094 deletions api/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"url": "git+https://github.com/akash-network/cloudmos"
},
"dependencies": {
"@akashnetwork/akashjs": "0.5.0",
"@akashnetwork/akash-api": "^1.0.3",
"@akashnetwork/akashjs": "^0.6.0",
"@chain-registry/assets": "^0.7.1",
"@cosmjs/crypto": "^0.28.11",
"@cosmjs/encoding": "^0.28.11",
Expand Down
14 changes: 5 additions & 9 deletions api/src/proto/akash/v1beta1.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akashjs/build/protobuf/akash/audit/v1beta1/audit";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akash-api/akash/audit/v1beta1";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akashjs/build/protobuf/akash/cert/v1beta1/cert";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta1/group";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akash-api/akash/deployment/v1beta1";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akash-api/akash/provider/v1beta1";
export { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, MsgCloseDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta1";

export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta1/bid";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta1/lease";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta1/provider";
export {
MsgCreateDeployment,
MsgDepositDeployment,
MsgUpdateDeployment,
MsgCloseDeployment
} from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta1/deployment";
19 changes: 7 additions & 12 deletions api/src/proto/akash/v1beta2.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akashjs/build/protobuf/akash/audit/v1beta2/audit";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akashjs/build/protobuf/akash/cert/v1beta2/cert";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta2/groupmsg";
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta2/bid";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta2/lease";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta2/provider";
export {
MsgCreateDeployment,
MsgDepositDeployment,
MsgUpdateDeployment,
MsgCloseDeployment
} from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta2/deploymentmsg";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akash-api/akash/audit/v1beta2";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akash-api/akash/cert/v1beta2";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akash-api/akash/deployment/v1beta2";
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akash-api/akash/market/v1beta2";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akash-api/akash/market/v1beta2";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akash-api/akash/provider/v1beta2";
export { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, MsgCloseDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta2";
21 changes: 8 additions & 13 deletions api/src/proto/akash/v1beta3.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akashjs/build/protobuf/akash/audit/v1beta3/audit";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akashjs/build/protobuf/akash/cert/v1beta3/cert";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta3/groupmsg";
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta3/bid";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta3/lease";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta3/provider";
export {
MsgCreateDeployment,
MsgDepositDeployment,
MsgUpdateDeployment,
MsgCloseDeployment
} from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta3/deploymentmsg";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akash-api/akash/audit/v1beta3";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akash-api/akash/cert/v1beta3";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akash-api/akash/deployment/v1beta3";
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akash-api/akash/market/v1beta3";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akash-api/akash/market/v1beta3";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akash-api/akash/provider/v1beta3";
export { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, MsgCloseDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta3";

export { Storage } from "@akashnetwork/akashjs/build/protobuf/akash/base/v1beta3/storage";
export { Storage } from "@akashnetwork/akash-api/akash/base/v1beta3";
3 changes: 1 addition & 2 deletions api/src/proto/akash/v1beta4.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta4/bid";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta4/lease";
export { MsgCreateBid, MsgCloseBid, MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akash-api/akash/market/v1beta4";
2 changes: 1 addition & 1 deletion api/src/services/db/userDataService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UserAddressName, UserSetting } from "@shared/dbSchemas/user";
import { Transaction } from "sequelize/types";
import { getUserPlan } from "../external/stripeService";
import { Transaction } from "sequelize";

function randomIntFromInterval(min: number, max: number) {
return Math.floor(Math.random() * (max - min + 1) + min);
Expand Down
4 changes: 2 additions & 2 deletions api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"module": "commonjs",
"module": "Node16",
"noImplicitAny": true,
"noEmitOnError": false,
"removeComments": false,
Expand All @@ -11,7 +11,7 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"moduleResolution": "node",
"moduleResolution": "Node16",
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "ES6",
Expand Down
106 changes: 97 additions & 9 deletions deploy-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion deploy-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"postinstall": "patch-package"
},
"dependencies": {
"@akashnetwork/akashjs": "0.5.11",
"@akashnetwork/akash-api": "^1.0.3",
"@akashnetwork/akashjs": "^0.6.0",
"@auth0/nextjs-auth0": "^3.1.0",
"@cosmjs/encoding": "^0.29.5",
"@cosmjs/stargate": "^0.29.5",
Expand Down
4 changes: 1 addition & 3 deletions deploy-web/src/components/sdl/TokenFormControl.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { ReactElement } from "react";
import { FormControl, InputLabel, MenuItem, Select } from "@mui/material";
import { makeStyles } from "tss-react/mui";
import { Control, Controller, Path } from "react-hook-form";
import { FieldValues } from "react-hook-form/dist/types/fields";
import { FieldPathValue } from "react-hook-form/dist/types";
import { Control, Controller, FieldValues, FieldPathValue, Path } from "react-hook-form";

import { Service } from "@src/types";
import { useSdlDenoms } from "@src/hooks/useDenom";
Expand Down
15 changes: 5 additions & 10 deletions deploy-web/src/utils/proto/v1beta1.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
export { DepositDeploymentAuthorization } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta1/authz";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akashjs/build/protobuf/akash/audit/v1beta1/audit";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akash-api/akash/audit/v1beta1";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akashjs/build/protobuf/akash/cert/v1beta1/cert";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta1/group";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akash-api/akash/deployment/v1beta1";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akash-api/akash/provider/v1beta1";
export { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, MsgCloseDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta1";

export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta1/bid";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta1/lease";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta1/provider";
export {
MsgCreateDeployment,
MsgDepositDeployment,
MsgUpdateDeployment,
MsgCloseDeployment
} from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta1/deployment";
22 changes: 7 additions & 15 deletions deploy-web/src/utils/proto/v1beta2.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
export { DepositDeploymentAuthorization } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta2/authz";
export { ProviderInfo } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta2/provider";
export { Attribute } from "@akashnetwork/akashjs/build/protobuf/akash/base/v1beta2/attribute";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akashjs/build/protobuf/akash/audit/v1beta2/audit";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akashjs/build/protobuf/akash/cert/v1beta2/cert";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta2/groupmsg";
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta2/bid";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta2/lease";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta2/provider";
export {
MsgCreateDeployment,
MsgDepositDeployment,
MsgUpdateDeployment,
MsgCloseDeployment
} from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta2/deploymentmsg";
export { MsgSignProviderAttributes, MsgDeleteProviderAttributes } from "@akashnetwork/akash-api/akash/audit/v1beta2";
export { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akash-api/akash/cert/v1beta2";
export { MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "@akashnetwork/akash-api/akash/deployment/v1beta2";
export { MsgCreateBid, MsgCloseBid } from "@akashnetwork/akash-api/akash/market/v1beta2";
export { MsgCreateLease, MsgWithdrawLease, MsgCloseLease } from "@akashnetwork/akash-api/akash/market/v1beta2";
export { MsgCreateProvider, MsgUpdateProvider, MsgDeleteProvider } from "@akashnetwork/akash-api/akash/provider/v1beta2";
export { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, MsgCloseDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta2";
Loading

0 comments on commit 20c6da2

Please sign in to comment.