From c74696438eb56d0028d571065df9d418ffea4f25 Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Tue, 12 Dec 2023 22:11:15 -0600 Subject: [PATCH 1/5] chore: expand .gitignore coverage --- .gitignore | 391 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 388 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1ec9b26..63bfb03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,391 @@ -node_modules -yarn-error.log +# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,windows,node,yarn,visualstudiocode,jetbrains,vim +# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,windows,node,yarn,visualstudiocode,jetbrains,vim + +### CUSTOM ### build -.nyc_output umd + +### JetBrains ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### JetBrains Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +# Azure Toolkit for IntelliJ plugin +# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij +.idea/**/azureSettings.xml + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General .DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Node Patch ### +# Serverless Webpack directories +.webpack/ + +# Optional stylelint cache + +# SvelteKit build / generate output +.svelte-kit + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### yarn ### +# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored + +.yarn/* +!.yarn/releases +!.yarn/patches +!.yarn/plugins +!.yarn/sdks +!.yarn/versions + +# if you are NOT using Zero-installs, then: +# comment the following lines +!.yarn/cache + +# and uncomment the following lines +# .pnp.* + +# End of https://www.toptal.com/developers/gitignore/api/linux,macos,windows,node,yarn,visualstudiocode,jetbrains,vim \ No newline at end of file From bf70035bd6255f996905d3b609ac296ef88fc54d Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Tue, 12 Dec 2023 22:34:35 -0600 Subject: [PATCH 2/5] chore: standardize type management --- src/network/index.ts | 9 +- src/sdl/index.ts | 2 +- src/types/index.ts | 4 + src/types/network.ts | 8 ++ src/types/sharedSdl.ts | 13 +++ src/{sdl/types.ts => types/v2Sdl.ts} | 113 +------------------------ src/types/v3Sdl.ts | 120 +++++++++++++++++++++++++++ 7 files changed, 148 insertions(+), 121 deletions(-) create mode 100644 src/types/index.ts create mode 100644 src/types/network.ts create mode 100644 src/types/sharedSdl.ts rename src/{sdl/types.ts => types/v2Sdl.ts} (59%) create mode 100644 src/types/v3Sdl.ts diff --git a/src/network/index.ts b/src/network/index.ts index ee0db79..b0ff543 100644 --- a/src/network/index.ts +++ b/src/network/index.ts @@ -1,15 +1,8 @@ import fetch from 'node-fetch'; import { performance } from 'perf_hooks'; import { awaitAll, filter, map, prop, sortBy } from '../util'; +import {ENDPOINT_TYPE, NETWORK_TYPE} from "../types"; -type NETWORK_TYPE = - "mainnet" | - "testnet" | - "edgenet"; - -type ENDPOINT_TYPE = - "rpc" | - "rest"; interface INetworkMetadata { "chain_name": string; diff --git a/src/sdl/index.ts b/src/sdl/index.ts index b1d918b..7d864fd 100644 --- a/src/sdl/index.ts +++ b/src/sdl/index.ts @@ -28,7 +28,7 @@ import { v2ServiceParams, v3DeploymentGroup, v3ManifestServiceParams -} from './types'; +} from '../types'; import { convertCpuResourceString, convertResourceString } from './sizes'; import { default as stableStringify } from "json-stable-stringify"; import crypto from "node:crypto"; diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..d698d3d --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,4 @@ +export * from './network' +export * from './sharedSdl' +export * from './v2Sdl' +export * from './v3Sdl' diff --git a/src/types/network.ts b/src/types/network.ts new file mode 100644 index 0000000..a666750 --- /dev/null +++ b/src/types/network.ts @@ -0,0 +1,8 @@ +export type NETWORK_TYPE = + "mainnet" | + "testnet" | + "edgenet"; + +export type ENDPOINT_TYPE = + "rpc" | + "rest"; diff --git a/src/types/sharedSdl.ts b/src/types/sharedSdl.ts new file mode 100644 index 0000000..79fff52 --- /dev/null +++ b/src/types/sharedSdl.ts @@ -0,0 +1,13 @@ +export type ResourceUnits = {} + +export type SignedBy = { + allOf: string[], + anyOf: string[], +} + +export type Attribute = { + key: string, + value: string, +} + +export type Attributes = Attribute[]; diff --git a/src/sdl/types.ts b/src/types/v2Sdl.ts similarity index 59% rename from src/sdl/types.ts rename to src/types/v2Sdl.ts index 0015d8f..fe72133 100644 --- a/src/sdl/types.ts +++ b/src/types/v2Sdl.ts @@ -1,13 +1,7 @@ +import {Attributes, ResourceUnits, SignedBy} from "./sharedSdl"; export type v2Manifest = v2Group[]; -export type v3Manifest = v3Group[]; - -export type v3Group = { - name: string, - services: v3ManifestService[], -} - export type v2Group = { Name: string, Services: v2ManifestService[], @@ -25,18 +19,6 @@ export type v2ManifestService = { params?: v2ManifestServiceParams, } -export type v3ManifestService = { - name: string, - image: string, - command: string[] | null, - args: string[] | null, - env: string[] | null, - resources: ResourceUnits, - count: number - expose: v3ServiceExpose[], - params: v3ManifestServiceParams | null, -} - export type v2ServiceExposeHttpOptions = { MaxBodySize: number, ReadTimeout: number, @@ -46,19 +28,6 @@ export type v2ServiceExposeHttpOptions = { NextCases: string[], } -export type v3ServiceExposeHttpOptions = { - maxBodySize: number, - readTimeout: number, - sendTimeout: number, - nextTries: number, - nextTimeout: number, - nextCases: string[], -} - -export type ResourceUnits = { - -} - export type v2ServiceExpose = { Port: number, ExternalPort: number, @@ -71,26 +40,10 @@ export type v2ServiceExpose = { EndpointSequenceNumber: number, } -export type v3ServiceExpose = { - port: number, - externalPort: number, - proto: string, - service: any, - global: boolean, - hosts: any, - httpOptions: v3ServiceExposeHttpOptions, - ip: string, - endpointSequenceNumber: number, -} - export type v2ManifestServiceParams = { Storage: v2ServiceStorageParams[], } -export type v3ManifestServiceParams = { - storage: v2ServiceStorageParams[], -} - export type v2Sdl = { services: Record, profiles: v2Profiles, @@ -98,13 +51,6 @@ export type v2Sdl = { endpoints: Record, } -export type v3Sdl = { - services: Record, - profiles: v3Profiles, - deployment: Record, - endpoints: Record, -} - export type v2Endpoint = { kind: string, } @@ -181,17 +127,6 @@ export type v2ResourceMemory = { attributes?: Record, } -export type v3GPUAttributes = { - vendor: { - [vendor: string]: Array<{ model: string }> - } -} - -export type v3ResourceGPU = { - units: number | string, - attributes?: v3GPUAttributes, -} - export type v2StorageAttributes = Record; export type v2ResourceStorage = { @@ -208,22 +143,10 @@ export type v2ComputeResources = { storage: v2ResourceStorageArray | v2ResourceStorage, } -export type v3ComputeResources = { - cpu: v2ResourceCPU, - memory: v2ResourceMemory, - storage: v2ResourceStorageArray | v2ResourceStorage, - gpu: v3ResourceGPU, - id: number, -} - export type v2ProfileCompute = { resources: v2ComputeResources, } -export type v3ProfileCompute = { - resources: v3ComputeResources, -} - export type v2PlacementAttributes = Attributes export type v2Coin = { @@ -234,11 +157,6 @@ export type v2Coin = { export type v2PlacementPricing = Record -export type SignedBy = { - allOf: string[], - anyOf: string[], -} - export type v2ProfilePlacement = { attributes: v2PlacementAttributes, signedBy: SignedBy, @@ -249,32 +167,3 @@ export type v2Profiles = { compute: Record, placement: Record, } - -export type v3Profiles = { - compute: Record, - placement: Record, -} - -export type Attribute = { - key: string, - value: string, -} - -export type v3DeploymentGroup = { - name: string, - resources: Array<{ - resource: v3ComputeResources, - price: number, - count: number, - endpoints: Array<{ kind: number; sequence_number: number; }>, - }>, - requirements: { - attributes: Array, - signedBy: { - allOf: string[], - anyOf: string[], - }, - }, -}; - -export type Attributes = Attribute[]; \ No newline at end of file diff --git a/src/types/v3Sdl.ts b/src/types/v3Sdl.ts new file mode 100644 index 0000000..3a792d5 --- /dev/null +++ b/src/types/v3Sdl.ts @@ -0,0 +1,120 @@ +import { + Attribute, + ResourceUnits, + v2Deployment, + v2Endpoint, + v2ProfilePlacement, + v2ResourceCPU, + v2ResourceMemory, + v2ResourceStorage, + v2ResourceStorageArray, + v2Service, + v2ServiceStorageParams +} from "./index"; + +export type v3Manifest = v3Group[]; + +export type v3Group = { + name: string, + services: v3ManifestService[], +} + +export type v3ManifestService = { + name: string, + image: string, + command: string[] | null, + args: string[] | null, + env: string[] | null, + resources: ResourceUnits, + count: number + expose: v3ServiceExpose[], + params: v3ManifestServiceParams | null, +} + +export type v3ServiceExposeHttpOptions = { + maxBodySize: number, + readTimeout: number, + sendTimeout: number, + nextTries: number, + nextTimeout: number, + nextCases: string[], +} + +export type v3ServiceExpose = { + port: number, + externalPort: number, + proto: string, + service: any, + global: boolean, + hosts: any, + httpOptions: v3ServiceExposeHttpOptions, + ip: string, + endpointSequenceNumber: number, +} + +export type v3ManifestServiceParams = { + storage: v3ServiceStorageParams[], +} + +export type v3Sdl = { + services: Record, + profiles: v3Profiles, + deployment: Record, + endpoints: Record, +} + +export type v3GPUAttributes = { + vendor: { + [vendor: string]: Array<{ model: string }> + } +} + +export type v3ResourceGPU = { + units: number | string, + attributes?: v3GPUAttributes, +} + +export type v3ComputeResources = { + cpu: v3ResourceCPU, + memory: v3ResourceMemory, + storage: v3ResourceStorageArray | v3ResourceStorage, + gpu: v3ResourceGPU, + id: number, +} + +export type v3ProfileCompute = { + resources: v3ComputeResources, +} + +export type v3Profiles = { + compute: Record, + placement: Record, +} + +export type v3DeploymentGroup = { + name: string, + resources: Array<{ + resource: v3ComputeResources, + price: number, + count: number, + endpoints: Array<{ kind: number; sequence_number: number; }>, + }>, + requirements: { + attributes: Array, + signedBy: { + allOf: string[], + anyOf: string[], + }, + }, +}; + +/* wrappers */ +export type v3ServiceStorageParams = v2ServiceStorageParams +export type v3Service = v2Service +export type v3Deployment = v2Deployment +export type v3Endpoint = v2Endpoint +export type v3ResourceCPU = v2ResourceCPU +export type v3ResourceMemory = v2ResourceMemory +export type v3ResourceStorageArray = v2ResourceStorageArray +export type v3ResourceStorage = v2ResourceStorage +export type v3ProfilePlacement = v2ProfilePlacement From 86ea46687900bc95a637330378695363f65b94b9 Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Tue, 12 Dec 2023 22:57:16 -0600 Subject: [PATCH 3/5] chore: stargate messages enum switched to use protos --- src/stargate/index.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/stargate/index.ts b/src/stargate/index.ts index 4f54f86..9906012 100644 --- a/src/stargate/index.ts +++ b/src/stargate/index.ts @@ -3,6 +3,9 @@ import { messageTypeRegistry, UnknownMessage, } from "../protobuf/typeRegistry"; +import {protobufPackage as protobufPackageCert} from "../protobuf/akash/cert/v1beta3/query"; +import {protobufPackage as protobufPackageDeployment} from "../protobuf/akash/deployment/v1beta3/query"; +import {protobufPackage as protobufPackageMarket} from "../protobuf/akash/market/v1beta4/query"; export const getAkashTypeRegistry: () => [ string, @@ -13,16 +16,15 @@ export const getAkashTypeRegistry: () => [ export const getTypeUrl: (type: MessageType) => string = (type) => `/${type.$type}`; -/* TODO: this should be generated from the proto files */ export enum messages { - MsgCreateCertificate = "/akash.cert.v1beta3.MsgCreateCertificate", - MsgRevokeCertificate = "/akash.cert.v1beta3.MsgRevokeCertificate", - MsgCreateDeployment = "/akash.deployment.v1beta3.MsgCreateDeployment", - MsgCloseDeployment = "/akash.deployment.v1beta3.MsgCloseDeployment", - MsgDepositDeployment = "/akash.deployment.v1beta3.MsgDepositDeployment", - MsgUpdateDeployment = "/akash.deployment.v1beta3.MsgUpdateDeployment", - MsgCloseGroup = "/akash.deployment.v1beta3.MsgCloseGroup", - MsgPauseGroup = "/akash.deployment.v1beta3.MsgPauseGroup", - MsgStartGroup = "/akash.deployment.v1beta3.MsgStartGroup", - MsgCreateLease = "/akash.market.v1beta4.MsgCreateLease", + MsgCreateCertificate = `/${protobufPackageCert}.MsgCreateCertificate`, + MsgRevokeCertificate = `/${protobufPackageCert}.MsgRevokeCertificate`, + MsgCreateDeployment = `/${protobufPackageDeployment}.MsgCreateDeployment`, + MsgCloseDeployment = `/${protobufPackageDeployment}.MsgCloseDeployment`, + MsgDepositDeployment = `/${protobufPackageDeployment}.MsgDepositDeployment`, + MsgUpdateDeployment = `/${protobufPackageDeployment}.MsgUpdateDeployment`, + MsgCloseGroup = `/${protobufPackageDeployment}.MsgCloseGroup`, + MsgPauseGroup = `/${protobufPackageDeployment}.MsgPauseGroup`, + MsgStartGroup = `/${protobufPackageDeployment}.MsgStartGroup`, + MsgCreateLease = `/${protobufPackageMarket}.MsgCreateLease`, } From d1b4e7a0b6aa227628c7f8163d3beaa3fe5374ac Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Tue, 12 Dec 2023 23:03:38 -0600 Subject: [PATCH 4/5] chore: add network metadata caching --- src/network/index.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/network/index.ts b/src/network/index.ts index b0ff543..e1f06dd 100644 --- a/src/network/index.ts +++ b/src/network/index.ts @@ -3,6 +3,7 @@ import { performance } from 'perf_hooks'; import { awaitAll, filter, map, prop, sortBy } from '../util'; import {ENDPOINT_TYPE, NETWORK_TYPE} from "../types"; +let networkMetadata: INetworkMetadata | null = null interface INetworkMetadata { "chain_name": string; @@ -43,10 +44,21 @@ interface INetworkMetadata { } } -// TODO: this should probably be cached to avoid pulling for every request export async function getMetadata(network: NETWORK_TYPE): Promise { - return fetch(`https://raw.githubusercontent.com/ovrclk/net/master/${network}/meta.json`) - .then(res => res.json()); + if (networkMetadata) { + return networkMetadata + } else { + return fetch(`https://raw.githubusercontent.com/ovrclk/net/master/${network}/meta.json`) + .then(res => res.json()) + .then(res => { + networkMetadata = res; + return res; + }) + .catch(err => { + throw err + }); + } + } export function getEndpoints(network: NETWORK_TYPE, type: ENDPOINT_TYPE) { From 80572cf6739eb814a25eb51a0f6c85414a1e1ec1 Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Tue, 12 Dec 2023 23:15:46 -0600 Subject: [PATCH 5/5] chore: tidy deps and imports --- package.json | 7 +------ src/rpc/index.ts | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index ee6427a..7280453 100644 --- a/package.json +++ b/package.json @@ -28,21 +28,16 @@ "@cosmjs/stargate": "^0.28.0", "@cosmjs/tendermint-rpc": "^0.25.4", "asn1js": "^2.1.1", - "atob": "^2.1.2", - "axios": "^0.24.0", "console-browserify": "^1.2.0", - "cosmwasm": "^1.1.1", "js-yaml": "^4.1.0", "json-stable-stringify": "^1.0.2", "keytar": "^7.7.0", - "node-fetch": "2", + "node-fetch": "2.6.2", "pkijs": "^2.1.95", - "process": "^0.11.10", "pvutils": "^1.0.17", "simple-jsonrpc-js": "^1.2.0" }, "devDependencies": { - "@types/atob": "^2.1.2", "@types/js-yaml": "^4.0.5", "@types/json-stable-stringify": "^1.0.34", "@types/node-fetch": "2", diff --git a/src/rpc/index.ts b/src/rpc/index.ts index e5e7ba2..df6462b 100644 --- a/src/rpc/index.ts +++ b/src/rpc/index.ts @@ -2,7 +2,6 @@ import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { createProtobufRpcClient, GasPrice, QueryClient, SigningStargateClient, SigningStargateClientOptions } from "@cosmjs/stargate"; import { getAkashTypeRegistry } from "../stargate"; import { OfflineSigner, Registry } from "@cosmjs/proto-signing"; -import { Decimal } from "cosmwasm"; export async function getRpc(endpoint: string) { return getQueryClient(endpoint);