diff --git a/.github/workflows/run-tests-build.yaml b/.github/workflows/run-tests-build.yaml
new file mode 100644
index 000000000..7355caae6
--- /dev/null
+++ b/.github/workflows/run-tests-build.yaml
@@ -0,0 +1,82 @@
+name: Build Next.js examples
+
+on:
+ workflow_dispatch:
+ pull_request:
+ types: [opened, reopened, synchronize]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ max-parallel: 4
+ fail-fast: true
+ matrix:
+ example:
+ [
+ asset-list,
+ authz,
+ vote-proposal,
+ ibc-transfer,
+ swap-tokens,
+ provide-liquidity,
+ nft,
+ connect-chain,
+ connect-multi-chain,
+ ]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set template_path Environment Variable
+ run: |
+ example_value="${{ matrix.example }}"
+
+ if [[ "$example_value" == "connect-chain" ]] || [[ "$example_value" == "connect-multi-chain" ]]; then
+ echo "template_path=templates" >> $GITHUB_ENV
+ echo "ci_template_path=dest" >> $GITHUB_ENV
+ else
+ echo "template_path=examples" >> $GITHUB_ENV
+ echo "ci_template_path=dest" >> $GITHUB_ENV
+ fi
+
+ - name: Log
+ run: |
+ echo "Using template_path: $template_path"
+ echo "Using ci_template_path: $ci_template_path"
+
+ - name: Clone example
+ run: |
+ echo "Cloning example: ./$template_path/${{ matrix.example }}/" into "${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
+
+ mkdir -p ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
+ cp -r ./$template_path/${{ matrix.example }}/ ${{ github.workspace }}/$ci_template_path/
+ cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Set up Yarn
+ uses: threeal/setup-yarn-action@v2.0.0
+
+ - name: Cache NextJS
+ uses: actions/cache@v4
+ with:
+ path: |
+ ${{ github.workspace }}/.next/cache
+ # Generate a new cache whenever packages or source files change.
+ key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
+ # If source files changed but packages didn't, rebuild from a prior cache.
+ restore-keys: |
+ ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
+
+ - name: Build example project
+ run: |
+ echo "Building example: ${{ matrix.example }} in directory ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}"
+ cd ${{ github.workspace }}/$ci_template_path/${{ matrix.example }}
+ ls -la
+ yarn install
+ yarn build
diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
index e5671e791..885f8e3e3 100644
--- a/.github/workflows/run-tests.yaml
+++ b/.github/workflows/run-tests.yaml
@@ -1,9 +1,9 @@
-name: Run Tests
+name: Run Tests Prod
on:
push:
- pull_request:
- types: [opened, synchronized, reopened]
+ branches:
+ - main
workflow_dispatch:
jobs:
@@ -18,23 +18,23 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
- node-version: "20.x"
+ node-version: '20.x'
- name: Install Dependencies
run: npm install -g create-cosmos-app
+ - name: asset-list
+ run: |
+ cca --example asset-list --name asset-list
+ cd asset-list
+ yarn build
+
- name: vote-proposal
run: |
cca --example vote-proposal --name vote-proposal
cd vote-proposal
yarn build
- # - name: asset-list
- # run: |
- # cca --example asset-list --name asset-list
- # cd asset-list
- # yarn build
-
# - name: ibc-transfer
# run: |
# cca --example ibc-transfer --name ibc-transfer
diff --git a/boilerplates/ts-codegen-npm-module/package.json b/boilerplates/ts-codegen-npm-module/package.json
index be06c2630..23620a779 100644
--- a/boilerplates/ts-codegen-npm-module/package.json
+++ b/boilerplates/ts-codegen-npm-module/package.json
@@ -52,10 +52,10 @@
"publish-scripts": "0.1.0",
"rimraf": "^5.0.0",
"ts-jest": "^29.1.0",
- "typescript": "^5.0.4"
+ "typescript": "^5.1.6"
},
"dependencies": {
"@cosmjs/cosmwasm-stargate": "^0.31.0",
"@cosmwasm/ts-codegen": "^0.31.6"
}
-}
\ No newline at end of file
+}
diff --git a/boilerplates/website/package.json b/boilerplates/website/package.json
index 23bfdeffb..7a2d19f24 100644
--- a/boilerplates/website/package.json
+++ b/boilerplates/website/package.json
@@ -20,7 +20,7 @@
"dependencies": {
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
- "@interchain-ui/react": "^1.21.16",
+ "@interchain-ui/react": "^1.23.16",
"framer-motion": "9.0.7",
"next": "^13",
"react": "18.2.0",
@@ -34,6 +34,6 @@
"eslint": "8.28.0",
"eslint-config-next": "13.0.5",
"generate-lockfile": "0.0.12",
- "typescript": "4.9.3"
+ "typescript": "^5.1.6"
}
}
diff --git a/examples/asset-list/components/common/Layout.tsx b/examples/asset-list/components/common/Layout.tsx
index f4cc76b6a..5ad1053f0 100644
--- a/examples/asset-list/components/common/Layout.tsx
+++ b/examples/asset-list/components/common/Layout.tsx
@@ -13,7 +13,7 @@ export const Layout = ({ children }: { children?: React.ReactNode }) => {
bottom="0"
left="0"
right="0"
- height="max(1dvh, 100%)"
+ flex={1}
backgroundColor={theme === 'light' ? '$white' : '$gray900'}
data-part-id="layout-container"
>
diff --git a/examples/asset-list/components/wallet/WalletConnect.tsx b/examples/asset-list/components/wallet/WalletConnect.tsx
index d6b7d11f0..a39aa02ac 100644
--- a/examples/asset-list/components/wallet/WalletConnect.tsx
+++ b/examples/asset-list/components/wallet/WalletConnect.tsx
@@ -56,16 +56,16 @@ export const ConnectWalletButton = ({
gap="$4"
as="span"
borderRadius="8px"
- // @ts-ignore
- style={{
- zIndex: '1',
- }}
+ zIndex={1}
+ color={useColorModeValue('$textInverse', '$text')}
>
- {buttonText ? buttonText : 'Connect Wallet'}
+
+ {buttonText ? buttonText : 'Connect Wallet'}
+
);
diff --git a/examples/asset-list/package.json b/examples/asset-list/package.json
index a2a3adc1e..7743d2b9b 100644
--- a/examples/asset-list/package.json
+++ b/examples/asset-list/package.json
@@ -27,7 +27,8 @@
"@cosmos-kit/react": "2.10.9",
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
- "@interchain-ui/react": "^1.21.16",
+ "@interchain-ui/react": "^1.23.16",
+ "@interchain-ui/react-no-ssr": "^0.1.2",
"@tanstack/react-query": "4.32.0",
"@uidotdev/usehooks": "2.4.1",
"bignumber.js": "^9.1.2",
@@ -40,18 +41,16 @@
"osmo-query": "16.5.1",
"react": "^18.2",
"react-dom": "^18.2",
- "react-icons": "^4.12.0",
- "react-no-ssr": "1.1.0"
+ "react-icons": "^4.12.0"
},
"devDependencies": {
"@tanstack/react-query-devtools": "4.32.0",
"@types/node": "^20.8.4",
"@types/react": "^18.2.50",
"@types/react-dom": "^18.2.18",
- "@types/react-no-ssr": "^1.1.7",
"eslint": "^8.56.0",
"eslint-config-next": "^14.1.0",
"generate-lockfile": "0.0.12",
- "typescript": "^5"
+ "typescript": "^5.1.6"
}
}
diff --git a/examples/asset-list/pages/_app.tsx b/examples/asset-list/pages/_app.tsx
index cbca34beb..c180e38f7 100644
--- a/examples/asset-list/pages/_app.tsx
+++ b/examples/asset-list/pages/_app.tsx
@@ -69,8 +69,6 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
>
- {/* TODO fix type error */}
- {/* @ts-ignore */}
diff --git a/examples/asset-list/pages/multi-chain.tsx b/examples/asset-list/pages/multi-chain.tsx
index 4a525f9bf..ec33cb413 100644
--- a/examples/asset-list/pages/multi-chain.tsx
+++ b/examples/asset-list/pages/multi-chain.tsx
@@ -1,5 +1,5 @@
import { useState } from 'react';
-import NoSSR from 'react-no-ssr';
+import { ReactNoSSR } from '@interchain-ui/react-no-ssr';
import { ChainName } from 'cosmos-kit';
import { AssetListSection, Layout, WalletSection } from '@/components';
@@ -13,10 +13,9 @@ export default function MultiChain() {
providedChainName={chainName}
setChainName={setChainName}
/>
- {/* TODO fix type error */}
- {/* Type error: This JSX tag's 'children' prop expects a single child of type 'ReactNode', but multiple children were provided. */}
- {/* @ts-ignore */}
- {chainName && }
+
+ {chainName && }
+
);
}
diff --git a/examples/asset-list/pages/single-chain.tsx b/examples/asset-list/pages/single-chain.tsx
index b36309227..664eb1a35 100644
--- a/examples/asset-list/pages/single-chain.tsx
+++ b/examples/asset-list/pages/single-chain.tsx
@@ -1,17 +1,14 @@
-import NoSSR from 'react-no-ssr';
import { defaultChainName } from '@/config';
+import { ReactNoSSR } from '@interchain-ui/react-no-ssr';
import { AssetListSection, Layout, WalletSection } from '@/components';
export default function SingleChain() {
return (
- {/* TODO fix type error */}
- {/* Type error: This JSX tag's 'children' prop expects a single child of type 'ReactNode', but multiple children were provided. */}
- {/* @ts-ignore */}
-
+
-
+
);
}
diff --git a/examples/asset-list/styles/globals.css b/examples/asset-list/styles/globals.css
index 27834ffea..5955056eb 100644
--- a/examples/asset-list/styles/globals.css
+++ b/examples/asset-list/styles/globals.css
@@ -97,4 +97,6 @@ h6 {
#main {
min-height: 100vh;
+ display: flex;
+ flex-direction: column;
}
diff --git a/examples/asset-list/yarn.lock b/examples/asset-list/yarn.lock
index 7bcd960a0..1b5ed1f9c 100644
--- a/examples/asset-list/yarn.lock
+++ b/examples/asset-list/yarn.lock
@@ -707,13 +707,13 @@ __metadata:
"@cosmos-kit/react": "npm:2.10.9"
"@emotion/react": "npm:11.10.6"
"@emotion/styled": "npm:11.10.6"
- "@interchain-ui/react": "npm:^1.21.16"
+ "@interchain-ui/react": "npm:^1.23.16"
+ "@interchain-ui/react-no-ssr": "npm:^0.1.2"
"@tanstack/react-query": "npm:4.32.0"
"@tanstack/react-query-devtools": "npm:4.32.0"
"@types/node": "npm:^20.8.4"
"@types/react": "npm:^18.2.50"
"@types/react-dom": "npm:^18.2.18"
- "@types/react-no-ssr": "npm:^1.1.7"
"@uidotdev/usehooks": "npm:2.4.1"
bignumber.js: "npm:^9.1.2"
chain-registry: "npm:1.20.0"
@@ -729,8 +729,7 @@ __metadata:
react: "npm:^18.2"
react-dom: "npm:^18.2"
react-icons: "npm:^4.12.0"
- react-no-ssr: "npm:1.1.0"
- typescript: "npm:^5"
+ typescript: "npm:^5.1.6"
languageName: unknown
linkType: soft
@@ -1973,9 +1972,19 @@ __metadata:
languageName: node
linkType: hard
-"@interchain-ui/react@npm:^1.21.16":
- version: 1.22.11
- resolution: "@interchain-ui/react@npm:1.22.11"
+"@interchain-ui/react-no-ssr@npm:^0.1.2":
+ version: 0.1.2
+ resolution: "@interchain-ui/react-no-ssr@npm:0.1.2"
+ peerDependencies:
+ react: ^18.x
+ react-dom: ^18.x
+ checksum: 10c0/1613c455c767de2a3271705d53049e66911b36f01cab340e7d74be49bd8e68fd5db1204072d9c7bca2b850fdfb90d426b374c0cc4561d3806f18a73adb5a1bf1
+ languageName: node
+ linkType: hard
+
+"@interchain-ui/react@npm:^1.23.16":
+ version: 1.23.16
+ resolution: "@interchain-ui/react@npm:1.23.16"
dependencies:
"@floating-ui/core": "npm:^1.6.0"
"@floating-ui/dom": "npm:^1.5.3"
@@ -2002,7 +2011,7 @@ __metadata:
peerDependencies:
react: ^18.x
react-dom: ^18.x
- checksum: 10c0/b7494d5d01282f211b1174ab8a9dcb48faf9b7389bfb5b624167542abd9f35786068fe966c3fe96488f72877a95e9c9cdad7859e87379e44dbf1c9b5f3360a02
+ checksum: 10c0/f1c300c2e54a6f305153fbc1e467bafc846082a1b1cc39ca11634575c4d05280144be7cf287f40c30e7682b37681121b91a3c4e6295720d83cab30748315e36e
languageName: node
linkType: hard
@@ -4489,15 +4498,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/react-no-ssr@npm:^1.1.7":
- version: 1.1.7
- resolution: "@types/react-no-ssr@npm:1.1.7"
- dependencies:
- "@types/react": "npm:*"
- checksum: 10c0/9e417780585ba7d0cd6425fb1cc57a281ec0d8a8561d8880c07cfa6a8ef0af4eb1e7344b4ab3148b7d8892459fef15e587d8c5224ef6e36d605c3018ec623a50
- languageName: node
- linkType: hard
-
"@types/react@npm:18.0.25":
version: 18.0.25
resolution: "@types/react@npm:18.0.25"
@@ -5281,16 +5281,6 @@ __metadata:
languageName: node
linkType: hard
-"babel-runtime@npm:6.x.x":
- version: 6.26.0
- resolution: "babel-runtime@npm:6.26.0"
- dependencies:
- core-js: "npm:^2.4.0"
- regenerator-runtime: "npm:^0.11.0"
- checksum: 10c0/caa752004936b1463765ed3199c52f6a55d0613b9bed108743d6f13ca532b821d4ea9decc4be1b583193164462b1e3e7eefdfa36b15c72e7daac58dd72c1772f
- languageName: node
- linkType: hard
-
"balanced-match@npm:^1.0.0":
version: 1.0.2
resolution: "balanced-match@npm:1.0.2"
@@ -5838,13 +5828,6 @@ __metadata:
languageName: node
linkType: hard
-"core-js@npm:^2.4.0":
- version: 2.6.12
- resolution: "core-js@npm:2.6.12"
- checksum: 10c0/00128efe427789120a06b819adc94cc72b96955acb331cb71d09287baf9bd37bebd191d91f1ee4939c893a050307ead4faea08876f09115112612b6a05684b63
- languageName: node
- linkType: hard
-
"core-util-is@npm:~1.0.0":
version: 1.0.3
resolution: "core-util-is@npm:1.0.3"
@@ -9563,17 +9546,6 @@ __metadata:
languageName: node
linkType: hard
-"react-no-ssr@npm:1.1.0":
- version: 1.1.0
- resolution: "react-no-ssr@npm:1.1.0"
- dependencies:
- babel-runtime: "npm:6.x.x"
- peerDependencies:
- react: ^0.14.0 || ^15.0.0
- checksum: 10c0/c0b319ddb526c6ad2ec2579d428a89f003858ea9f0c6f43bfc330972906445aafedca35f72e2ab8d5ab142bcc2ccdb2361fb19ae501189ac47553c427a1c4ce7
- languageName: node
- linkType: hard
-
"react-stately@npm:^3.27.1":
version: 3.30.1
resolution: "react-stately@npm:3.30.1"
@@ -9680,13 +9652,6 @@ __metadata:
languageName: node
linkType: hard
-"regenerator-runtime@npm:^0.11.0":
- version: 0.11.1
- resolution: "regenerator-runtime@npm:0.11.1"
- checksum: 10c0/69cfa839efcf2d627fe358bf302ab8b24e5f182cb69f13e66f0612d3640d7838aad1e55662135e3ef2c1cc4322315b757626094fab13a48f9a64ab4bdeb8795b
- languageName: node
- linkType: hard
-
"regenerator-runtime@npm:^0.14.0":
version: 0.14.1
resolution: "regenerator-runtime@npm:0.14.1"
@@ -10536,7 +10501,7 @@ __metadata:
languageName: node
linkType: hard
-"typescript@npm:^5":
+"typescript@npm:^5.1.6":
version: 5.4.5
resolution: "typescript@npm:5.4.5"
bin:
@@ -10546,7 +10511,7 @@ __metadata:
languageName: node
linkType: hard
-"typescript@patch:typescript@npm%3A^5#optional!builtin":
+"typescript@patch:typescript@npm%3A^5.1.6#optional!builtin":
version: 5.4.5
resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=d69c25"
bin:
diff --git a/examples/authz/.babelrc b/examples/authz/.babelrc
deleted file mode 100644
index 1ff94f7ed..000000000
--- a/examples/authz/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["next/babel"]
-}
diff --git a/examples/authz/components/voting/Proposal.tsx b/examples/authz/components/voting/Proposal.tsx
index e9cdf1da7..cd6d31299 100644
--- a/examples/authz/components/voting/Proposal.tsx
+++ b/examples/authz/components/voting/Proposal.tsx
@@ -182,7 +182,7 @@ export function Proposal({
>
{timepoints.map((timepoint) => (
-
+
InnerOp.fromJSON(e));
return obj;
},
- toJSON(message: ExistenceProof): unknown {
+ toJSON(message: ExistenceProof): JsonSafe {
const obj: any = {};
message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
message.value !== undefined && (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
@@ -969,7 +970,7 @@ export const NonExistenceProof = {
if (isSet(object.right)) obj.right = ExistenceProof.fromJSON(object.right);
return obj;
},
- toJSON(message: NonExistenceProof): unknown {
+ toJSON(message: NonExistenceProof): JsonSafe {
const obj: any = {};
message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
message.left !== undefined && (obj.left = message.left ? ExistenceProof.toJSON(message.left) : undefined);
@@ -1106,7 +1107,7 @@ export const CommitmentProof = {
if (isSet(object.compressed)) obj.compressed = CompressedBatchProof.fromJSON(object.compressed);
return obj;
},
- toJSON(message: CommitmentProof): unknown {
+ toJSON(message: CommitmentProof): JsonSafe {
const obj: any = {};
message.exist !== undefined && (obj.exist = message.exist ? ExistenceProof.toJSON(message.exist) : undefined);
message.nonexist !== undefined && (obj.nonexist = message.nonexist ? NonExistenceProof.toJSON(message.nonexist) : undefined);
@@ -1263,7 +1264,7 @@ export const LeafOp = {
if (isSet(object.prefix)) obj.prefix = bytesFromBase64(object.prefix);
return obj;
},
- toJSON(message: LeafOp): unknown {
+ toJSON(message: LeafOp): JsonSafe {
const obj: any = {};
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
message.prehashKey !== undefined && (obj.prehashKey = hashOpToJSON(message.prehashKey));
@@ -1404,7 +1405,7 @@ export const InnerOp = {
if (isSet(object.suffix)) obj.suffix = bytesFromBase64(object.suffix);
return obj;
},
- toJSON(message: InnerOp): unknown {
+ toJSON(message: InnerOp): JsonSafe {
const obj: any = {};
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
message.prefix !== undefined && (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array()));
@@ -1537,7 +1538,7 @@ export const ProofSpec = {
if (isSet(object.minDepth)) obj.minDepth = Number(object.minDepth);
return obj;
},
- toJSON(message: ProofSpec): unknown {
+ toJSON(message: ProofSpec): JsonSafe {
const obj: any = {};
message.leafSpec !== undefined && (obj.leafSpec = message.leafSpec ? LeafOp.toJSON(message.leafSpec) : undefined);
message.innerSpec !== undefined && (obj.innerSpec = message.innerSpec ? InnerSpec.toJSON(message.innerSpec) : undefined);
@@ -1707,7 +1708,7 @@ export const InnerSpec = {
if (isSet(object.hash)) obj.hash = hashOpFromJSON(object.hash);
return obj;
},
- toJSON(message: InnerSpec): unknown {
+ toJSON(message: InnerSpec): JsonSafe {
const obj: any = {};
if (message.childOrder) {
obj.childOrder = message.childOrder.map(e => Math.round(e));
@@ -1850,7 +1851,7 @@ export const BatchProof = {
if (Array.isArray(object?.entries)) obj.entries = object.entries.map((e: any) => BatchEntry.fromJSON(e));
return obj;
},
- toJSON(message: BatchProof): unknown {
+ toJSON(message: BatchProof): JsonSafe {
const obj: any = {};
if (message.entries) {
obj.entries = message.entries.map(e => e ? BatchEntry.toJSON(e) : undefined);
@@ -1961,7 +1962,7 @@ export const BatchEntry = {
if (isSet(object.nonexist)) obj.nonexist = NonExistenceProof.fromJSON(object.nonexist);
return obj;
},
- toJSON(message: BatchEntry): unknown {
+ toJSON(message: BatchEntry): JsonSafe {
const obj: any = {};
message.exist !== undefined && (obj.exist = message.exist ? ExistenceProof.toJSON(message.exist) : undefined);
message.nonexist !== undefined && (obj.nonexist = message.nonexist ? NonExistenceProof.toJSON(message.nonexist) : undefined);
@@ -2074,7 +2075,7 @@ export const CompressedBatchProof = {
if (Array.isArray(object?.lookupInners)) obj.lookupInners = object.lookupInners.map((e: any) => InnerOp.fromJSON(e));
return obj;
},
- toJSON(message: CompressedBatchProof): unknown {
+ toJSON(message: CompressedBatchProof): JsonSafe {
const obj: any = {};
if (message.entries) {
obj.entries = message.entries.map(e => e ? CompressedBatchEntry.toJSON(e) : undefined);
@@ -2203,7 +2204,7 @@ export const CompressedBatchEntry = {
if (isSet(object.nonexist)) obj.nonexist = CompressedNonExistenceProof.fromJSON(object.nonexist);
return obj;
},
- toJSON(message: CompressedBatchEntry): unknown {
+ toJSON(message: CompressedBatchEntry): JsonSafe {
const obj: any = {};
message.exist !== undefined && (obj.exist = message.exist ? CompressedExistenceProof.toJSON(message.exist) : undefined);
message.nonexist !== undefined && (obj.nonexist = message.nonexist ? CompressedNonExistenceProof.toJSON(message.nonexist) : undefined);
@@ -2341,7 +2342,7 @@ export const CompressedExistenceProof = {
if (Array.isArray(object?.path)) obj.path = object.path.map((e: any) => Number(e));
return obj;
},
- toJSON(message: CompressedExistenceProof): unknown {
+ toJSON(message: CompressedExistenceProof): JsonSafe {
const obj: any = {};
message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
message.value !== undefined && (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
@@ -2486,7 +2487,7 @@ export const CompressedNonExistenceProof = {
if (isSet(object.right)) obj.right = CompressedExistenceProof.fromJSON(object.right);
return obj;
},
- toJSON(message: CompressedNonExistenceProof): unknown {
+ toJSON(message: CompressedNonExistenceProof): JsonSafe {
const obj: any = {};
message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
message.left !== undefined && (obj.left = message.left ? CompressedExistenceProof.toJSON(message.left) : undefined);
diff --git a/examples/authz/src/codegen/cosmos/app/v1alpha1/config.ts b/examples/authz/src/codegen/cosmos/app/v1alpha1/config.ts
index b6891ccc5..f7bec84fb 100644
--- a/examples/authz/src/codegen/cosmos/app/v1alpha1/config.ts
+++ b/examples/authz/src/codegen/cosmos/app/v1alpha1/config.ts
@@ -1,6 +1,7 @@
//@ts-nocheck
import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
import { BinaryReader, BinaryWriter } from "../../../binary";
+import { JsonSafe } from "../../../json-safe";
import { DeepPartial, isSet } from "../../../helpers";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.app.v1alpha1";
@@ -150,7 +151,7 @@ export const Config = {
if (Array.isArray(object?.modules)) obj.modules = object.modules.map((e: any) => ModuleConfig.fromJSON(e));
return obj;
},
- toJSON(message: Config): unknown {
+ toJSON(message: Config): JsonSafe {
const obj: any = {};
if (message.modules) {
obj.modules = message.modules.map(e => e ? ModuleConfig.toJSON(e) : undefined);
@@ -269,7 +270,7 @@ export const ModuleConfig = {
if (isSet(object.config)) obj.config = Any.fromJSON(object.config);
return obj;
},
- toJSON(message: ModuleConfig): unknown {
+ toJSON(message: ModuleConfig): JsonSafe {
const obj: any = {};
message.name !== undefined && (obj.name = message.name);
message.config !== undefined && (obj.config = message.config ? Any.toJSON(message.config) : undefined);
diff --git a/examples/authz/src/codegen/cosmos/app/v1alpha1/module.ts b/examples/authz/src/codegen/cosmos/app/v1alpha1/module.ts
index 9c2812a52..4c8de7984 100644
--- a/examples/authz/src/codegen/cosmos/app/v1alpha1/module.ts
+++ b/examples/authz/src/codegen/cosmos/app/v1alpha1/module.ts
@@ -1,6 +1,7 @@
//@ts-nocheck
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.app.v1alpha1";
/** ModuleDescriptor describes an app module. */
@@ -270,7 +271,7 @@ export const ModuleDescriptor = {
if (Array.isArray(object?.canMigrateFrom)) obj.canMigrateFrom = object.canMigrateFrom.map((e: any) => MigrateFromInfo.fromJSON(e));
return obj;
},
- toJSON(message: ModuleDescriptor): unknown {
+ toJSON(message: ModuleDescriptor): JsonSafe {
const obj: any = {};
message.goImport !== undefined && (obj.goImport = message.goImport);
if (message.usePackage) {
@@ -415,7 +416,7 @@ export const PackageReference = {
if (isSet(object.revision)) obj.revision = Number(object.revision);
return obj;
},
- toJSON(message: PackageReference): unknown {
+ toJSON(message: PackageReference): JsonSafe {
const obj: any = {};
message.name !== undefined && (obj.name = message.name);
message.revision !== undefined && (obj.revision = Math.round(message.revision));
@@ -524,7 +525,7 @@ export const MigrateFromInfo = {
if (isSet(object.module)) obj.module = String(object.module);
return obj;
},
- toJSON(message: MigrateFromInfo): unknown {
+ toJSON(message: MigrateFromInfo): JsonSafe {
const obj: any = {};
message.module !== undefined && (obj.module = message.module);
return obj;
diff --git a/examples/authz/src/codegen/cosmos/app/v1alpha1/query.ts b/examples/authz/src/codegen/cosmos/app/v1alpha1/query.ts
index 572af251b..b58cbe53b 100644
--- a/examples/authz/src/codegen/cosmos/app/v1alpha1/query.ts
+++ b/examples/authz/src/codegen/cosmos/app/v1alpha1/query.ts
@@ -1,6 +1,7 @@
//@ts-nocheck
import { Config, ConfigAmino, ConfigSDKType } from "./config";
import { BinaryReader, BinaryWriter } from "../../../binary";
+import { JsonSafe } from "../../../json-safe";
import { DeepPartial, isSet } from "../../../helpers";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.app.v1alpha1";
@@ -76,7 +77,7 @@ export const QueryConfigRequest = {
const obj = createBaseQueryConfigRequest();
return obj;
},
- toJSON(_: QueryConfigRequest): unknown {
+ toJSON(_: QueryConfigRequest): JsonSafe {
const obj: any = {};
return obj;
},
@@ -168,7 +169,7 @@ export const QueryConfigResponse = {
if (isSet(object.config)) obj.config = Config.fromJSON(object.config);
return obj;
},
- toJSON(message: QueryConfigResponse): unknown {
+ toJSON(message: QueryConfigResponse): JsonSafe {
const obj: any = {};
message.config !== undefined && (obj.config = message.config ? Config.toJSON(message.config) : undefined);
return obj;
diff --git a/examples/authz/src/codegen/cosmos/auth/v1beta1/auth.ts b/examples/authz/src/codegen/cosmos/auth/v1beta1/auth.ts
index 58066e8fe..a055bdcb9 100644
--- a/examples/authz/src/codegen/cosmos/auth/v1beta1/auth.ts
+++ b/examples/authz/src/codegen/cosmos/auth/v1beta1/auth.ts
@@ -2,6 +2,7 @@
import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.auth.v1beta1";
/**
@@ -177,7 +178,7 @@ export const BaseAccount = {
if (isSet(object.sequence)) obj.sequence = BigInt(object.sequence.toString());
return obj;
},
- toJSON(message: BaseAccount): unknown {
+ toJSON(message: BaseAccount): JsonSafe {
const obj: any = {};
message.address !== undefined && (obj.address = message.address);
message.pubKey !== undefined && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined);
@@ -325,7 +326,7 @@ export const ModuleAccount = {
if (Array.isArray(object?.permissions)) obj.permissions = object.permissions.map((e: any) => String(e));
return obj;
},
- toJSON(message: ModuleAccount): unknown {
+ toJSON(message: ModuleAccount): JsonSafe {
const obj: any = {};
message.baseAccount !== undefined && (obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined);
message.name !== undefined && (obj.name = message.name);
@@ -486,7 +487,7 @@ export const Params = {
if (isSet(object.sigVerifyCostSecp256k1)) obj.sigVerifyCostSecp256k1 = BigInt(object.sigVerifyCostSecp256k1.toString());
return obj;
},
- toJSON(message: Params): unknown {
+ toJSON(message: Params): JsonSafe {
const obj: any = {};
message.maxMemoCharacters !== undefined && (obj.maxMemoCharacters = (message.maxMemoCharacters || BigInt(0)).toString());
message.txSigLimit !== undefined && (obj.txSigLimit = (message.txSigLimit || BigInt(0)).toString());
diff --git a/examples/authz/src/codegen/cosmos/auth/v1beta1/genesis.ts b/examples/authz/src/codegen/cosmos/auth/v1beta1/genesis.ts
index 1606e541a..61223d77a 100644
--- a/examples/authz/src/codegen/cosmos/auth/v1beta1/genesis.ts
+++ b/examples/authz/src/codegen/cosmos/auth/v1beta1/genesis.ts
@@ -3,6 +3,7 @@ import { Params, ParamsAmino, ParamsSDKType } from "./auth";
import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.auth.v1beta1";
/** GenesisState defines the auth module's genesis state. */
@@ -85,7 +86,7 @@ export const GenesisState = {
if (Array.isArray(object?.accounts)) obj.accounts = object.accounts.map((e: any) => Any.fromJSON(e));
return obj;
},
- toJSON(message: GenesisState): unknown {
+ toJSON(message: GenesisState): JsonSafe {
const obj: any = {};
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
if (message.accounts) {
diff --git a/examples/authz/src/codegen/cosmos/auth/v1beta1/query.ts b/examples/authz/src/codegen/cosmos/auth/v1beta1/query.ts
index 5cced88ef..8f2afc00c 100644
--- a/examples/authz/src/codegen/cosmos/auth/v1beta1/query.ts
+++ b/examples/authz/src/codegen/cosmos/auth/v1beta1/query.ts
@@ -4,6 +4,7 @@ import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf
import { Params, ParamsAmino, ParamsSDKType, BaseAccount, BaseAccountProtoMsg, BaseAccountSDKType, ModuleAccount, ModuleAccountProtoMsg, ModuleAccountSDKType } from "./auth";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.auth.v1beta1";
/**
@@ -361,7 +362,7 @@ export const QueryAccountsRequest = {
if (isSet(object.pagination)) obj.pagination = PageRequest.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryAccountsRequest): unknown {
+ toJSON(message: QueryAccountsRequest): JsonSafe {
const obj: any = {};
message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
return obj;
@@ -472,7 +473,7 @@ export const QueryAccountsResponse = {
if (isSet(object.pagination)) obj.pagination = PageResponse.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryAccountsResponse): unknown {
+ toJSON(message: QueryAccountsResponse): JsonSafe {
const obj: any = {};
if (message.accounts) {
obj.accounts = message.accounts.map(e => e ? GlobalDecoderRegistry.toJSON(e) : undefined);
@@ -593,7 +594,7 @@ export const QueryAccountRequest = {
if (isSet(object.address)) obj.address = String(object.address);
return obj;
},
- toJSON(message: QueryAccountRequest): unknown {
+ toJSON(message: QueryAccountRequest): JsonSafe {
const obj: any = {};
message.address !== undefined && (obj.address = message.address);
return obj;
@@ -685,7 +686,7 @@ export const QueryModuleAccountsRequest = {
const obj = createBaseQueryModuleAccountsRequest();
return obj;
},
- toJSON(_: QueryModuleAccountsRequest): unknown {
+ toJSON(_: QueryModuleAccountsRequest): JsonSafe {
const obj: any = {};
return obj;
},
@@ -777,7 +778,7 @@ export const QueryParamsResponse = {
if (isSet(object.params)) obj.params = Params.fromJSON(object.params);
return obj;
},
- toJSON(message: QueryParamsResponse): unknown {
+ toJSON(message: QueryParamsResponse): JsonSafe {
const obj: any = {};
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
return obj;
@@ -880,7 +881,7 @@ export const QueryAccountResponse = {
if (isSet(object.account)) obj.account = GlobalDecoderRegistry.fromJSON(object.account);
return obj;
},
- toJSON(message: QueryAccountResponse): unknown {
+ toJSON(message: QueryAccountResponse): JsonSafe {
const obj: any = {};
message.account !== undefined && (obj.account = message.account ? GlobalDecoderRegistry.toJSON(message.account) : undefined);
return obj;
@@ -974,7 +975,7 @@ export const QueryParamsRequest = {
const obj = createBaseQueryParamsRequest();
return obj;
},
- toJSON(_: QueryParamsRequest): unknown {
+ toJSON(_: QueryParamsRequest): JsonSafe {
const obj: any = {};
return obj;
},
@@ -1066,7 +1067,7 @@ export const QueryModuleAccountsResponse = {
if (Array.isArray(object?.accounts)) obj.accounts = object.accounts.map((e: any) => GlobalDecoderRegistry.fromJSON(e));
return obj;
},
- toJSON(message: QueryModuleAccountsResponse): unknown {
+ toJSON(message: QueryModuleAccountsResponse): JsonSafe {
const obj: any = {};
if (message.accounts) {
obj.accounts = message.accounts.map(e => e ? GlobalDecoderRegistry.toJSON(e) : undefined);
@@ -1168,7 +1169,7 @@ export const Bech32PrefixRequest = {
const obj = createBaseBech32PrefixRequest();
return obj;
},
- toJSON(_: Bech32PrefixRequest): unknown {
+ toJSON(_: Bech32PrefixRequest): JsonSafe {
const obj: any = {};
return obj;
},
@@ -1260,7 +1261,7 @@ export const Bech32PrefixResponse = {
if (isSet(object.bech32Prefix)) obj.bech32Prefix = String(object.bech32Prefix);
return obj;
},
- toJSON(message: Bech32PrefixResponse): unknown {
+ toJSON(message: Bech32PrefixResponse): JsonSafe {
const obj: any = {};
message.bech32Prefix !== undefined && (obj.bech32Prefix = message.bech32Prefix);
return obj;
@@ -1361,7 +1362,7 @@ export const AddressBytesToStringRequest = {
if (isSet(object.addressBytes)) obj.addressBytes = bytesFromBase64(object.addressBytes);
return obj;
},
- toJSON(message: AddressBytesToStringRequest): unknown {
+ toJSON(message: AddressBytesToStringRequest): JsonSafe {
const obj: any = {};
message.addressBytes !== undefined && (obj.addressBytes = base64FromBytes(message.addressBytes !== undefined ? message.addressBytes : new Uint8Array()));
return obj;
@@ -1462,7 +1463,7 @@ export const AddressBytesToStringResponse = {
if (isSet(object.addressString)) obj.addressString = String(object.addressString);
return obj;
},
- toJSON(message: AddressBytesToStringResponse): unknown {
+ toJSON(message: AddressBytesToStringResponse): JsonSafe {
const obj: any = {};
message.addressString !== undefined && (obj.addressString = message.addressString);
return obj;
@@ -1563,7 +1564,7 @@ export const AddressStringToBytesRequest = {
if (isSet(object.addressString)) obj.addressString = String(object.addressString);
return obj;
},
- toJSON(message: AddressStringToBytesRequest): unknown {
+ toJSON(message: AddressStringToBytesRequest): JsonSafe {
const obj: any = {};
message.addressString !== undefined && (obj.addressString = message.addressString);
return obj;
@@ -1664,7 +1665,7 @@ export const AddressStringToBytesResponse = {
if (isSet(object.addressBytes)) obj.addressBytes = bytesFromBase64(object.addressBytes);
return obj;
},
- toJSON(message: AddressStringToBytesResponse): unknown {
+ toJSON(message: AddressStringToBytesResponse): JsonSafe {
const obj: any = {};
message.addressBytes !== undefined && (obj.addressBytes = base64FromBytes(message.addressBytes !== undefined ? message.addressBytes : new Uint8Array()));
return obj;
diff --git a/examples/authz/src/codegen/cosmos/authz/v1beta1/authz.ts b/examples/authz/src/codegen/cosmos/authz/v1beta1/authz.ts
index e67018c07..ea93aa4df 100644
--- a/examples/authz/src/codegen/cosmos/authz/v1beta1/authz.ts
+++ b/examples/authz/src/codegen/cosmos/authz/v1beta1/authz.ts
@@ -5,6 +5,7 @@ import { SendAuthorization, SendAuthorizationProtoMsg, SendAuthorizationSDKType
import { StakeAuthorization, StakeAuthorizationProtoMsg, StakeAuthorizationSDKType } from "../../staking/v1beta1/authz";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.authz.v1beta1";
/**
@@ -194,7 +195,7 @@ export const GenericAuthorization = {
if (isSet(object.msg)) obj.msg = String(object.msg);
return obj;
},
- toJSON(message: GenericAuthorization): unknown {
+ toJSON(message: GenericAuthorization): JsonSafe {
const obj: any = {};
message.msg !== undefined && (obj.msg = message.msg);
return obj;
@@ -303,7 +304,7 @@ export const Grant = {
if (isSet(object.expiration)) obj.expiration = new Date(object.expiration);
return obj;
},
- toJSON(message: Grant): unknown {
+ toJSON(message: Grant): JsonSafe {
const obj: any = {};
message.authorization !== undefined && (obj.authorization = message.authorization ? GlobalDecoderRegistry.toJSON(message.authorization) : undefined);
message.expiration !== undefined && (obj.expiration = message.expiration.toISOString());
@@ -438,7 +439,7 @@ export const GrantAuthorization = {
if (isSet(object.expiration)) obj.expiration = new Date(object.expiration);
return obj;
},
- toJSON(message: GrantAuthorization): unknown {
+ toJSON(message: GrantAuthorization): JsonSafe {
const obj: any = {};
message.granter !== undefined && (obj.granter = message.granter);
message.grantee !== undefined && (obj.grantee = message.grantee);
@@ -565,7 +566,7 @@ export const GrantQueueItem = {
if (Array.isArray(object?.msgTypeUrls)) obj.msgTypeUrls = object.msgTypeUrls.map((e: any) => String(e));
return obj;
},
- toJSON(message: GrantQueueItem): unknown {
+ toJSON(message: GrantQueueItem): JsonSafe {
const obj: any = {};
if (message.msgTypeUrls) {
obj.msgTypeUrls = message.msgTypeUrls.map(e => e);
diff --git a/examples/authz/src/codegen/cosmos/authz/v1beta1/event.ts b/examples/authz/src/codegen/cosmos/authz/v1beta1/event.ts
index 945b266e5..bec634c25 100644
--- a/examples/authz/src/codegen/cosmos/authz/v1beta1/event.ts
+++ b/examples/authz/src/codegen/cosmos/authz/v1beta1/event.ts
@@ -1,6 +1,7 @@
//@ts-nocheck
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.authz.v1beta1";
/** EventGrant is emitted on Msg/Grant */
@@ -128,7 +129,7 @@ export const EventGrant = {
if (isSet(object.grantee)) obj.grantee = String(object.grantee);
return obj;
},
- toJSON(message: EventGrant): unknown {
+ toJSON(message: EventGrant): JsonSafe {
const obj: any = {};
message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl);
message.granter !== undefined && (obj.granter = message.granter);
@@ -261,7 +262,7 @@ export const EventRevoke = {
if (isSet(object.grantee)) obj.grantee = String(object.grantee);
return obj;
},
- toJSON(message: EventRevoke): unknown {
+ toJSON(message: EventRevoke): JsonSafe {
const obj: any = {};
message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl);
message.granter !== undefined && (obj.granter = message.granter);
diff --git a/examples/authz/src/codegen/cosmos/authz/v1beta1/genesis.ts b/examples/authz/src/codegen/cosmos/authz/v1beta1/genesis.ts
index ac6a7bf9d..04263cf40 100644
--- a/examples/authz/src/codegen/cosmos/authz/v1beta1/genesis.ts
+++ b/examples/authz/src/codegen/cosmos/authz/v1beta1/genesis.ts
@@ -1,6 +1,7 @@
//@ts-nocheck
import { GrantAuthorization, GrantAuthorizationAmino, GrantAuthorizationSDKType } from "./authz";
import { BinaryReader, BinaryWriter } from "../../../binary";
+import { JsonSafe } from "../../../json-safe";
import { DeepPartial } from "../../../helpers";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.authz.v1beta1";
@@ -69,7 +70,7 @@ export const GenesisState = {
if (Array.isArray(object?.authorization)) obj.authorization = object.authorization.map((e: any) => GrantAuthorization.fromJSON(e));
return obj;
},
- toJSON(message: GenesisState): unknown {
+ toJSON(message: GenesisState): JsonSafe {
const obj: any = {};
if (message.authorization) {
obj.authorization = message.authorization.map(e => e ? GrantAuthorization.toJSON(e) : undefined);
diff --git a/examples/authz/src/codegen/cosmos/authz/v1beta1/query.ts b/examples/authz/src/codegen/cosmos/authz/v1beta1/query.ts
index 86f9162af..881e2a0fe 100644
--- a/examples/authz/src/codegen/cosmos/authz/v1beta1/query.ts
+++ b/examples/authz/src/codegen/cosmos/authz/v1beta1/query.ts
@@ -3,6 +3,7 @@ import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageRe
import { Grant, GrantAmino, GrantSDKType, GrantAuthorization, GrantAuthorizationAmino, GrantAuthorizationSDKType } from "./authz";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.authz.v1beta1";
/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */
@@ -238,7 +239,7 @@ export const QueryGrantsRequest = {
if (isSet(object.pagination)) obj.pagination = PageRequest.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryGrantsRequest): unknown {
+ toJSON(message: QueryGrantsRequest): JsonSafe {
const obj: any = {};
message.granter !== undefined && (obj.granter = message.granter);
message.grantee !== undefined && (obj.grantee = message.grantee);
@@ -373,7 +374,7 @@ export const QueryGrantsResponse = {
if (isSet(object.pagination)) obj.pagination = PageResponse.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryGrantsResponse): unknown {
+ toJSON(message: QueryGrantsResponse): JsonSafe {
const obj: any = {};
if (message.grants) {
obj.grants = message.grants.map(e => e ? Grant.toJSON(e) : undefined);
@@ -502,7 +503,7 @@ export const QueryGranterGrantsRequest = {
if (isSet(object.pagination)) obj.pagination = PageRequest.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryGranterGrantsRequest): unknown {
+ toJSON(message: QueryGranterGrantsRequest): JsonSafe {
const obj: any = {};
message.granter !== undefined && (obj.granter = message.granter);
message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
@@ -621,7 +622,7 @@ export const QueryGranterGrantsResponse = {
if (isSet(object.pagination)) obj.pagination = PageResponse.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryGranterGrantsResponse): unknown {
+ toJSON(message: QueryGranterGrantsResponse): JsonSafe {
const obj: any = {};
if (message.grants) {
obj.grants = message.grants.map(e => e ? GrantAuthorization.toJSON(e) : undefined);
@@ -750,7 +751,7 @@ export const QueryGranteeGrantsRequest = {
if (isSet(object.pagination)) obj.pagination = PageRequest.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryGranteeGrantsRequest): unknown {
+ toJSON(message: QueryGranteeGrantsRequest): JsonSafe {
const obj: any = {};
message.grantee !== undefined && (obj.grantee = message.grantee);
message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
@@ -869,7 +870,7 @@ export const QueryGranteeGrantsResponse = {
if (isSet(object.pagination)) obj.pagination = PageResponse.fromJSON(object.pagination);
return obj;
},
- toJSON(message: QueryGranteeGrantsResponse): unknown {
+ toJSON(message: QueryGranteeGrantsResponse): JsonSafe {
const obj: any = {};
if (message.grants) {
obj.grants = message.grants.map(e => e ? GrantAuthorization.toJSON(e) : undefined);
diff --git a/examples/authz/src/codegen/cosmos/authz/v1beta1/tx.ts b/examples/authz/src/codegen/cosmos/authz/v1beta1/tx.ts
index 14d8dfdef..9573107fd 100644
--- a/examples/authz/src/codegen/cosmos/authz/v1beta1/tx.ts
+++ b/examples/authz/src/codegen/cosmos/authz/v1beta1/tx.ts
@@ -3,6 +3,7 @@ import { Grant, GrantAmino, GrantSDKType } from "./authz";
import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.authz.v1beta1";
/**
@@ -237,7 +238,7 @@ export const MsgGrant = {
if (isSet(object.grant)) obj.grant = Grant.fromJSON(object.grant);
return obj;
},
- toJSON(message: MsgGrant): unknown {
+ toJSON(message: MsgGrant): JsonSafe {
const obj: any = {};
message.granter !== undefined && (obj.granter = message.granter);
message.grantee !== undefined && (obj.grantee = message.grantee);
@@ -356,7 +357,7 @@ export const MsgExecResponse = {
if (Array.isArray(object?.results)) obj.results = object.results.map((e: any) => bytesFromBase64(e));
return obj;
},
- toJSON(message: MsgExecResponse): unknown {
+ toJSON(message: MsgExecResponse): JsonSafe {
const obj: any = {};
if (message.results) {
obj.results = message.results.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array()));
@@ -475,7 +476,7 @@ export const MsgExec = {
if (Array.isArray(object?.msgs)) obj.msgs = object.msgs.map((e: any) => GlobalDecoderRegistry.fromJSON(e));
return obj;
},
- toJSON(message: MsgExec): unknown {
+ toJSON(message: MsgExec): JsonSafe {
const obj: any = {};
message.grantee !== undefined && (obj.grantee = message.grantee);
if (message.msgs) {
@@ -585,7 +586,7 @@ export const MsgGrantResponse = {
const obj = createBaseMsgGrantResponse();
return obj;
},
- toJSON(_: MsgGrantResponse): unknown {
+ toJSON(_: MsgGrantResponse): JsonSafe {
const obj: any = {};
return obj;
},
@@ -693,7 +694,7 @@ export const MsgRevoke = {
if (isSet(object.msgTypeUrl)) obj.msgTypeUrl = String(object.msgTypeUrl);
return obj;
},
- toJSON(message: MsgRevoke): unknown {
+ toJSON(message: MsgRevoke): JsonSafe {
const obj: any = {};
message.granter !== undefined && (obj.granter = message.granter);
message.grantee !== undefined && (obj.grantee = message.grantee);
@@ -801,7 +802,7 @@ export const MsgRevokeResponse = {
const obj = createBaseMsgRevokeResponse();
return obj;
},
- toJSON(_: MsgRevokeResponse): unknown {
+ toJSON(_: MsgRevokeResponse): JsonSafe {
const obj: any = {};
return obj;
},
diff --git a/examples/authz/src/codegen/cosmos/bank/v1beta1/authz.ts b/examples/authz/src/codegen/cosmos/bank/v1beta1/authz.ts
index dec0aa3bf..032548332 100644
--- a/examples/authz/src/codegen/cosmos/bank/v1beta1/authz.ts
+++ b/examples/authz/src/codegen/cosmos/bank/v1beta1/authz.ts
@@ -1,6 +1,7 @@
//@ts-nocheck
import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin";
import { BinaryReader, BinaryWriter } from "../../../binary";
+import { JsonSafe } from "../../../json-safe";
import { DeepPartial } from "../../../helpers";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.bank.v1beta1";
@@ -87,7 +88,7 @@ export const SendAuthorization = {
if (Array.isArray(object?.spendLimit)) obj.spendLimit = object.spendLimit.map((e: any) => Coin.fromJSON(e));
return obj;
},
- toJSON(message: SendAuthorization): unknown {
+ toJSON(message: SendAuthorization): JsonSafe {
const obj: any = {};
if (message.spendLimit) {
obj.spendLimit = message.spendLimit.map(e => e ? Coin.toJSON(e) : undefined);
diff --git a/examples/authz/src/codegen/cosmos/bank/v1beta1/bank.ts b/examples/authz/src/codegen/cosmos/bank/v1beta1/bank.ts
index ee49249da..4c783eebd 100644
--- a/examples/authz/src/codegen/cosmos/bank/v1beta1/bank.ts
+++ b/examples/authz/src/codegen/cosmos/bank/v1beta1/bank.ts
@@ -2,6 +2,7 @@
import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin";
import { BinaryReader, BinaryWriter } from "../../../binary";
import { isSet, DeepPartial } from "../../../helpers";
+import { JsonSafe } from "../../../json-safe";
import { GlobalDecoderRegistry } from "../../../registry";
export const protobufPackage = "cosmos.bank.v1beta1";
/** Params defines the parameters for the bank module. */
@@ -354,7 +355,7 @@ export const Params = {
if (isSet(object.defaultSendEnabled)) obj.defaultSendEnabled = Boolean(object.defaultSendEnabled);
return obj;
},
- toJSON(message: Params): unknown {
+ toJSON(message: Params): JsonSafe {
const obj: any = {};
if (message.sendEnabled) {
obj.sendEnabled = message.sendEnabled.map(e => e ? SendEnabled.toJSON(e) : undefined);
@@ -481,7 +482,7 @@ export const SendEnabled = {
if (isSet(object.enabled)) obj.enabled = Boolean(object.enabled);
return obj;
},
- toJSON(message: SendEnabled): unknown {
+ toJSON(message: SendEnabled): JsonSafe {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
message.enabled !== undefined && (obj.enabled = message.enabled);
@@ -598,7 +599,7 @@ export const Input = {
if (Array.isArray(object?.coins)) obj.coins = object.coins.map((e: any) => Coin.fromJSON(e));
return obj;
},
- toJSON(message: Input): unknown {
+ toJSON(message: Input): JsonSafe {
const obj: any = {};
message.address !== undefined && (obj.address = message.address);
if (message.coins) {
@@ -725,7 +726,7 @@ export const Output = {
if (Array.isArray(object?.coins)) obj.coins = object.coins.map((e: any) => Coin.fromJSON(e));
return obj;
},
- toJSON(message: Output): unknown {
+ toJSON(message: Output): JsonSafe