Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Dec 19, 2024
1 parent 8be7bc2 commit 83829f9
Show file tree
Hide file tree
Showing 142 changed files with 328 additions and 44,948 deletions.
479 changes: 275 additions & 204 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"commitlint": "commitlint --edit",
"dev:watch": "tsc -- --watch",
"format": "prettier --write './**/*.{js,ts,json}' --config ./.prettierrc",
"postinstall": "patch-package",
"lint": "eslint . --ext .js,.ts,.json -c .eslintrc.json",
"lint:fix": "npm run lint -- --fix",
"prepublishOnly": "npm run build:production",
Expand All @@ -46,9 +47,10 @@
]
},
"dependencies": {
"@akashnetwork/akash-api": "^1.4.0",
"@akashnetwork/akash-api": "file:../../go-projects/akash-api/ts",
"@bufbuild/protobuf": "2.0.0",
"@cosmjs/amino": "^0.32.4",
"@cosmjs/launchpad": "^0.27.0",
"@cosmjs/launchpad": "^0.27.1",
"@cosmjs/proto-signing": "^0.32.4",
"@cosmjs/stargate": "^0.32.4",
"@cosmjs/tendermint-rpc": "^0.32.4",
Expand All @@ -60,13 +62,13 @@
"json-stable-stringify": "^1.0.2",
"jsrsasign": "^11.1.0",
"keytar": "^7.7.0",
"lodash": "^4.17.21",
"node-fetch": "2",
"pkijs": "^3.0.0",
"process": "^0.11.10",
"pvutils": "^1.0.17",
"simple-jsonrpc-js": "^1.2.0",
"sort-json": "^2.0.1",
"lodash": "^4.17.21"
"sort-json": "^2.0.1"
},
"devDependencies": {
"@commitlint/cli": "^19.2.2",
Expand Down Expand Up @@ -95,6 +97,7 @@
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"node-polyfill-webpack-plugin": "^1.1.4",
"patch-package": "^8.0.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.1",
"sinon": "^13.0.1",
Expand Down
29 changes: 29 additions & 0 deletions patches/@cosmjs+proto-signing+0.32.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/node_modules/@cosmjs/proto-signing/build/registry.d.ts b/node_modules/@cosmjs/proto-signing/build/registry.d.ts
index c6efeeb..21c0e86 100644
--- a/node_modules/@cosmjs/proto-signing/build/registry.d.ts
+++ b/node_modules/@cosmjs/proto-signing/build/registry.d.ts
@@ -2,6 +2,7 @@ import { BinaryWriter } from "cosmjs-types/binary";
import { TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx";
import { Any } from "cosmjs-types/google/protobuf/any";
import type protobuf from "protobufjs";
+import * as buf from "@bufbuild/protobuf";
/**
* A type generated by Telescope 1.0.
*/
@@ -39,7 +40,15 @@ export interface PbjsGeneratedType {
}, writer?: protobuf.Writer) => protobuf.Writer;
readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any;
}
-export type GeneratedType = TelescopeGeneratedType | TsProtoGeneratedType | PbjsGeneratedType;
+
+export interface BufGeneratedType {
+ readonly encode: (message: any | {
+ [k: string]: any;
+ }, writer?: buf.BinaryWriter) => buf.BinaryWriter;
+ readonly decode: (input: Uint8Array | buf.BinaryReader, length?: number) => any;
+ readonly fromPartial: (object: any) => any;
+}
+export type GeneratedType = TelescopeGeneratedType | TsProtoGeneratedType | PbjsGeneratedType | BufGeneratedType;
export declare function isTelescopeGeneratedType(type: GeneratedType): type is TelescopeGeneratedType;
export declare function isTsProtoGeneratedType(type: GeneratedType): type is TsProtoGeneratedType;
export declare function isPbjsGeneratedType(type: GeneratedType): type is PbjsGeneratedType;
2 changes: 1 addition & 1 deletion src/certificates/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SigningStargateClient } from "@cosmjs/stargate";
import { DeliverTxResponse } from "@cosmjs/stargate/build/stargateclient";
import { toBase64 } from "pvutils";
import { CertificateFilter, QueryCertificatesRequest, QueryCertificatesResponse } from "@akashnetwork/akash-api/akash/cert/v1beta3";
import { CertificateFilter, QueryCertificatesRequest, QueryCertificatesResponse } from "@akashnetwork/akash-api/akash/cert/v1";

import type { pems } from "./generate509";
import { Message as stargateMessages } from "../stargate";
Expand Down
3 changes: 1 addition & 2 deletions src/keplr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { getAkashTypeRegistry } from "../stargate";
import { defaultRegistryTypes, SigningStargateClient } from "@cosmjs/stargate";
import { OfflineDirectSigner, OfflineSigner, Registry } from "@cosmjs/proto-signing";
import { AminoTypes } from "@cosmjs/stargate";
import { Certificate } from "@akashnetwork/akash-api/akash/cert/v1beta2";
import { MsgCreateCertificate } from "@akashnetwork/akash-api/deprecated/akash/cert/v1beta1";
import { Certificate, MsgCreateCertificate } from "@akashnetwork/akash-api/akash/cert/v1";

/**
* Represents a blockchain chain.
Expand Down
6 changes: 3 additions & 3 deletions src/pbclient/pbclient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Message } from "../stargate";
import { AminoMsg } from "@cosmjs/amino";
import { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akash-api/akash/cert/v1beta3";
import { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akash-api/akash/cert/v1";

const FEE = {
amount: [
Expand All @@ -14,7 +14,7 @@ const FEE = {

/**
* Creates an Amino message object.
*
*
* @param {Message} message - The type of the message.
* @param {AminoMsg} messageBody - The body of the message.
* @returns {object} The Amino message object.
Expand All @@ -36,7 +36,7 @@ type MessageTypes = {

/**
* Creates a Stargate message object with a fee.
*
*
* @template T
* @param {T} message - The type of the message.
* @param {MessageTypes[T]} messageBody - The body of the message.
Expand Down
Loading

0 comments on commit 83829f9

Please sign in to comment.